aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_dispatch/http/cache.rb5
-rw-r--r--railties/lib/rails/application.rb4
2 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/cache.rb b/actionpack/lib/action_dispatch/http/cache.rb
index 13e2701663..0d6015d993 100644
--- a/actionpack/lib/action_dispatch/http/cache.rb
+++ b/actionpack/lib/action_dispatch/http/cache.rb
@@ -28,7 +28,10 @@ module ActionDispatch
end
def etag_matches?(etag)
- if_none_match_etags.include?(etag)
+ if etag
+ etag = etag.gsub(/^\"|\"$/, "")
+ if_none_match_etags.include?(etag)
+ end
end
# Check response freshness (Last-Modified and ETag) against request
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index aa5b986862..050190cba6 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -89,8 +89,8 @@ module Rails
@initialized
end
- # Implements call according to the Rack API. It simples
- # dispatch the request to the underlying middleware stack.
+ # Implements call according to the Rack API. It simply
+ # dispatches the request to the underlying middleware stack.
def call(env)
env["ORIGINAL_FULLPATH"] = build_original_fullpath(env)
super(env)