<div dir="ltr">I&#39;m not, channel does it.<div><br></div><div>Problem is present on both. For example, home page has a content-length header but jquery.js use chunked.</div><div><br></div><div>Do I have to call .endExchange? or closing the output stream is enough?</div><div><br></div><div>Thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 18, 2015 at 9:48 PM, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Another question, are you setting a content length on the responses? If not the channel will automatically set one if the response fits inside a buffer, otherwise chunked encoding will be used.<br>
<br>
It might be helpful to know if this only happens on chunked, fixed length or both.<br>
<br>
Stuart<br>
<br>
Edgar Espina wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
latest: 1.2.0.Beta8<br>
<br>
On Sun, Jan 18, 2015 at 9:42 PM, Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a><br></span><span class="">
&lt;mailto:<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;&gt; wrote:<br>
<br>
    Also what version of Undertow are you using?<br>
<br>
    Stuart<br>
<br>
    ----- Original Message -----<br>
    &gt;  From: &quot;Edgar Espina&quot; &lt;<a href="mailto:espina.edgar@gmail.com" target="_blank">espina.edgar@gmail.com</a><br></span><span class="">
    &lt;mailto:<a href="mailto:espina.edgar@gmail.com" target="_blank">espina.edgar@gmail.com</a><u></u>&gt;&gt;<br>
     &gt; To: &quot;Stuart Douglas&quot; &lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a><br></span><span class="">
    &lt;mailto:<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;&gt;<br>
     &gt; Cc: <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
    &lt;mailto:<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.<u></u>jboss.org</a>&gt;<br>
     &gt; Sent: Monday, 19 January, 2015 11:13:21 AM<br>
     &gt; Subject: Re: [undertow-dev] occasional 502 from Apache HTTP Proxy<br>
     &gt;<br>
     &gt; found this in apache:<br>
     &gt;<br>
     &gt; (104) Connection reset by peer: proxy: error reading status line from<br>
     &gt; remote server<br>
     &gt;<br>
     &gt; but nothing in undertow.<br>
     &gt;<br>
     &gt; got 502 on HTTP GET. Sometimes while calling the home page / or<br>
    when page<br>
     &gt; loads OK, got 502 on page resources (js, css, images).<br>
     &gt;<br>
     &gt; I call startBlocking and use the outputstream to write the<br>
    response, when<br>
     &gt; everything has been written I call the &quot;outputstream.close&quot;<br>
    method. Do I<br>
     &gt; need to call exchange.endExchange too?<br>
     &gt;<br>
     &gt; Thanks<br>
     &gt;<br>
     &gt; On Sun, Jan 18, 2015 at 8:52 PM, Stuart Douglas<br></span><span class="">
    &lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a> &lt;mailto:<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;&gt; wrote:<br>
     &gt;<br>
     &gt; &gt; Is there any info in the log? Or is there any specific type of<br>
    request<br>
     &gt; &gt; that causes this?<br>
     &gt; &gt;<br>
     &gt; &gt; Stuart<br>
     &gt; &gt;<br>
     &gt; &gt;<br>
     &gt; &gt; ----- Original Message -----<br>
     &gt; &gt; &gt; From: &quot;Edgar Espina&quot; &lt;<a href="mailto:espina.edgar@gmail.com" target="_blank">espina.edgar@gmail.com</a><br></span><div><div class="h5">
    &lt;mailto:<a href="mailto:espina.edgar@gmail.com" target="_blank">espina.edgar@gmail.com</a><u></u>&gt;&gt;<br>
     &gt; &gt; &gt; To: <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
    &lt;mailto:<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.<u></u>jboss.org</a>&gt;<br>
     &gt; &gt; &gt; Sent: Monday, 19 January, 2015 9:42:19 AM<br>
     &gt; &gt; &gt; Subject: [undertow-dev] occasional 502 from Apache HTTP Proxy<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; Hi,<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; I&#39;ve an Undertow application behind apache reverse proxy,<br>
    trying to load<br>
     &gt; &gt; a<br>
     &gt; &gt; &gt; page displays error 502 proxy error.<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; Still couldn&#39;t find why so I wonder if any of you find a<br>
    similar problem<br>
     &gt; &gt; with<br>
     &gt; &gt; &gt; Undertow and Apache.<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; Please note this is our first app on top of Undertow,<br>
    existing apps<br>
     &gt; &gt; running<br>
     &gt; &gt; &gt; on Tomcat/Jetty are OK.<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; Appreciate any help.<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; Thanks<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; --<br>
     &gt; &gt; &gt; edgar<br>
     &gt; &gt; &gt;<br>
     &gt; &gt; &gt; ______________________________<u></u>_________________<br>
     &gt; &gt; &gt; undertow-dev mailing list<br>
     &gt; &gt; &gt; <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br></div></div>
    &lt;mailto:<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.<u></u>jboss.org</a>&gt;<span class=""><br>
     &gt; &gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/undertow-dev</a><br>
     &gt; &gt;<br>
     &gt;<br>
     &gt;<br>
     &gt;<br>
     &gt; --<br>
     &gt; edgar<br>
     &gt;<br>
<br>
<br>
<br>
<br>
--<br>
edgar<br>
</span></blockquote>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">edgar</div>
</div>