<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.getResponseHeaders.</span><wbr style="font-family:monospace;font-size:10.4px"><span style="font-family:monospace;font-size:10.4px">put(Headers.CONTENT_LENGTH, html.length)</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 7, 2016 at 3:17 PM, Hicks, Matt <span dir="ltr"><<a href="mailto:matt@matthicks.com" target="_blank">matt@matthicks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="m_-7257260311300174859gmail_msg">I've got a fairly simplistic scenario (using 1.4.6.Final) where I'm building an HTML String and then sending it to my exchange:<div class="m_-7257260311300174859gmail_msg"><br class="m_-7257260311300174859gmail_msg"></div><font face="monospace" class="m_-7257260311300174859gmail_msg">exchange.getResponseHeaders.<wbr>put(Headers.CONTENT_LENGTH, html.length)<br class="m_-7257260311300174859gmail_msg">exchange.getResponseHeaders.<wbr>put(Headers.CONTENT_TYPE, "text/html")<br class="m_-7257260311300174859gmail_msg">exchange.getResponseSender.<wbr>send(html)</font><div class="m_-7257260311300174859gmail_msg"><br class="m_-7257260311300174859gmail_msg"></div><div class="m_-7257260311300174859gmail_msg">However, very often the last one to three characters don't seem to be received by the browser. I've logged the HTML before outputting so I know that I'm adding the "</html>" 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't get clipped. Is there something I'm missing that needs to be done to make sure the content is flushed appropriately?</div></div></div></div>
<br>______________________________<wbr>_________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org">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/<wbr>mailman/listinfo/undertow-dev</a><br></blockquote></div><br></div>