Adds content-length to empty-bodied non-GET/HEAD requests

This commit is contained in:
Sam Gibson 2015-08-30 12:09:53 +10:00
parent 976dbc5155
commit f257b5fcef
2 changed files with 24 additions and 0 deletions

View file

@ -533,6 +533,10 @@ pub fn load<A>(load_data: LoadData,
try!(req.send(&load_data.data))
}
_ => {
if load_data.method != Method::Get && load_data.method != Method::Head {
req.headers_mut().set(ContentLength(0))
}
send_request_to_devtools(
devtools_chan.clone(), request_id.clone(), url.clone(),
method.clone(), load_data.headers.clone(),