Re: Semantics of multiple 103s in Early Hints

On Tue, Aug 08, 2017 at 05:55:10PM +0900, Kazuho Oku wrote:
> 2017-08-08 17:16 GMT+09:00 Stefan Eissing <stefan.eissing@greenbytes.de>:
> > RFC 7231 says (ch. 6.2) "If the request did not contain an Expect
> > header field containing the 100-continue expectation, the client
> > can simply discard this interim response."
> >
> > And "101 Switching Protocols" is obviously hop-by-hop anyway, so
> > it may never reach the consumer of the real response.
> >
> > For 103, this is also true. Any HTTP/2 intermediate should discard
> > unknown 1xx responses, so the server can also not assume that its
> > headers reach all recipients.
> 
> I do not agree. RFC 7231 section 6.2 states:
> 
>    A proxy MUST forward 1xx responses unless the proxy itself requested
>    the generation of the 1xx response.
> 
> So it would be natural to assume that proxies that do not understand
> 103 will forward the hints to the client.

Yep definitely, but we can keep this out of the equation. Given that
clients are assumed to ignore unknown 1xx responses, the server cannot
assume that the Link headers have been seen.

By the way I had two other thoughts to justify how an intermediary could
add inexact header fields that may or may not be repeated in the final
response :
  - those which are configured to unconditionally add a few resources
    that are very likely to be used on a given site.

  - caches : we could imagine a cache which sniffs Link headers from responses
    and emits the most common ones in 103 when it's known that responses for
    such requests take more than one RTT on average. Such a cache would not
    require hard-coded links, and would often be a bit wrong, advertising
    certain useless links and not advertising all needed ones. In such a case
    it's obvious that the final response has the last say.

Willy

Received on Tuesday, 8 August 2017 09:18:44 UTC