We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8915a40 commit 5b3ff8fCopy full SHA for 5b3ff8f
1 file changed
src/daemon.rs
@@ -271,7 +271,7 @@ impl Connection {
271
} else if in_header {
272
let parts: Vec<&str> = line.splitn(2, ": ").collect();
273
if parts.len() == 2 {
274
- headers.insert(parts[0].to_owned(), parts[1].to_owned());
+ headers.insert(parts[0].to_lowercase(), parts[1].to_owned());
275
} else {
276
warn!("invalid header: {:?}", line);
277
}
@@ -284,7 +284,7 @@ impl Connection {
284
let contents =
285
contents.chain_err(|| ErrorKind::Connection("no reply from daemon".to_owned()))?;
286
let contents_length: &str = headers
287
- .get("Content-Length")
+ .get("content-length")
288
.chain_err(|| format!("Content-Length is missing: {:?}", headers))?;
289
let contents_length: usize = contents_length
290
.parse()
0 commit comments