[undertow-dev] exchange.getResponseSender().send issues

Bill O'Neil bill at dartalley.com
Wed Feb 8 12:05:16 EST 2017


You shouldn't need to be setting the content length manually with that API.

I agree with the exception, Stuart might have some thoughts on that. There
was another discussion about hooking in different loggers to the default
exception handler as well as an easier way to override it. This issue could
be related to that?

On Wed, Feb 8, 2017 at 12:01 PM, Hicks, Matt <matt at matthicks.com> wrote:

> Well, modifying my computation to do myString.getBytes("UTF-8").length
> instead of myString.length resolved the issue.  The silent failing still
> has me concerned though.
>
> On Wed, Feb 8, 2017 at 10:41 AM Hicks, Matt <matt at matthicks.com> wrote:
>
>> Well, I just added an IoCallback and now I'm getting an error: Attempted
>> to write 144780 bytes however content-length has been set to 144772
>>
>> This, I think, raises both a question and an issue:
>>
>> Question: Should I not be setting the Content-Length myself even when
>> using exchange.getResponseSender().send?
>> Issue: Seems like a bug that without an IoCallback the error is just
>> absorbed and never logged anywhere.
>>
>> On Wed, Feb 8, 2017 at 10:35 AM Hicks, Matt <matt at matthicks.com> wrote:
>>
>> I'm having a very strange problem sending a generated HTML file back to
>> the browser using `exchange.getResponseSender().send(s)`.  It seems to
>> work fine if the content is a short bit of text like "Hello World", 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.
>>
>> Should I not be using `exchange.getResponseSender().send` for large
>> amounts of text?
>>
>> I just updated to 1.4.10.Final hoping that it was a bug that was fixed
>> since 1.4.8.Final, but it's still happening.
>>
>> Any insights would be greatly appreciated.
>>
>>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20170208/c480bcf9/attachment.html 


More information about the undertow-dev mailing list