<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="">The message indicate that upstream server returned invalid<br></div>
response, or at least nginx thinks it is invalid. If you think<br>
that response returned is valid, it's good idea to actually<br>
provide what was returned, as well as nginx's debug log.<br>
<br><br><span class=""><font color="#888888">
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" target="_blank">http://nginx.org/</a></font></span></blockquote><div><br></div><div>Thank you.</div><div>You were right. It turned out JBoss (or one of its components) gave a strange response in HTTP 1.1 chunked transfer... but without chunk sizes.</div>
<div>I solved it by adding these two directives:</div><div><br></div><div><div>+ proxy_http_version 1.1;</div><div>+ proxy_set_header Connection "";</div><div><br></div></div><div><br></div><div><br></div>
<div> </div></div>
</div></div>