File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ function compression(options) {
7373
7474 // proxy
7575
76- res . write = function ( chunk , encoding ) {
76+ res . write = function ( chunk , encoding , cb ) {
7777 if ( ended ) {
7878 return false
7979 }
@@ -83,19 +83,19 @@ function compression(options) {
8383 }
8484
8585 return stream
86- ? stream . write ( new Buffer ( chunk , encoding ) )
87- : write . call ( this , chunk , encoding )
86+ ? stream . write ( new Buffer ( chunk , encoding ) , cb )
87+ : write . call ( this , chunk , encoding , cb )
8888 } ;
8989
90- res . end = function ( chunk , encoding ) {
90+ res . end = function ( chunk , encoding , cb ) {
9191 if ( ended ) {
9292 return false
9393 }
9494
9595 if ( ! this . _header ) {
9696 // estimate the length
97- if ( ! this . getHeader ( 'Content-Length' ) ) {
98- length = chunkLength ( chunk , encoding )
97+ if ( ! this . getHeader ( 'Content-Length' ) , cb ) {
98+ length = chunkLength ( chunk , encoding , cb )
9999 }
100100
101101 this . _implicitHeader ( )
You can’t perform that action at this time.
0 commit comments