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 {
177177 let idx = self . bytes_written ;
178178 buf[ idx] = CR ;
179179 buf[ idx + 1 ] = LF ;
180- self . bytes_written += 2 ;
180+ self . bytes_written += CRLF_LEN ;
181181
182182 // Finally return how many bytes we've written to the buffer.
183183 log:: trace!( "sending {} bytes" , self . bytes_written) ;
@@ -201,7 +201,7 @@ impl ChunkedEncoder {
201201 buf[ idx] = b'0' ;
202202 buf[ idx + 1 ] = CR ;
203203 buf[ idx + 2 ] = LF ;
204- self . bytes_written += 3 ;
204+ self . bytes_written += 1 + CRLF_LEN ;
205205
206206 self . set_state ( State :: ReceiveTrailers ) ;
207207 return self . receive_trailers ( res, cx, buf) ;
@@ -238,7 +238,7 @@ impl ChunkedEncoder {
238238 // Write the final CRLF
239239 buf[ idx] = CR ;
240240 buf[ idx + 1 ] = LF ;
241- self . bytes_written += 2 ;
241+ self . bytes_written += CRLF_LEN ;
242242
243243 self . set_state ( State :: End ) ;
244244 return Poll :: Ready ( Ok ( self . bytes_written ) ) ;
You can’t perform that action at this time.
0 commit comments