mirror of
https://github.com/servo/servo.git
synced 2025-06-22 08:08:59 +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;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Preserve the `host` header set automatically by RequestWriter.
|
||||||
|
let host = writer.headers.host.clone();
|
||||||
writer.headers = box load_data.headers.clone();
|
writer.headers = box load_data.headers.clone();
|
||||||
|
writer.headers.host = host;
|
||||||
|
|
||||||
match load_data.data {
|
match load_data.data {
|
||||||
Some(ref data) => {
|
Some(ref data) => {
|
||||||
writer.headers.content_length = Some(data.len());
|
writer.headers.content_length = Some(data.len());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue