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