Skip to content

Commit

Permalink
fix scope
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFreeman committed Aug 21, 2024
1 parent acb856b commit 9c146c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext-src/swoole_http_response.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,11 @@ void HttpContext::build_header(String *http_buffer, const char *body, size_t len
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(zheader), num_key, string_key, zvalue) {
if (!string_key) {
string_key = zend_long_to_str(num_key);
zend::String key(string_key, false);
} else {
zend_string_addref(string_key);
}
zend::String key(string_key, false);

int key_header = parse_header_name(ZSTR_VAL(string_key), ZSTR_LEN(string_key));

if (key_header > 0) {
Expand Down

0 comments on commit 9c146c3

Please sign in to comment.