File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ function compression (options) {
7474
7575 // proxy
7676
77- res . write = function write ( chunk , encoding ) {
77+ res . write = function write ( chunk , encoding , cb ) {
7878 if ( ended ) {
7979 return false
8080 }
@@ -84,19 +84,19 @@ function compression (options) {
8484 }
8585
8686 return stream
87- ? stream . write ( new Buffer ( chunk , encoding ) )
88- : _write . call ( this , chunk , encoding )
89- }
87+ ? stream . write ( new Buffer ( chunk , encoding ) , cb )
88+ : _write . call ( this , chunk , encoding , cb )
89+ } ;
9090
91- res . end = function end ( chunk , encoding ) {
91+ res . end = function end ( chunk , encoding , cb ) {
9292 if ( ended ) {
9393 return false
9494 }
9595
9696 if ( ! this . _header ) {
9797 // estimate the length
98- if ( ! this . getHeader ( 'Content-Length' ) ) {
99- length = chunkLength ( chunk , encoding )
98+ if ( ! this . getHeader ( 'Content-Length' ) , cb ) {
99+ length = chunkLength ( chunk , encoding , cb )
100100 }
101101
102102 this . _implicitHeader ( )
You can’t perform that action at this time.
0 commit comments