summaryrefslogtreecommitdiff
path: root/ext/standard/head.c
diff options
context:
space:
mode:
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;