<div dir="ltr">Strangely enough, removing the CONTENT_LENGTH header fixed it!</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 7, 2016 at 2:33 PM Bill O&#39;Neil &lt;<a href="mailto:bill@dartalley.com">bill@dartalley.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Or if you are sending bytes try.<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre-wrap" class="gmail_msg">exchange</span><span class="m_6573072833660309167gmail-pl-k gmail_msg" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre-wrap">.</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre-wrap" class="gmail_msg">getResponseSender()</span><span class="m_6573072833660309167gmail-pl-k gmail_msg" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre-wrap">.</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre-wrap" class="gmail_msg">send(</span><span class="m_6573072833660309167gmail-pl-smi gmail_msg" style="box-sizing:border-box;color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre-wrap">ByteBuffer</span><span class="m_6573072833660309167gmail-pl-k gmail_msg" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre-wrap">.</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre-wrap" class="gmail_msg">wrap(byteArray));</span><br class="gmail_msg"></div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Wed, Dec 7, 2016 at 3:31 PM, Bill O&#39;Neil <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:bill@dartalley.com" class="gmail_msg" target="_blank">bill@dartalley.com</a>&gt;</span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">It might have something to do with character encoding. You should not need to pass the content length when using the send(String) method it should set it for you.<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Try removing the line <span style="font-family:monospace;font-size:10.4px" class="gmail_msg">exchange.getResponseHeaders.</span><span style="font-family:monospace;font-size:10.4px" class="gmail_msg">put(Headers.CONTENT_LENGTH, html.length)</span></div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><div class="m_6573072833660309167h5 gmail_msg">On Wed, Dec 7, 2016 at 3:17 PM, Hicks, Matt <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:matt@matthicks.com" class="gmail_msg" target="_blank">matt@matthicks.com</a>&gt;</span> wrote:<br class="gmail_msg"></div></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="m_6573072833660309167h5 gmail_msg"><div dir="ltr" class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg">I&#39;ve got a fairly simplistic scenario (using 1.4.6.Final) where I&#39;m building an HTML String and then sending it to my exchange:<div class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg"><br class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg"></div><font face="monospace" class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg">exchange.getResponseHeaders.put(Headers.CONTENT_LENGTH, html.length)<br class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg">exchange.getResponseHeaders.put(Headers.CONTENT_TYPE, &quot;text/html&quot;)<br class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg">exchange.getResponseSender.send(html)</font><div class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg"><br class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg"></div><div class="m_6573072833660309167m_-3949167245482381659m_-7257260311300174859gmail_msg gmail_msg">However, very often the last one to three characters don&#39;t seem to be received by the browser.  I&#39;ve logged the HTML before outputting so I know that I&#39;m adding the &quot;&lt;/html&gt;&quot; at the end, but in order to get everything properly to the browser I have to append a few spaces to the end of my HTML so it doesn&#39;t get clipped.  Is there something I&#39;m missing that needs to be done to make sure the content is flushed appropriately?</div></div></div></div>
<br class="gmail_msg"></div></div>_______________________________________________<br class="gmail_msg">
undertow-dev mailing list<br class="gmail_msg">
<a href="mailto:undertow-dev@lists.jboss.org" class="gmail_msg" target="_blank">undertow-dev@lists.jboss.org</a><br class="gmail_msg">
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div>
</blockquote></div><br class="gmail_msg"></div>
</blockquote></div>