Opened 4 years ago

Last modified 2 months ago

#1850 accepted defect

Content of the variable $sent_http_connection is incorrect

Reported by: pug40@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.16.x
Keywords: $sent_http_connection, sent_http Cc:
uname -a: Linux anyhost 4.4.6-gentoo #1 SMP Wed Apr 27 01:16:58 MSK 2016 x86_64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz GenuineIntel GNU/Linux
nginx -V: nginx version: nginx/1.16.0
built with OpenSSL 1.0.2r 26 Feb 2019
TLS SNI support enabled
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error_log --pid-path=/run/ --lock-path=/run/lock/nginx.lock --with-cc-opt='-I/usr/include -DNGX_HAVE_INET6=0' --with-ld-opt=-L/usr/lib64 --http-log-path=/var/log/nginx/access_log --http-client-body-temp-path=/var/lib/nginx/tmp/client --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-compat --with-http_v2_module --with-pcre --without-http_autoindex_module --without-http_browser_module --without-http_empty_gif_module --without-http_geo_module --without-http_grpc_module --without-http_limit_conn_module --without-http_map_module --without-http_memcached_module --without-http_mirror_module --without-http_referer_module --without-http_scgi_module --without-http_ssi_module --without-http_split_clients_module --without-http_upstream_hash_module --without-http_upstream_ip_hash_module --without-http_upstream_keepalive_module --without-http_upstream_least_conn_module --without-http_upstream_zone_module --without-http_userid_module --without-http_uwsgi_module --with-http_realip_module --with-http_ssl_module --without-stream_access_module --without-stream_geo_module --without-stream_limit_conn_module --without-stream_map_module --without-stream_return_module --without-stream_split_clients_module --without-stream_upstream_hash_module --without-stream_upstream_least_conn_module --without-stream_upstream_zone_module --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module --user=nginx --group=nginx


There is a suspicion that the content of the variable $sent_http_connection is incorrect.

Expected: keep-alive
Actually: close

Host: anyhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
Accept: image/webp,*/*
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://anyhost/catalog/page/
Cookie: PHPSESSID=vkgt1iiofoav3u24o54et46oc7
Pragma: no-cache

HTTP/1.1 200 OK
Server: nginx
Date: Sun, 15 Sep 2019 22:28:53 GMT
Content-Type: image/jpeg
Content-Length: 21576
Last-Modified: Wed, 06 Dec 2017 15:38:23 GMT
Connection: keep-alive
ETag: "5a280eef-5448"
X-Content-Type-Options: nosniff
Accept-Ranges: bytes

log_format test

'$remote_addr - $remote_user [$time_local] '
'$status $bytes_sent $request_time $pipe $connection $connection_requests $http_connection $sent_http_connection '
'"$request" '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"'; - - [16/Sep/2019:01:28:53 +0300] 200 21844 0.000 . 13117169 3 keep-alive close "GET /images/anypicture.jpg HTTP/1.0" "http://anyhost/catalog/page/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0" "-"

Change History (3)

comment:1 by Maxim Dounin, 4 years ago

Status: newaccepted

Thanks, this is known issue, see here for example - $keepalive and $sent_http_connection variables are wrong at logging stage.

in reply to:  1 comment:2 by…, 7 months ago

Replying to Maxim Dounin:

Thanks, this is known issue, see here for example - $keepalive and $sent_http_connection variables are wrong at logging stage.

Hi Maxim I know this issue is 3 years old but the issue is still being experienced in current version of Nginx, any chance we can get this minor issue pushed through somehow?

Last edited 7 months ago by… (previous) (diff)

comment:3 by liverpool8056@…, 2 months ago

Really hope this could be fixed.

Note: See TracTickets for help on using tickets.