4.3.3. Handling a Validation Response

4 阅读1分钟

4.3.3. Handling a Validation Response

rfc 7234 4.3.3. Handling a Validation Response

   Cache handling of a response to a conditional request is dependent
   upon its status code:

   o  A 304 (Not Modified) response status code indicates that the
      stored response can be updated and reused; see Section 4.3.4.

   o  A full response (i.e., one with a payload body) indicates that
      none of the stored responses nominated in the conditional request
      is suitable.  Instead, the cache MUST use the full response to
      satisfy the request and MAY replace the stored response(s).

   o  However, if a cache receives a 5xx (Server Error) response while
      attempting to validate a response, it can either forward this
      response to the requesting client, or act as if the server failed
      to respond.  In the latter case, the cache MAY send a previously
      stored response (see Section 4.2.4).

这一小节主要讲,cache发起了条件请求,收到对于response以后可以处理的情况。

rfc中没有cover到的情况

显然这里并没有cover到当收到response时所有的情况