Re: [XHR2] HTTP Trailers

On 26/10/2010, at 9:12 PM, Anne van Kesteren wrote:
>> 
>> In XHR2, supporting trailers probably means just making it possible to read trailers on the response when they're present, rather than discarding them. This could either be done by making them available from getResponseHeader() after the message is complete, or using a separate property or method if it's felt that keeping them distinct from the "normal" headers is desirable. E.g., getResponseTrailer().
> 
> If they were exposed via getResponseHeader() you would have the potential for clashes so that does not seem like a good idea.


In most APIs, I'd agree, because if you're building an intermediary, you need to be able to differentiate. I'm not sure if that's the case for a browser, but I agree that it's probably the safe thing to do. 

For reference, that's how we did it in node:
  http://nodejs.org/docs/v0.3.0/api.html#response-trailers-206

Cheers,

--
Mark Nottingham   http://www.mnot.net/

Received on Tuesday, 26 October 2010 11:18:06 UTC