com php-src: Remove usage of pointless COOKIE_SET_COOKIE constant.: ext/session/session.c ext/standard/head. c ext/standard/head.h

From: Date: Sun, 18 May 2014 08:45:31 +0000
Subject: com php-src: Remove usage of pointless COOKIE_SET_COOKIE constant.: ext/session/session.c ext/standard/head. c ext/standard/head.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78854@lists.php.net to get a copy of this message
Commit: 068bf645e1c9952008e08570dad27bb03101e689 Author: Martin Jansen <martin@divbyzero.net> Sun, 18 May 2014 10:45:31 +0200 Parents: c5f9a231d5adc8cf8ab9890f0acc27206495a080 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=068bf645e1c9952008e08570dad27bb03101e689 Log: Remove usage of pointless COOKIE_SET_COOKIE constant. Changed paths: M ext/session/session.c M ext/standard/head.c M ext/standard/head.h Diff: diff --git a/ext/session/session.c b/ext/session/session.c index c5d7100..62ebaf2 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 6ede184..0316903 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 cb9a7f4..59b1518 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="

« previous php.cvs (#78854) next »