File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use async_std::io::{Read, Write};
6
6
use async_std:: prelude:: * ;
7
7
use async_std:: task:: { Context , Poll } ;
8
8
use futures_core:: ready;
9
- use http_types:: headers:: { HeaderName , HeaderValue , CONTENT_TYPE } ;
9
+ use http_types:: headers:: { HeaderName , HeaderValue , CONTENT_LENGTH } ;
10
10
use http_types:: { Body , Method , Request , Response } ;
11
11
use std:: str:: FromStr ;
12
12
use std:: time:: Duration ;
@@ -383,7 +383,7 @@ where
383
383
384
384
// Check for content-length, that determines determines whether we can parse
385
385
// it with a known length, or need to use chunked encoding.
386
- let len = match req. header ( & CONTENT_TYPE ) {
386
+ let len = match req. header ( & CONTENT_LENGTH ) {
387
387
Some ( len) => len. last ( ) . unwrap ( ) . as_str ( ) . parse :: < usize > ( ) ?,
388
388
None => return Ok ( Some ( req) ) ,
389
389
} ;
You can’t perform that action at this time.
0 commit comments