-
1. Re: How to append trailer headers with @WebServlet?
jfclere Apr 28, 2014 8:08 AM (in response to rick-rainer.ludwig)you need to add the headers _before_ committing the response.
-
2. Re: How to append trailer headers with @WebServlet?
rick-rainer.ludwig Apr 28, 2014 3:16 PM (in response to jfclere)The problem is, I want to add _trailing_ headers at the end of the HTTP response after the chunked body as the HTTP specification tells. I know, that I have to add a header to tell about the presence of a trailing header, what is not the issue. The issue is to put the actual trailing header at the end of the response. As far as I see it, there are only headers to be added to the response header, but not at the end. Or do I miss an option or functionality here?
On the other side: One of the main functions of a trailing header is to add a checksum for instance, which can only be calculated at the end of the stream when the stream is already sent to the client. The functionality is killed, if I need to stream once for the checksum and a second time after adding the header to send everything to the client.
-
3. Re: How to append trailer headers with @WebServlet?
jfclere Apr 30, 2014 7:55 AM (in response to rick-rainer.ludwig)You have to write your own ChunkedOutputFilter to do that and you need your own application to process the trailers of each chunk that will be sent by the filter.