mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Adds content-length to empty-bodied non-GET/HEAD requests
This commit is contained in:
parent
976dbc5155
commit
f257b5fcef
2 changed files with 24 additions and 0 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue