diff options
author | Martin Jansen <martin@divbyzero.net> | 2014-05-18 10:45:31 +0200 |
---|---|---|
committer | Martin Jansen <martin@divbyzero.net> | 2014-05-18 10:45:31 +0200 |
commit | 068bf645e1c9952008e08570dad27bb03101e689 (patch) | |
tree | 72025968345d91255cf6fdb6ac7b5346a882d9f6 | |
parent | c5f9a231d5adc8cf8ab9890f0acc27206495a080 (diff) | |
download | php-git-068bf645e1c9952008e08570dad27bb03101e689.tar.gz |
Remove usage of pointless COOKIE_SET_COOKIE constant.
-rw-r--r-- | ext/session/session.c | 2 | ||||
-rw-r--r-- | ext/standard/head.c | 4 | ||||
-rw-r--r-- | ext/standard/head.h | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index c5d710096d..62ebaf28a1 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 6ede184df2..0316903bc6 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 cb9a7f4823..59b1518676 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=" |