<div dir="ltr">Thank you, Stuart.<div><br></div><div>I do have a related question: should a 304 response set a Content-Length: 0? Don&#39;t think so, right?</div><div><br></div><div>Today, Undertow set a content-length of 0 on 304 responses.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 16, 2015 at 12:29 AM, 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">This is indeed a bug, however it should have been fixed as part of <a href="https://issues.jboss.org/browse/UNDERTOW-180" target="_blank">https://issues.jboss.org/browse/UNDERTOW-180</a>.<br>
<br>
Looking at the code it appears that AsyncSenderImpl also has this issue, I will fix it up (<a href="https://issues.jboss.org/browse/UNDERTOW-385" target="_blank">https://issues.jboss.org/browse/UNDERTOW-385</a>).<br>
<br>
Stuart<br>
<div><div class="h5"><br>
----- Original Message -----<br>
&gt; From: &quot;Edgar Espina&quot; &lt;<a href="mailto:espina.edgar@gmail.com">espina.edgar@gmail.com</a>&gt;<br>
&gt; To: <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt; Sent: Tuesday, 10 February, 2015 10:36:20 PM<br>
&gt; Subject: [undertow-dev] transfer-encoding vs content-length with small        response<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I know that Undertow figure it out a content-length or transfer-encoding<br>
&gt; header when none of them was set. That&#39;s good and it works as expected.<br>
&gt;<br>
&gt; It seems to be a problem when you explicitly set the &quot;Transfer-Encoding&quot;<br>
&gt; header bc Undertow, still add the Content-Length (on small responses?) but<br>
&gt; it doesn&#39;t remove the Transfer-Encoding header.<br>
&gt;<br>
&gt; On such cases, the response contains both headers, which I think it&#39;s wrong,<br>
&gt; no?<br>
&gt;<br>
&gt; --<br>
&gt; edgar<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; undertow-dev mailing list<br>
&gt; <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">edgar</div>
</div>