plack / Plack

PSGI toolkit and server adapters
http://plackperl.org/
Other
486 stars 214 forks source link

Plack::Middleware::ConditionalGET only check if HTTP 200 [Bug Fix] #667

Open robrwo opened 3 years ago

robrwo commented 3 years ago

RFC 2616 Sec 14.25 states that:

If the request would normally result in anything other than a 200 (OK) status, ... the response is exactly the same as for a normal GET.

There is no point in checking the headers if the status code is something else.

miyagawa commented 3 years ago

This seems reasonable. I'll check if there's any expectation around how this middleware behaves when the backend do send 30x.

robrwo commented 2 years ago

Is this alright to merge?

robrwo commented 1 year ago

@miyagawa Any update on merging this? Thanks.