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) {
9595
9696 if ( ! this . _header ) {
9797 // 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 )
100100 }
101101
102102 this . _implicitHeader ( )
103103 }
104104
105105 if ( ! stream ) {
106- return _end . call ( this , chunk , encoding )
106+ return _end . call ( this , chunk , encoding , cb )
107107 }
108108
109109 // mark ended
110110 ended = true
111111
112112 // write Buffer for Node.js 0.8
113113 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 )
116116 }
117117
118118 res . on = function on ( type , listener ) {
You can’t perform that action at this time.
0 commit comments