summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli_server.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-07-14 11:44:53 +0400
committerDmitry Stogov <dmitry@zend.com>2014-07-14 11:44:53 +0400
commit32e477c98c706303e1935e3af96632a02949137a (patch)
tree18559c9ae62daa74f657019569b62059aee96574 /sapi/cli/php_cli_server.c
parent0ef6f729c91dbe2a4abdeefe9ac112021c7d60b0 (diff)
parent4bdb0120dc26a14d906e2e8a69e841920df3de99 (diff)
downloadphp-git-32e477c98c706303e1935e3af96632a02949137a.tar.gz
Merge branch 'master' into phpng
* master: (40 commits) Bug #67609: TLS connections fail behind HTTP proxy Updated NEWS for #67594 Updated NEWS for #67594 Fix #67594 - invisible colon should be stripped off header name Updated NEWS for 34407 Updated NEWS for 34407 Updated NEWS for 34407 Fix for bug #34407 - ucwords and title case fixed broken merged code Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. fixed broken merged code Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Test output relies on expose_php being on 1.2 is a problematic float to print out Lower the default display precision for this test The test output is dependent on expose_php ini fix makefile in phpize mode fixe output_as_table() when no ext was enabled fix end of stream exception when generating makefile ... Conflicts: ext/standard/http_fopen_wrapper.c ext/standard/string.c sapi/cli/php_cli_server.c
Diffstat (limited to 'sapi/cli/php_cli_server.c')
-rw-r--r--sapi/cli/php_cli_server.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 4b16e97a56..8fe195f6d7 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -1615,10 +1615,13 @@ static int php_cli_server_client_read_request_on_header_value(php_http_parser *p
return 1;
}
{
- char *header_name = zend_str_tolower_dup(client->current_header_name, client->current_header_name_len);
- zend_hash_str_add_ptr(&client->request.headers, header_name, client->current_header_name_len, value);
- zend_hash_str_add_ptr(&client->request.headers_original_case, client->current_header_name, client->current_header_name_len, value);
- efree(header_name);
+ /* strip off the colon */
+ zend_string *orig_header_name = STR_INIT(client->current_header_name, client->current_header_name_len, 1);
+ char *lc_header_name = zend_str_tolower_dup(client->current_header_name, client->current_header_name_len);
+ zend_hash_str_add_ptr(&client->request.headers, lc_header_name, client->current_header_name_len, value);
+ zend_hash_add_ptr(&client->request.headers_original_case, orig_header_name, value);
+ efree(lc_header_name);
+ STR_RELEASE(orig_header_name);
}
if (client->current_header_name_allocated) {