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
This commit is contained in:
Dmitry Stogov 2014-07-14 11:44:53 +04:00
commit 32e477c98c
17 changed files with 137 additions and 59 deletions

View file

@ -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) {