September 23, 2013 02:34PM
I'm trying to setup a nginx (1.4.1) reverse proxy to a HornetQ API using this configuration:

proxy_http_version 1.1;
proxy_set_header Host $host;
upstream app {
keepalive 8;
server {
server_name localhost;
location / { deny all; }
location = /messaging/ {
proxy_pass http://app/messaging/;
proxy_buffering off;

After a lot of tcpdumping I see that that nginx removes the Transfer-Encoding header and sets the Content-Length header in place of it, which the length of the first 'chunk'. After that the connection gets reset.

When sending the following headers:

POST /messaging/ HTTP/1.1
Host: localhost
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Content-Transfer-Encoding: binary

nginx will forward them like:

POST /messaging/ HTTP/1.1
Host: localhost
Content-Length: 60
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary

Is this normal behaviour?
Subject Author Posted

reverse proxy removes Transfer-Encoding: chunked

Pommi September 23, 2013 02:34PM

Re: reverse proxy removes Transfer-Encoding: chunked

Maxim Dounin September 23, 2013 03:44PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
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