aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/net/http_loader.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/net/http_loader.rs b/src/components/net/http_loader.rs
index 318354df96b..e29eec904f3 100644
--- a/src/components/net/http_loader.rs
+++ b/src/components/net/http_loader.rs
@@ -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());