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 @@ -271,7 +271,7 @@ impl Connection {
271271 } else if in_header {
272272 let parts: Vec < & str > = line. splitn ( 2 , ": " ) . collect ( ) ;
273273 if parts. len ( ) == 2 {
274- headers. insert ( parts[ 0 ] . to_owned ( ) , parts[ 1 ] . to_owned ( ) ) ;
274+ headers. insert ( parts[ 0 ] . to_lowercase ( ) , parts[ 1 ] . to_owned ( ) ) ;
275275 } else {
276276 warn ! ( "invalid header: {:?}" , line) ;
277277 }
@@ -284,7 +284,7 @@ impl Connection {
284284 let contents =
285285 contents. chain_err ( || ErrorKind :: Connection ( "no reply from daemon" . to_owned ( ) ) ) ?;
286286 let contents_length: & str = headers
287- . get ( "Content-Length " )
287+ . get ( "content-length " )
288288 . chain_err ( || format ! ( "Content-Length is missing: {:?}" , headers) ) ?;
289289 let contents_length: usize = contents_length
290290 . parse ( )
You can’t perform that action at this time.
0 commit comments