mirror of https://github.com/fafhrd91/actix-web
parent
f70c36eff0
commit
c66233e225
|
@ -345,8 +345,10 @@ impl HttpResponseBuilder {
|
||||||
let parts = self.inner().unwrap();
|
let parts = self.inner().unwrap();
|
||||||
let length = parts.headers.get(header::CONTENT_LENGTH).unwrap().to_str();
|
let length = parts.headers.get(header::CONTENT_LENGTH).unwrap().to_str();
|
||||||
|
|
||||||
if let Ok(length) = length { // length is now of type &str
|
if let Ok(length) = length {
|
||||||
if let Ok(length) = length.parse::<u64>() { //length is now of type u64
|
// length is now of type &str
|
||||||
|
if let Ok(length) = length.parse::<u64>() {
|
||||||
|
//length is now of type u64
|
||||||
// Set no_chunking
|
// Set no_chunking
|
||||||
// Since no_chuking() uses insert_header(),
|
// Since no_chuking() uses insert_header(),
|
||||||
// this will not lead to duplicated header even if it exists
|
// this will not lead to duplicated header even if it exists
|
||||||
|
|
Loading…
Reference in New Issue