diff --git a/ext/session/session.c b/ext/session/session.c index c5d710096d3c5..62ebaf28a1455 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1355,7 +1355,7 @@ static void php_session_send_cookie(TSRMLS_D) /* {{{ */ e_session_name = php_url_encode(PS(session_name), strlen(PS(session_name)), NULL); e_id = php_url_encode(PS(id), strlen(PS(id)), NULL); - smart_str_appends(&ncookie, COOKIE_SET_COOKIE); + smart_str_appends(&ncookie, "Set-Cookie: "); smart_str_appends(&ncookie, e_session_name); smart_str_appendc(&ncookie, '='); smart_str_appends(&ncookie, e_id); diff --git a/ext/standard/head.c b/ext/standard/head.c index 6ede184df26af..0316903bc6425 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -117,10 +117,10 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t * pick an expiry date in the past */ dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, 1, 0 TSRMLS_CC); - snprintf(cookie, len + 100, "%s%s=deleted; expires=%s; Max-Age=0", COOKIE_SET_COOKIE, name, dt); + snprintf(cookie, len + 100, "Set-Cookie: %s=deleted; expires=%s; Max-Age=0", name, dt); efree(dt); } else { - snprintf(cookie, len + 100, "%s%s=%s", COOKIE_SET_COOKIE, name, value ? encoded_value : ""); + snprintf(cookie, len + 100, "Set-Cookie: %s=%s", name, value ? encoded_value : ""); if (expires > 0) { const char *p; char tsdelta[13]; diff --git a/ext/standard/head.h b/ext/standard/head.h index cb9a7f4823010..59b1518676e78 100644 --- a/ext/standard/head.h +++ b/ext/standard/head.h @@ -21,7 +21,6 @@ #ifndef HEAD_H #define HEAD_H -#define COOKIE_SET_COOKIE "Set-Cookie: " #define COOKIE_EXPIRES "; expires=" #define COOKIE_MAX_AGE "; Max-Age=" #define COOKIE_DOMAIN "; domain="