Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response code handling seems inconsistent with the spec #95

Open
HonoreDB opened this issue Jan 27, 2014 · 1 comment
Open

Response code handling seems inconsistent with the spec #95

HonoreDB opened this issue Jan 27, 2014 · 1 comment

Comments

@HonoreDB
Copy link

Hi,

The response code handling section links to http://tools.ietf.org/html/rfc2616#section-13.4, but seems inconsistent with it. This gem includes 404 in the whitelist of cacheable response codes, but the RFC does not.

The RFC also says that a response with a code outside the whitelist may still be cached if there's a cache header that allows it. Rack-Cache doesn't seem to honor the italicized part of that--e.g. a 204 response with an Expires header is never cached.

Are these departures intentional? Would you be amenable to a PR or two that changes them or makes them configurable?

Thanks!

@xentek
Copy link

xentek commented Feb 7, 2014

I think caching 404s should be configurable, since I, for one, like having caching on for 404s that are known bad (like urls that I know don't exist and will never exist).

The if there's a cache header that allows it part seems more like a bug, and should probably just be fixed to
comply with the RFC, but maybe I'm missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants