[undertow-dev] when exactly are the headers and such written to the client?

Michael Grove mike at stardog.com
Fri Jan 6 15:19:49 EST 2017


I'm using EncodingHandler for gzip encoding of responses and I'm not seeing
the header on the client, but I have a breakpoint in
AllowedContentEncodings L95, and it's definitely hit, but I'm wondering if
it's hit after the initial part of the response is written so that header
isnt ever sent.

My handler dispatches to a worker thread if need be, does the biz logic,
calls startBlocking on the exchange, sets the status code and other headers
like Content-Type, and then writes the results to the stream from
HttpServerExchange#getOutputStream before calling endExchange.

I can see the Content-Type header correctly set, but not Content-Encoding.
The javadocs say they're written when the first write is initiated, but I
have't managed to find where that is, specifically in relation to the
EncodingHandler. Hoping someone can point me in the right direction or with
any luck, have a guess at what I've messed up.

Thanks.

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20170106/cfd824cf/attachment.html 


More information about the undertow-dev mailing list