We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cab063 commit 4bc4f1fCopy full SHA for 4bc4f1f
src/client/mod.rs
@@ -302,14 +302,15 @@ impl<'a> RequestBuilder<'a> {
302
message.set_proxied(true);
303
}
304
305
- let mut headers = match headers {
306
- Some(ref headers) => headers.clone(),
307
- None => Headers::new(),
308
- };
309
- headers.set(Host {
+ let mut h = Headers::new();
+ h.set(Host {
310
hostname: host.to_owned(),
311
port: Some(port),
312
});
+ if let Some(ref headers) = headers {
+ h.extend(headers.iter());
+ }
313
+ let headers = h;
314
Request::with_headers_and_message(method.clone(), url.clone(), headers, message)
315
};
316
0 commit comments