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) {
73
73
74
74
// proxy
75
75
76
- res . write = function ( chunk , encoding ) {
76
+ res . write = function ( chunk , encoding , cb ) {
77
77
if ( ended ) {
78
78
return false
79
79
}
@@ -83,19 +83,19 @@ function compression(options) {
83
83
}
84
84
85
85
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 )
88
88
} ;
89
89
90
- res . end = function ( chunk , encoding ) {
90
+ res . end = function ( chunk , encoding , cb ) {
91
91
if ( ended ) {
92
92
return false
93
93
}
94
94
95
95
if ( ! this . _header ) {
96
96
// 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 )
99
99
}
100
100
101
101
this . _implicitHeader ( )
You can’t perform that action at this time.
0 commit comments