Cannot remove Content Length header

Maxim Dounin mdounin at mdounin.ru
Sat Sep 24 14:54:47 UTC 2011


Hello!

On Sat, Sep 24, 2011 at 02:58:59PM +0200, Luc Juggery wrote:

> Hello,
> 
> thanks for your answers.
> Maxim, what would you recommend to fix the backend ? I do not really see where could be the violation in fact.

Backend MUST NOT (as per RFC 2616) return chunked to HTTP/1.0 
clients, while nginx uses HTTP/1.0 to talk to backends.

See RFC 2616, "3.6 Transfer Codings"
http://tools.ietf.org/html/rfc2616#section-3.6

   ... A server MUST NOT send transfer-codings to an HTTP/1.0
   client.

Maxim Dounin

> 
> --
> Luc
> 
> Le Sep 24, 2011 à 14:05, Maxim Dounin <mdounin at mdounin.ru> a écrit :
> 
> > Hello!
> > 
> > On Sat, Sep 24, 2011 at 01:43:12PM +0200, Luc Juggery wrote:
> > 
> >> Hello,
> >> 
> >> I'm using Nginx as a front end to my node.js application, nginx proxying
> >> https request to my app.
> >> When the browser gets the response back, instead of pure json
> >> ({"error":"query error","message":"Parameter(s) missing: user,password"}), I
> >> receive something like:
> >> 
> >> 47
> >> {"error":"query error","message":"Parameter(s) missing: user,password"}
> >> 0
> > 
> > This is chunked encoding, likely sent by your backend in violation 
> > of HTTP specification.
> > 
> > Right now there are two options available:
> > 
> > 1. Fix your backend.
> > 
> > 2. Upgrade to nginx 1.1.4, it has code needed to talk to such 
> > broken backends.
> > 
> > Maxim Dounin
> > 
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list