Skip to content

Commit

Permalink
Merge branch 'nginxinc:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
elibosley authored Dec 11, 2023
2 parents d25bb41 + 958a4b6 commit 9de33a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/http_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,13 @@ ngx_int_t setHeader(ngx_http_request_t* r, StrView name, StrView value)
return NGX_OK;
}

header = (ngx_table_elt_t*)ngx_list_push(&r->headers_in.headers);
auto headers = &r->headers_in.headers;
if (!headers->pool && ngx_list_init(headers, r->pool, 2,
sizeof(ngx_table_elt_t)) != NGX_OK) {
return NGX_ERROR;
}

header = (ngx_table_elt_t*)ngx_list_push(headers);
if (header == NULL) {
return NGX_ERROR;
}
Expand Down

0 comments on commit 9de33a5

Please sign in to comment.