The open issue DEFT-147 (Make the etag header creation configurable) would
solve your issues. I'm not convinced this is the best solution though.



On Fri, Jul 22, 2011 at 11:51 AM, Ad <[email protected]> wrote:

> Hey,
>
> I want to send a custom etag with my response which represents the
> state of the response. In order for deft not to overwrite my etag
> header i need to call flush() on the response before finish(). For
> this scheme to work I also need to write the content-length header.
>
> The above works fine except that to know the response length I need to
> encode the response string to a byte array but the response.write
> method only accepts a string and does the encoding itself. This means
> the response data needs to be encoded twice.
>
> Two possible solutions I can see to this are:
>
> 1. Don't set an etag header if one already exists
> 2. Provide a Response.write(byte[] data) method
>
> Cheers,
> Adam

Reply via email to