summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2014-10-16 21:28:40 -0700
committerRasmus Lerdorf <rasmus@php.net>2014-10-16 21:28:40 -0700
commita9d6556971a435f71eabf142d8fb814382f3b6ac (patch)
tree4fecce88bbc1bc3259856eb0314d780184de85eb /main/SAPI.c
parent86674b5837bffe4486714f9661620020ee498f3b (diff)
parent176b8d7ca3aef3a172d8e429627c98e0328d02d8 (diff)
downloadphp-git-a9d6556971a435f71eabf142d8fb814382f3b6ac.tar.gz
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (1132 commits) Micro optimizations for isset/empty Micro optimization for zend_hash_next_index_insert_new() Fix array_keys() on $GLOBALS Fix procedural finfo calls in methods Fix allocator for 64bit zend_long with 32bit long Use intptr_t for zend_intptr_t typedef Fix format strings in zend_alloc Drop zend_long64 in favor of int64_t Removed deprecated fields NEWS cleanup NEWS removing the NEWS entry as we had to revert this fix for now Revert "Merge branch 'PHP-5.5' into PHP-5.6" Revert "fix TS build" Revert "Merge branch 'PHP-5.4' into PHP-5.5" Revert "Bug #67965: Fix blocking behavior in non-blocking crypto streams" Revert "Bug #41631: Fix regression from first attempt (6569db8)" NEWS Fixed Bug #65171 imagescale() fails Fixed bug #68234 ...
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 9d8a19dc6d..50ea8c0a16 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
@@ -269,7 +269,7 @@ SAPI_API int sapi_read_post_block(char *buffer, size_t buflen TSRMLS_DC)
SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
{
if ((SG(post_max_size) > 0) && (SG(request_info).content_length > SG(post_max_size))) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes",
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %pd bytes exceeds the limit of %pd bytes",
SG(request_info).content_length, SG(post_max_size));
return;
}
@@ -290,7 +290,7 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
}
if ((SG(post_max_size) > 0) && (SG(read_post_bytes) > SG(post_max_size))) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds " ZEND_INT_FMT " bytes", SG(post_max_size));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds " ZEND_LONG_FMT " bytes", SG(post_max_size));
break;
}
@@ -739,7 +739,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
return SUCCESS;
} else {
/* new line/NUL character safety check */
- int i;
+ uint i;
for (i = 0; i < header_line_len; i++) {
/* RFC 2616 allows new lines if followed by SP or HT */
int illegal_break =
@@ -789,9 +789,9 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
/* Disable possible output compression for images */
if (!strncmp(ptr, "image/", sizeof("image/")-1)) {
- zend_string *key = STR_INIT("zlib.output_compression", sizeof("zlib.output_compression")-1, 0);
- zend_alter_ini_entry(key, "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
- STR_RELEASE(key);
+ zend_string *key = zend_string_init("zlib.output_compression", sizeof("zlib.output_compression")-1, 0);
+ zend_alter_ini_entry_chars(key, "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+ zend_string_release(key);
}
mimetype = estrdup(ptr);
@@ -817,10 +817,10 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
* do disable compression altogether. This contributes to making scripts
* portable between setups that have and don't have zlib compression
* enabled globally. See req #44164 */
- zend_string *key = STR_INIT("zlib.output_compression", sizeof("zlib.output_compression")-1, 0);
- zend_alter_ini_entry(key,
+ zend_string *key = zend_string_init("zlib.output_compression", sizeof("zlib.output_compression")-1, 0);
+ zend_alter_ini_entry_chars(key,
"0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
- STR_RELEASE(key);
+ zend_string_release(key);
} else if (!STRCASECMP(header_line, "Location")) {
if ((SG(sapi_headers).http_response_code < 300 ||
SG(sapi_headers).http_response_code > 399) &&
@@ -984,7 +984,7 @@ SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zva
return SUCCESS;
}
-SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D) TSRMLS_DC)
+SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, size_t val_len, size_t *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D) TSRMLS_DC)
{
if (SG(sapi_started) && EG(current_execute_data)) {
return FAILURE;