mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
auto merge of #2501 : mbrubeck/servo/host, r=pcwalton
Fixes broken requests caused by #2493.
This commit is contained in:
commit
3a9552b5de
1 changed files with 5 additions and 0 deletions
|
@ -63,7 +63,12 @@ fn load(load_data: LoadData, start_chan: Sender<LoadResponse>) {
|
|||
return;
|
||||
}
|
||||
};
|
||||
|
||||
// Preserve the `host` header set automatically by RequestWriter.
|
||||
let host = writer.headers.host.clone();
|
||||
writer.headers = box load_data.headers.clone();
|
||||
writer.headers.host = host;
|
||||
|
||||
match load_data.data {
|
||||
Some(ref data) => {
|
||||
writer.headers.content_length = Some(data.len());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue