Opened 3 months ago

Closed 3 months ago

#2593 closed defect (duplicate)

Stream proxy ptotocol header is not valid

Reported by: zdm@… Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.25.x
Keywords: Cc:
uname -a:
nginx -V: p.25.3

Description

Nginx sends proxy protocol header without triling "\r\n" when unix socket path is too long,

Sample config:

`
strema {

server {

listen *.80;
proxy_pass unix:/var/run/1.socket;
proxy_protocol on;

}

server {

listen unix:/var/run/1.socket prtoxy_protocol;
proxy_pass 127.0.0.1:8080;
proxy_protocol on;

}

}

`

When send simple HTTP GET request to :80 - it;s ok;

But when socket oath is ontr, than 80 chars - nginx sends data like this ( WITHOUT "\r\n" separator after proxy protocol header ):

`
PROXY TCP 1.2.3.4 unix:.... pott1 port2GET
`

Change History (2)

comment:1 by zdm@…, 3 months ago

I am sorry, I forgot to specofy info in ticket header and I am unable to efit it after creation.

unam
`
Linux devel 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
`

nginx
`
nginx version: nginx/1.25.3
built by gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
built with OpenSSL 3.0.2 15 Mar 2022
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/sbin/nginx --with-threads --with-file-aio --with-pcre --with-pcre-jit --with-stream --with-cc-opt='-O2 -g' --with-ld-opt=' -Wl,-E' --with-http_addition_module --with-http_auth_request_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module

`

comment:2 by Roman Arutyunyan, 3 months ago

Resolution: duplicate
Status: newclosed

Duplicate of #2594.

Note: See TracTickets for help on using tickets.