File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1622,10 +1622,12 @@ static int php_cli_server_client_read_request_on_fragment(php_http_parser *parse
1622
1622
static void php_cli_server_client_save_header (php_cli_server_client * client )
1623
1623
{
1624
1624
/* strip off the colon */
1625
- // TODO Need to duplicate original header and make persistent?
1625
+ zend_string * perm_header_name = zend_string_dup ( client -> current_header_name , /* persistent */ true);
1626
1626
zend_string * lc_header_name = zend_string_tolower_ex (client -> current_header_name , /* persistent */ true);
1627
1627
zend_hash_add_ptr (& client -> request .headers , lc_header_name , client -> current_header_value );
1628
- zend_hash_add_ptr (& client -> request .headers_original_case , client -> current_header_name , client -> current_header_value );
1628
+ zend_hash_add_ptr (& client -> request .headers_original_case , perm_header_name , client -> current_header_value );
1629
+
1630
+ zend_string_release_ex (client -> current_header_name , /* persistent */ false);
1629
1631
zend_string_release_ex (lc_header_name , /* persistent */ true);
1630
1632
1631
1633
client -> current_header_name = NULL ;
You can’t perform that action at this time.
0 commit comments