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
16221622static void php_cli_server_client_save_header (php_cli_server_client * client )
16231623{
16241624 /* 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);
16261626 zend_string * lc_header_name = zend_string_tolower_ex (client -> current_header_name , /* persistent */ true);
16271627 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);
16291631 zend_string_release_ex (lc_header_name , /* persistent */ true);
16301632
16311633 client -> current_header_name = NULL ;
You can’t perform that action at this time.
0 commit comments