nginx throws a 502 (invalid header) when downloading a file attachment if filename has a space character

Kunal Pariani kunalvjti at
Mon Mar 24 21:27:29 UTC 2014

Never mind there's nothing wrong with nginx here.
It was one of the response headers sent by an upstream server (mainly
2013923 10H56M56S633_PV.doc�) including this non-ascii char '?' which the
nginx didn't like and hence flagged it saying that it received an invalid


On Mon, Mar 24, 2014 at 2:09 PM, Lukas Tribus <luky-37 at> wrote:

> > hmm..thanks Lukas.
> > So its my backend server only which is causing this issue.
> From the information provided in this thread, I can't tell.
> We would need the exact response header that makes nginx return
> the 502 response plus detailed informations about your setup (output
> of nginx -v and your configuration).
> Regards,
> Lukas
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list