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