You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an issue caching responses with headers like this:
Cache-Control: max-age=300, public
ETag: "5c564d692c85b70068fd76ea25f2be2f"
While fresh, this works fine, but once stale, Net::HTTP is raising this error:
NoMethodError: undefined method `strip' for nil:NilClass
from ~/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1436:in `block in initialize_http_header'
The issue appears to be in lib/rack/cache/context.rb. This change fixes it:
197c197< @env['HTTP_IF_MODIFIED_SINCE'] = entry.last_modified---> @env['HTTP_IF_MODIFIED_SINCE'] = entry.last_modified if entry.last_modified
The text was updated successfully, but these errors were encountered:
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.
Resolvesrtomayko#85.
I'm running into an issue caching responses with headers like this:
While fresh, this works fine, but once stale,
Net::HTTP
is raising this error:The issue appears to be in
lib/rack/cache/context.rb
. This change fixes it:The text was updated successfully, but these errors were encountered: