Welcome! Log In Create A New Profile

Advanced

Re: Content-length Missing when response proxy_pass a special backend

Maxim Dounin
October 09, 2011 04:56PM
Hello!

On Sun, Oct 09, 2011 at 10:26:37AM -0400, fzuslide wrote:

[...]

> Content-Type: application/octet-stream
> Transfer-Encoding: chunked

[...]

> Content-Type: image/jpeg
> Connection: keep-alive
> Content-Length: 1014

[...]

> I need the "Content-Length" for calculating the downloading process in
> client.
> But I really don't know with same config, why "Content-length" missing
> when a special response proxy_pass by nginx, and another is ok.
> Could anybody tell me why? Thanks a lot :)

nginx removes Content-Length header (and uses chunked if possible)
if resulting length after processing isn't known. This happens
e.g. if you use gzip, ssi, sub or addition modules.

> My config:
>
> server {
> listen 192.168.60.96:8000;

[...]

> }

You have to provide full config (i.e. what's on http level?).
Best guess without seeing your config is that you have ssi or
something similar enabled for "application/octet-stream", but not
for "image/jpeg".

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Content-length Missing when response proxy_pass a special backend

fzuslide October 09, 2011 10:26AM

Re: Content-length Missing when response proxy_pass a special backend

Maxim Dounin October 09, 2011 04:56PM

Re: Content-length Missing when response proxy_pass a special backend

fzuslide October 10, 2011 12:03AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 196
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready