<div dir="ltr">Are you manually setting the Content-Length? Someone had that issue before. If you are using the send api it should be calculating that for you. The different numbers make me thing its an encoding issue since bytes != length of the string.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 11:44 AM, peter royal <span dir="ltr">&lt;<a href="mailto:peter.royal@pobox.com" target="_blank">peter.royal@pobox.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>




<div><div>I don&#39;t set a content-length myself when using that method to send text (or binary) data.<br></div>
<div><br></div>
<div>-pete</div>
<div><br></div>
<div id="m_-7349522141230994828sig39947097"><div class="m_-7349522141230994828signature">--<br></div>
<div class="m_-7349522141230994828signature">(peter.royal|osi)@<a href="http://pobox.com" target="_blank">pobox.com</a> - <a href="http://fotap.org/~osi" target="_blank">http://fotap.org/~osi</a><br></div>
</div><div><div class="h5">
<div><br></div>
<div><br></div>
<div>On Wed, Feb 8, 2017, at 10:41 AM, Hicks, Matt wrote:<br></div>
</div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr"><div>Well, I just added an IoCallback and now I&#39;m getting an error: Attempted to write 144780 bytes however content-length has been set to 144772<br></div>
<div><br></div>
<div>This, I think, raises both a question and an issue:<br></div>
<div><br></div>
<div>Question: Should I not be setting the Content-Length myself even when using exchange.getResponseSender().<wbr>send?<br></div>
<div>Issue: Seems like a bug that without an IoCallback the error is just absorbed and never logged anywhere.<br></div>
</div>
<div><br></div>
<div><div dir="ltr">On Wed, Feb 8, 2017 at 10:35 AM Hicks, Matt &lt;<a href="mailto:matt@matthicks.com" target="_blank">matt@matthicks.com</a>&gt; wrote:<br></div>
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I&#39;m having a very strange problem sending a generated HTML file back to the browser using `exchange.getResponseSender().<wbr>send(s)`.  It seems to work fine if the content is a short bit of text like &quot;Hello World&quot;, but the content is 144,772 bytes and if I use Curl to test it I get a 200 OK, but it says the Content-Length is 0 and no content comes back.  If I set the content to a short String like I said, then the Content-Length is properly set and the content comes back like expected.<br></div>
<div><br></div>
<div>Should I not be using `exchange.getResponseSender().<wbr>send` for large amounts of text?<br></div>
<div><br></div>
<div>I just updated to 1.4.10.Final hoping that it was a bug that was fixed since 1.4.8.Final, but it&#39;s still happening.<br></div>
<div><br></div>
<div>Any insights would be greatly appreciated.<br></div>
</div>
</blockquote></div>
</div></div><div><u>______________________________<wbr>_________________</u><br></div>
<div>undertow-dev mailing list<br></div>
<div><a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br></div>
<div><a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/undertow-dev</a><br></div>
</blockquote><div><br></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>