#1341 Ability to set multiple `WebRes` headers with the same name

tonsky Mon 29 Nov 2010

WebRes#headers is Str:Str map now, so it's impossible to set multiple headers with the same name in a single request (e.g. Set-Cookie to set multiple cookies at once).

Personally I've found that it's possible to set second header inside a first header value:

headers["Set-Cookie"] = "cookie1=abc;Path=/\r\nSet-Cookie: cookie2=def;Path=/"

Obviously it's a hack, it should be supported by WebRes directly, shouldn't it?

brian Mon 29 Nov 2010

In the case of cookies, you should use web::WebRes.cookies

Login or Signup to reply.