Etags

4 views
Skip to first unread message

Ad

unread,
Jul 22, 2011, 5:51:03 AM7/22/11
to Deft Web Server
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

Roger Schildmeijer

unread,
Jul 22, 2011, 6:06:20 AM7/22/11
to Deft Web Server
FYI, forwarded to deft...@incubator.apache.org
Reply all
Reply to author
Forward
0 new messages