Fixes setcookie to only send one Set-Cookie header per name

According to the IETF RFC 6265, only one Set-Cookie header should be sent per cookie name.

Fixes https://bugs.php.net/bug.php?id=67736

Cherry-picks and adapts 208deda (#795) for master
Sure, I'll see how I can phrase this.
Le 28 sept. 2014 07:38, "Xinchen Hui" <notifications@github.com> a écrit :

> In ext/standard/head.c:
>
> > @@ -92,6 +93,13 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t
> >  		return FAILURE;
> >  	}
> >
> > +	if (zend_hash_exists(SG(cookies), z_name) == 1) {
> > +		php_error_docref(NULL TSRMLS_CC, E_WARNING, "should not be used twice with the same name");
>
> it's better also print the duplicated cookie name here
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/php/php-src/pull/849/files#r18127724>.
>