Welcome! Log In Create A New Profile

Advanced

[nginx] Perl: fixed $r->header_in("Connection").

Sergey Kandaurov
May 30, 2022 06:34PM
details: https://hg.nginx.org/nginx/rev/0e562a332529
branches:
changeset: 8019:0e562a332529
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon May 30 21:25:25 2022 +0300
description:
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:

src/http/ngx_http_request.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 5119c8150478 -r 0e562a332529 src/http/ngx_http_request.c
--- a/src/http/ngx_http_request.c Mon May 30 02:38:07 2022 +0300
+++ b/src/http/ngx_http_request.c Mon May 30 21:25:25 2022 +0300
@@ -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;

_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[nginx] Perl: fixed $r->header_in("Connection").

Sergey Kandaurov 219 May 30, 2022 06:34PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 251
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready