Opened 7 years ago

Closed 7 years ago

#248 closed defect (invalid)

Trouble while passing POST request through proxy_pass

Reported by: openid.yandex.ru/emstlk Owned by: somebody
Priority: major Milestone:
Component: nginx-core Version: 1.2.x
Keywords: location, proxy_pass Cc: emstlk@…
uname -a: Linux dev 2.6.32-36-server #79-Ubuntu SMP Tue Nov 8 22:44:38 UTC 2011 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.2.2 TLS SNI support enabled configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6

Description

My nginx config has this section:

location /logging/ {

proxy_pass http://localhost:7773;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;

}

When any client sends POST request with any data, our server(localhost:7773) receives GET request without body.
But when delete last slash in location (like this "location /logging {...}"), it's started work normally.

Change History (1)

comment:1 Changed 7 years ago by mdounin

  • Resolution set to invalid
  • Status changed from new to closed

Most likely reason is that real request is for "/logging" (without trailing "/"), and the request results in a redirect to add trailing "/" with the config provided.

Note: See TracTickets for help on using tickets.