summaryrefslogtreecommitdiff
path: root/ext/standard/head.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-07-02 10:30:36 +0200
committerAnatol Belski <ab@php.net>2014-07-02 10:30:36 +0200
commite98d429cc329d13a0451ad7ce11f93bd7d54d1a8 (patch)
tree04512f8c29a0384501fb8de123a55a871d7c431f /ext/standard/head.c
parent84876850ff3e50ee7b85abc7261bdf9038d65e4b (diff)
parent088eedfaa186e79f6f86b814f50efc947350bf88 (diff)
downloadphp-git-e98d429cc329d13a0451ad7ce11f93bd7d54d1a8.tar.gz
Merge remote-tracking branch 'origin/master' into str_size_and_int64
* origin/master: (25 commits) Better fix for bug #67072 with more BC provisions Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion Fix bug #67397 (Buffer overflow in locale_get_display_name->uloc_getDisplayName (libicu 4.8.1)) Fix bug #67349: Locale::parseLocale Double Free Better fix for phpdbg + libedit - fix include - disable coloured prompt only with libedit Fix https://github.com/krakjoe/phpdbg/issues/91 Update copyright year to 2014 Add NEWS. This doesn't need UPGRADING (or an RFC), IMO. Fix broken test. Add a mime type map generation script and update the header. Move the mime type map out of php_cli_server.c for easier generation. Replace the CLI server's linear search for extensions with a hash table. fix test Fixed bug #67399 (putenv with empty variable may lead to crash) Remove superfluous echos. Remove usage of pointless COOKIE_SET_COOKIE constant. Test Added support for parsing ssl certificates using GeneralizedTime format. Fix align indentation ... Conflicts: ext/standard/head.c
Diffstat (limited to 'ext/standard/head.c')
-rw-r--r--ext/standard/head.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/standard/head.c b/ext/standard/head.c
index 5c448867f6..2a6b288034 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -124,7 +124,7 @@ PHPAPI int php_setcookie(char *name, php_size_t name_len, char *value, php_size_
if (expires > 0) {
const char *p;
char tsdelta[13];
- strlcat(cookie, "; expires=", len + 100);
+ strlcat(cookie, COOKIE_EXPIRES, len + 100);
dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, expires, 0 TSRMLS_CC);
/* check to make sure that the year does not exceed 4 digits in length */
p = zend_memrchr(dt, '-', strlen(dt));
@@ -139,7 +139,7 @@ PHPAPI int php_setcookie(char *name, php_size_t name_len, char *value, php_size_
efree(dt);
snprintf(tsdelta, sizeof(tsdelta), "%pd", (php_int_t) difftime(expires, time(NULL)));
- strlcat(cookie, "; Max-Age=", len + 100);
+ strlcat(cookie, COOKIE_MAX_AGE, len + 100);
strlcat(cookie, tsdelta, len + 100);
}
}
@@ -149,18 +149,18 @@ PHPAPI int php_setcookie(char *name, php_size_t name_len, char *value, php_size_
}
if (path && path_len > 0) {
- strlcat(cookie, "; path=", len + 100);
+ strlcat(cookie, COOKIE_PATH, len + 100);
strlcat(cookie, path, len + 100);
}
if (domain && domain_len > 0) {
- strlcat(cookie, "; domain=", len + 100);
+ strlcat(cookie, COOKIE_DOMAIN, len + 100);
strlcat(cookie, domain, len + 100);
}
if (secure) {
- strlcat(cookie, "; secure", len + 100);
+ strlcat(cookie, COOKIE_SECURE, len + 100);
}
if (httponly) {
- strlcat(cookie, "; httponly", len + 100);
+ strlcat(cookie, COOKIE_HTTPONLY, len + 100);
}
ctr.line = cookie;