File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -94,24 +94,24 @@ function compression(options) {
94
94
95
95
if ( ! this . _header ) {
96
96
// estimate the length
97
- if ( ! this . getHeader ( 'Content-Length' ) , cb ) {
98
- length = chunkLength ( chunk , encoding , cb )
97
+ if ( ! this . getHeader ( 'Content-Length' ) ) {
98
+ length = chunkLength ( chunk , encoding )
99
99
}
100
100
101
101
this . _implicitHeader ( )
102
102
}
103
103
104
104
if ( ! stream ) {
105
- return end . call ( this , chunk , encoding )
105
+ return end . call ( this , chunk , encoding , cb )
106
106
}
107
107
108
108
// mark ended
109
109
ended = true
110
110
111
111
// write Buffer for Node.js 0.8
112
112
return chunk
113
- ? stream . end ( new Buffer ( chunk , encoding ) )
114
- : stream . end ( )
113
+ ? stream . end ( new Buffer ( chunk , encoding ) , cb )
114
+ : stream . end ( null , cb )
115
115
} ;
116
116
117
117
res . on = function ( type , listener ) {
You can’t perform that action at this time.
0 commit comments