File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ function compression (options) {
75
75
76
76
// proxy
77
77
78
- res . write = function write ( chunk , encoding ) {
78
+ res . write = function write ( chunk , encoding , cb ) {
79
79
if ( ended ) {
80
80
return false
81
81
}
@@ -85,11 +85,11 @@ function compression (options) {
85
85
}
86
86
87
87
return stream
88
- ? stream . write ( toBuffer ( chunk , encoding ) )
88
+ ? stream . write ( toBuffer ( chunk , encoding ) , cb || encoding )
89
89
: _write . call ( this , chunk , encoding )
90
90
}
91
91
92
- res . end = function end ( chunk , encoding ) {
92
+ res . end = function end ( chunk , encoding , cb ) {
93
93
if ( ended ) {
94
94
return false
95
95
}
@@ -112,7 +112,7 @@ function compression (options) {
112
112
113
113
// write Buffer for Node.js 0.8
114
114
return chunk
115
- ? stream . end ( toBuffer ( chunk , encoding ) )
115
+ ? stream . end ( toBuffer ( chunk , encoding ) , cb || encoding )
116
116
: stream . end ( )
117
117
}
118
118
You can’t perform that action at this time.
0 commit comments