File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1623,12 +1623,14 @@ static void php_cli_server_client_save_header(php_cli_server_client *client)
16231623 zval tmp ;
16241624 ZVAL_STR (& tmp , client -> current_header_value );
16251625 /* strip off the colon */
1626+ zend_string * perm_header_name = zend_string_dup (client -> current_header_name , /* persistent */ true);
16261627 zend_string * lc_header_name = zend_string_tolower_ex (client -> current_header_name , /* persistent */ true);
16271628
16281629 /* Add the wrapped zend_string to the HashTable */
16291630 zend_hash_add (& client -> request .headers , lc_header_name , & tmp );
1630- zend_hash_add (& client -> request .headers_original_case , client -> current_header_name , & tmp );
1631+ zend_hash_add (& client -> request .headers_original_case , perm_header_name , & tmp );
16311632
1633+ zend_string_release_ex (client -> current_header_name , /* persistent */ false);
16321634 zend_string_release_ex (lc_header_name , /* persistent */ true);
16331635
16341636 client -> current_header_name = NULL ;
You can’t perform that action at this time.
0 commit comments