change Host header to have hostname and port

This commit is contained in:
Sean McArthur
2014-10-22 18:27:59 -07:00
parent 224cc709c3
commit 19045a2376
4 changed files with 76 additions and 35 deletions

View File

@@ -447,7 +447,7 @@ mod tests {
fn test_headers_show() {
let mut headers = Headers::new();
headers.set(ContentLength(15));
headers.set(Host("foo.bar".into_string()));
headers.set(Host { hostname: "foo.bar".into_string(), port: None });
let s = headers.to_string();
// hashmap's iterators have arbitrary order, so we must sort first