title: How to correctly handle multiple Set-Cookie headers in Hyper?
body: <p>I'm using Hyper to send HTTP requests, but when multiple cookies are included in the response, Hyper will combine them to one which then fails the parsing procedure.</p>
  
  <p>For example, here's a simple PHP script</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  setcookie("hello", "world");
  setcookie("foo", "bar");
  </code></pre>
  
  <p>Response using curl:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ curl -sLD - http://local.example.com/test.php
  HTTP/1.1 200 OK
  Date: Sat, 24 Dec 2016 09:24:04 GMT
  Server: Apache/2.4.25 (Unix) PHP/7.0.14
  X-Powered-By: PHP/7.0.14
  Set-Cookie: hello=world
  Set-Cookie: foo=bar
  Content-Length: 0
  Content-Type: text/html; charset=UTF-8
  </code></pre>
  
  <p>However for the following Rust code:</p>
  
  <pre><code>let client = Client::new();
  let response = client.get("http://local.example.com/test.php")
      .send()
      .unwrap();
  println!("{:?}", response);
  for header in response.headers.iter() {
      println!("{}: {}", header.name(), header.value_string());
  }
  </code></pre>
  
  <p>...the output will be:</p>
  
  <pre class="lang-none prettyprint-override"><code>Response { status: Ok, headers: Headers { Date: Sat, 24 Dec 2016 09:31:54 GMT, Server: Apache/2.4.25 (Unix) PHP/7.0.14, X-Powered-By: PHP/7.0.14, Set-Cookie: hello=worldfoo=bar, Content-Length: 0, Content-Type: text/html; charset=UTF-8, }, version: Http11, url: "http://local.example.com/test.php", status_raw: RawStatus(200, "OK"), message: Http11Message { is_proxied: false, method: None, stream: Wrapper { obj: Some(Reading(SizedReader(remaining=0))) } } }
  Date: Sat, 24 Dec 2016 09:31:54 GMT
  Server: Apache/2.4.25 (Unix) PHP/7.0.14
  X-Powered-By: PHP/7.0.14
  Set-Cookie: hello=worldfoo=bar
  Content-Length: 0
  Content-Type: text/html; charset=UTF-8
  </code></pre>
  
  <p>This seems to be really weird to me. I used Wireshark to capture the response and there're <strong>two</strong> <code>Set-Cookie</code> headers in it. I also checked the Hyper documentation but got no clue...</p>
  
  <p>I noticed Hyper internally uses a <code>VecMap&lt;HeaderName, Item&gt;</code> to store the headers. So they concatenate the them to one? Then how should I divide them into individual cookies afterwards?</p>