please help give out the info " nginx -V" , then we can give your help.<br><br>thanks <br>george<br><br><div class="gmail_quote">On Wed, Aug 24, 2011 at 2:44 AM, James Fidell <span dir="ltr"><<a href="mailto:james@cloud9.co.uk">james@cloud9.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I have nginx configured to proxy to an upstream using the following<br>
in nginx.conf:<br>
<br>
http {<br>
    upstream app {<br>
        server localhost:8080;<br>
    }<br>
<br>
    server {<br>
        listen       80;<br>
<br>
        location / {<br>
                proxy_pass <a href="http://app" target="_blank">http://app</a>;<br>
                # proxy_pass_header Content-Length;<br>
        }<br>
    }<br>
}<br>
<br>
The upstream returns some data with the HTTP Content-Length header<br>
set.  Using wget to connect directly I see:<br>
<br>
Connecting to localhost|127.0.0.1|:8080... connected.<br>
HTTP request sent, awaiting response...<br>
  HTTP/1.0 200 OK<br>
  Content-Type: application/x-javascript<br>
  Connection: keep-alive<br>
  Content-Length: 44552<br>
Length: 44552 (44K) [application/x-javascript]<br>
<br>
<br>
When I make a request via nginx however, the Content-Length header is<br>
no longer present (again using wget):<br>
<br>
Connecting to localhost|127.0.0.1|:80... connected.<br>
HTTP request sent, awaiting response...<br>
  HTTP/1.1 200 OK<br>
  Server: nginx/1.0.5<br>
  Date: Tue, 23 Aug 2011 18:40:30 GMT<br>
  Content-Type: application/x-javascript<br>
  Connection: close<br>
Length: unspecified [application/x-javascript]<br>
<br>
<br>
Is there any obvious reason this should be happening, or something I'm<br>
doing wrong?  The proxy_pass_header directive in the configuration file<br>
seems to make no difference to the outcome when I uncomment it.<br>
<br>
Thanks,<br>
James<br>
<br>
______________________________<u></u>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/<u></u>mailman/listinfo/nginx</a><br>
</blockquote></div><br>