Welcome! Log In Create A New Profile

Advanced

[PATCH 01 of 20] Perl: fixed $r->header_in("Connection")

Maxim Dounin
April 20, 2022 06:36PM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1650492314 -10800
# Thu Apr 21 01:05:14 2022 +0300
# Node ID e70fb0fdfbc0fb7b7e9f493cc2eb65de617b115a
# Parent a736a7a613ea6e182ff86fbadcb98bb0f8891c0b
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.

diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
--- 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;


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

[PATCH 01 of 20] Perl: fixed $r->header_in("Connection")

Maxim Dounin 360 April 20, 2022 06:36PM



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

Online Users

Guests: 119
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready