Skip to content

bugfix: Fix handling of new list elements #2177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ env:
- LD_LIBRARY_PATH=$LUAJIT_LIB:$LD_LIBRARY_PATH
- DRIZZLE_VER=2011.07.21
- TEST_NGINX_SLEEP=0.006
- MALLOC_PERTURB_=9
jobs:
- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d
- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1s OPENSSL_PATCH_VER=1.1.1f
Expand Down
3 changes: 3 additions & 0 deletions src/ngx_http_lua_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ ngx_http_lua_ngx_redirect(lua_State *L)

h->value.len = len;
h->value.data = uri;
#if defined(nginx_version) && nginx_version >= 1023000
h->next = NULL;
#endif
ngx_str_set(&h->key, "Location");

r->headers_out.status = rc;
Expand Down
3 changes: 3 additions & 0 deletions src/ngx_http_lua_headers_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_lua_header_val_t *hv,

h->key = hv->key;
h->value = *value;
#if defined(nginx_version) && nginx_version >= 1023000
h->next = NULL;
#endif

h->lowcase_key = ngx_pnalloc(r->pool, h->key.len);
if (h->lowcase_key == NULL) {
Expand Down
3 changes: 3 additions & 0 deletions src/ngx_http_lua_headers_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_lua_header_val_t *hv,

h->key = hv->key;
h->value = *value;
#if defined(nginx_version) && nginx_version >= 1023000
h->next = NULL;
#endif

h->lowcase_key = ngx_pnalloc(r->pool, h->key.len);
if (h->lowcase_key == NULL) {
Expand Down
3 changes: 3 additions & 0 deletions src/ngx_http_lua_subrequest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,9 @@ ngx_http_lua_copy_request_headers(ngx_http_request_t *sr,

clh->hash = ngx_http_lua_content_length_hash;
clh->key = ngx_http_lua_content_length_header_key;
#if defined(nginx_version) && nginx_version >= 1023000
clh->next = NULL;
#endif
clh->lowcase_key = ngx_pnalloc(sr->pool, clh->key.len);
if (clh->lowcase_key == NULL) {
return NGX_ERROR;
Expand Down