<div dir="ltr">Or if you are sending bytes try.<div><br></div><div><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">exchange</span><span class="gmail-pl-k" 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">.</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">getResponseSender()</span><span class="gmail-pl-k" 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">.</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">send(</span><span class="gmail-pl-smi" 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">ByteBuffer</span><span class="gmail-pl-k" 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">.</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(byteArray));</span><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 7, 2016 at 3:31 PM, Bill O&#39;Neil <span dir="ltr">&lt;<a href="mailto:bill@dartalley.com" target="_blank">bill@dartalley.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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><br></div><div>Try removing the line <span style="font-family:monospace;font-size:10.4px">exchange.<wbr>getResponseHeaders.</span><span style="font-family:monospace;font-size:10.4px">put(<wbr>Headers.CONTENT_LENGTH, html.length)</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Dec 7, 2016 at 3:17 PM, Hicks, Matt <span dir="ltr">&lt;<a href="mailto:matt@matthicks.com" target="_blank">matt@matthicks.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="m_-3949167245482381659m_-7257260311300174859gmail_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_-3949167245482381659m_-7257260311300174859gmail_msg"><br class="m_-3949167245482381659m_-7257260311300174859gmail_msg"></div><font face="monospace" class="m_-3949167245482381659m_-7257260311300174859gmail_msg">exchange.getResponseHeaders.pu<wbr>t(Headers.CONTENT_LENGTH, html.length)<br class="m_-3949167245482381659m_-7257260311300174859gmail_msg">exchange.getResponseHeaders.pu<wbr>t(Headers.CONTENT_TYPE, &quot;text/html&quot;)<br class="m_-3949167245482381659m_-7257260311300174859gmail_msg">exchange.getResponseSender.sen<wbr>d(html)</font><div class="m_-3949167245482381659m_-7257260311300174859gmail_msg"><br class="m_-3949167245482381659m_-7257260311300174859gmail_msg"></div><div class="m_-3949167245482381659m_-7257260311300174859gmail_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></div></div>______________________________<wbr>_________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/undertow-dev</a><br></blockquote></div><br></div>
</blockquote></div><br></div>