zendframework/zf2 — pull request #929 by adamlundrigan (2012-03-15 00:42:15+00:00)
Title: [ZF2-169] Allow only first key/value pair to be used as cookie name/value

I think that Enrico's fix for [ZF2-169](http://framework.zend.com/issues/browse/ZF2-169) only fixed part of the problem. [RFC-2109](http://www.ietf.org/rfc/rfc2109.txt) specifies that the name/value pair must be the first K=V pair encountered:
```
The syntax for the Set-Cookie response header is

set-cookie = "Set-Cookie:" cookies
cookies = 1#cookie
cookie = NAME "=" VALUE *(";" cookie-av)
NAME = attr
VALUE = value
cookie-av = "Comment" "=" value
| "Domain" "=" value
| "Max-Age" "=" value
| "Path" "=" value
| "Secure"
| "Version" "=" 1*DIGIT
```
However, the current implementation of ```Zend\Http\Header\SetCookie::fromString``` allows it to be in any position in the header string. The switch structure's default case catches any key which isn't pre-defined and makes that key/value pair the cookie name and value.