Re: SHOULD-level requirements in p6-caching

On Thu, Apr 07, 2011 at 06:19:51PM +1000, Mark Nottingham wrote:
> In 3.2.1 (only-if-cached),
> 
> >       If it receives this
> >       directive, a cache SHOULD either respond using a stored response
> >       that is consistent with the other constraints of the request, or
> >       respond with a 504 (Gateway Timeout) status code.
> 
> MUST?

Is there any reason for a 504 here ? I mean, 5xx are server-side errors
which should theorically not be decided by the client. In my opinion here
the client asks for an object and sets a condition to retrieve it, if the
object cannot be fetched from the cache, the client's condition cannot be
satisfied, so it should be a 4xx (possibly a 412 Precondition Failed).

It is important to ensure that clients cannot force servers to emit 5xx
errors, because it is common to include status code checks when monitoring
production systems. If a cache emits a 504, usually it's because it cannot
reach the next hop so there is a connectivity issue that must be addressed.

Regards,
Willy

Received on Saturday, 9 April 2011 06:06:21 UTC