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