Re: Response for unsupported conditional request

Contrary to Julian, I'm not at all an expert in the HTTP specs, but if 
e.g. If-Modified-Since isn't implemented, wouldn't simply sending back 
the resource be a way to deal with the situation? Isn't that what a 
server does if it doesn't understand a header field? And why implement a 
special case with a 501 answer when implementing the actual behavior 
might not be much more effort?

Regards,   Martin.

On 2025-01-30 01:03, Julian Reschke wrote:
> Am 27.01.2025 um 22:47 schrieb Mike Kistler:
>> Is there a required or recommended response that a server should give if
>> it receives a request with a conditional header (If-Match, If-No-Match,
>> If-Modified, If-Unmodified) that it does not support?
>>
>> I've read the descriptions for the required processing of these headers
>> in RFC 9110 and it seems clear that servers are obligated to support
>> them -- but in my experience many do not. So in the case that server
>> does not support conditional requests, it seems like it should respond
>> with an error if it receives a request with a conditional header. Should
>> the response be a 501 (Not Implemented)? Could it be a 400 (Bad
>> Request)? Something else? I looked for guidance on this in RFC 9110 but
>> could not find it, so apologies if I just overlooked it.
> 
> It needs to be a 5xx - because it's a server problem.
> 
> 501 sounds reasonable to me.
> 
> Best regardsm Julian
> 

Received on Wednesday, 29 January 2025 22:54:48 UTC