502 Bad Gateway when downloading file

sogi nginx-forum at nginx.us
Sat Oct 15 23:51:43 UTC 2011


Hello all.
I have topology as follows:
client->NGINX->haproxy-> 4xapache servers.

Problem is, that on one page, we have option to download file - it is
done through changing header. Resulting header is as follows:
Content-type: application/txt                                           
                                                                        
                                                            
Content-Length: "xxxxx"                                                 
                                                                        
                                              
Content-Disposition: attachment; filename="aaa.txt"

I'm getting 502 Bad Gateway, The server returned an invalid or
incomplete response error everytime after clicking on link. In logs,
there is nothing weird. When trying it directly through HAPROXY or
directly through nginx (pointed to one of that apache servers) it is
working correctly.

Do you have any idea about how to resolve it? Have anybody experienced
something like this?
Many thanks for any reply concerning this.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,216759,216759#msg-216759



More information about the nginx mailing list