Fix stale responses with no Last-Modified. #88

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

When caching a request with headers like this:

Cache-Control: max-age=300, public
ETag: "5c564d692c85b70068fd76ea25f2be2f"

Everything works fine while fresh, but once stale, an error is being raised from within Net::HTTP, since there's no Last-Modified header.

See #85 for the full background.

I spent around an hour trying to write a failing spec for this, but was unsuccessful. Maybe someone with more knowledge of this gem and its test environment would be more successful.

Fix stale responses with no Last-Modified.
When caching a request with headers like this:

    Cache-Control: max-age=300, public
    ETag: "5c564d692c85b70068fd76ea25f2be2f"

Everything works fine while fresh, but once stale, an error is being
raised from within `Net::HTTP`, since there's no `Last-Modified` header.

Resolves #85.
Collaborator

grosser commented Oct 8, 2015

supporting some weird edge-case that cannot be tested easily ... please ping if this is still an issue ...

@grosser grosser closed this Oct 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment