From: David S. <David.Sobeck@Sun.COM> - 2006-01-26 19:07:48
|
Thanks for responding. We use Jetty to access a storage system. If the server responds to a retrieve (Get), but gets some error after writing part of the response body, we need a way to signal that to the client so that he doesn't think that the frahment in the response body is the full data retrieve. We normally add trailer-status: 200 after the zero length chunk, or an error response code if something went wrong. Since we've already written to the body, we can't put it in the header. On Thu, 2006-01-26 at 06:43, Greg Wilkins wrote: > David, > > To my knowledge, you're the only user of trailers that I've heard of! > I removed them because I thought nobody used them! > > Can you tell me a bit more about how you are using them and what > client you have that accepts them? > > I will have to consider if I will re-add them to Jetty 5 or > perhaps push you to consider Jetty 6 and re-add them there! > > cheers > > > David Sobeck wrote: > > I am using Jetty 5.1.10. From the jacadoc, I thought I could send a trailer by adding a field to the response after some output was written, but this appears to be a no-op. I see from the release notes that support for trailers was removed from 5.0. Is this permament? Trailers are very useful for me to pass a checksum/data hash for verification of chunked data. > > > > > > /* ------------------------------------------------------------ */ > > /** Add to a multi-value field value. > > * If the message is editable, then a header field is set. Otherwise > > * if the meesage is sending and a HTTP/1.1 version, then a trailer > > * field is set. > > * @param name Name of field > > * @param value New value to add to the field > > * @exception IllegalStateException Not editable or sending 1.1 > > * with trailers > > */ > > public void addField(String name, String value) > > throws IllegalStateException > > { > > if (_state!=__MSG_EDITABLE) > > return; > > _header.add(name,value); > > } > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > _______________________________________________ > > Jetty-support mailing list > > Jet...@li... > > https://lists.sourceforge.net/lists/listinfo/jetty-support > > > |