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 @@ -95,24 +95,24 @@ function compression (options) {
95
95
96
96
if ( ! this . _header ) {
97
97
// estimate the length
98
- if ( ! this . getHeader ( 'Content-Length' ) , cb ) {
99
- length = chunkLength ( chunk , encoding , cb )
98
+ if ( ! this . getHeader ( 'Content-Length' ) ) {
99
+ length = chunkLength ( chunk , encoding )
100
100
}
101
101
102
102
this . _implicitHeader ( )
103
103
}
104
104
105
105
if ( ! stream ) {
106
- return _end . call ( this , chunk , encoding )
106
+ return _end . call ( this , chunk , encoding , cb )
107
107
}
108
108
109
109
// mark ended
110
110
ended = true
111
111
112
112
// write Buffer for Node.js 0.8
113
113
return chunk
114
- ? stream . end ( new Buffer ( chunk , encoding ) )
115
- : stream . end ( )
114
+ ? stream . end ( new Buffer ( chunk , encoding ) , cb )
115
+ : stream . end ( null , cb )
116
116
}
117
117
118
118
res . on = function on ( type , listener ) {
You can’t perform that action at this time.
0 commit comments