File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ impl ChunkedEncoder {
177
177
let idx = self . bytes_written ;
178
178
buf[ idx] = CR ;
179
179
buf[ idx + 1 ] = LF ;
180
- self . bytes_written += 2 ;
180
+ self . bytes_written += CRLF_LEN ;
181
181
182
182
// Finally return how many bytes we've written to the buffer.
183
183
log:: trace!( "sending {} bytes" , self . bytes_written) ;
@@ -201,7 +201,7 @@ impl ChunkedEncoder {
201
201
buf[ idx] = b'0' ;
202
202
buf[ idx + 1 ] = CR ;
203
203
buf[ idx + 2 ] = LF ;
204
- self . bytes_written += 3 ;
204
+ self . bytes_written += 1 + CRLF_LEN ;
205
205
206
206
self . set_state ( State :: ReceiveTrailers ) ;
207
207
return self . receive_trailers ( res, cx, buf) ;
@@ -238,7 +238,7 @@ impl ChunkedEncoder {
238
238
// Write the final CRLF
239
239
buf[ idx] = CR ;
240
240
buf[ idx + 1 ] = LF ;
241
- self . bytes_written += 2 ;
241
+ self . bytes_written += CRLF_LEN ;
242
242
243
243
self . set_state ( State :: End ) ;
244
244
return Poll :: Ready ( Ok ( self . bytes_written ) ) ;
You can’t perform that action at this time.
0 commit comments