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

Kunal Pariani kunalvjti at
Sun Mar 23 22:35:54 UTC 2014

I have nginx set as a reverse proxy for a mail server and it throws this
502 (invalid header) error while trying to fetch a file with a space in the
filename. Any clues on where is this bug in the nginx code ? I searched on
the net and found this one forum but it points to some issue in the java
code (not sure where that is as nginx is pretty much in C :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list