comparison src/http/ngx_http_request.c @ 8019:0e562a332529

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 30 May 2022 21:25:25 +0300
parents 65946a191197
children ef6a3a99a81a
comparison
equal deleted inserted replaced
8018:5119c8150478 8019:0e562a332529
1825 1825
1826 static ngx_int_t 1826 static ngx_int_t
1827 ngx_http_process_connection(ngx_http_request_t *r, ngx_table_elt_t *h, 1827 ngx_http_process_connection(ngx_http_request_t *r, ngx_table_elt_t *h,
1828 ngx_uint_t offset) 1828 ngx_uint_t offset)
1829 { 1829 {
1830 if (ngx_http_process_header_line(r, h, offset) != NGX_OK) {
1831 return NGX_ERROR;
1832 }
1833
1830 if (ngx_strcasestrn(h->value.data, "close", 5 - 1)) { 1834 if (ngx_strcasestrn(h->value.data, "close", 5 - 1)) {
1831 r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE; 1835 r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE;
1832 1836
1833 } else if (ngx_strcasestrn(h->value.data, "keep-alive", 10 - 1)) { 1837 } else if (ngx_strcasestrn(h->value.data, "keep-alive", 10 - 1)) {
1834 r->headers_in.connection_type = NGX_HTTP_CONNECTION_KEEP_ALIVE; 1838 r->headers_in.connection_type = NGX_HTTP_CONNECTION_KEEP_ALIVE;