diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2022-05-30 21:25:25 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2022-05-30 21:25:25 +0300 |
commit | 8ad0f62863aaa7ed64b4514c4c1d3ba924410c16 (patch) | |
tree | 1a0f9233db35e8fb780bbf48632a5c643ba5be74 /src/http/ngx_http_request.c | |
parent | a4eddea7112cf5db86bea5ab9c8dcc597f2a1344 (diff) | |
download | nginx-8ad0f62863aaa7ed64b4514c4c1d3ba924410c16.tar.gz nginx-8ad0f62863aaa7ed64b4514c4c1d3ba924410c16.zip |
Perl: fixed $r->header_in("Connection").
Previously, the r->header_in->connection pointer was never set despite
being present in ngx_http_headers_in, resulting in incorrect value returned
by $r->header_in("Connection") in embedded perl.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 013b7158e..44e4d89de 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1827,6 +1827,10 @@ static ngx_int_t ngx_http_process_connection(ngx_http_request_t *r, ngx_table_elt_t *h, ngx_uint_t offset) { + if (ngx_http_process_header_line(r, h, offset) != NGX_OK) { + return NGX_ERROR; + } + if (ngx_strcasestrn(h->value.data, "close", 5 - 1)) { r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE; |