aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-21 05:14:26 -0800
committerJosé Valim <jose.valim@gmail.com>2011-12-21 05:14:26 -0800
commit618cb4429191290b957391c314a55b4d59f381f3 (patch)
treebef72ad2005a08efb4faa6e8192cec506f591420 /actionpack/lib/action_dispatch
parent1f75a1fea12ead1370113ea1be0272667ab7da88 (diff)
parent3131a9379766a735a80220fd2e94cb07791bed9c (diff)
downloadrails-618cb4429191290b957391c314a55b4d59f381f3.tar.gz
rails-618cb4429191290b957391c314a55b4d59f381f3.tar.bz2
rails-618cb4429191290b957391c314a55b4d59f381f3.zip
Merge pull request #4079 from drogus/http_digest_issue
Fix http digest authentication when url ends with `/` or `?`
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/http/request.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb
index c5c48ec489..820921252d 100644
--- a/actionpack/lib/action_dispatch/http/request.rb
+++ b/actionpack/lib/action_dispatch/http/request.rb
@@ -122,10 +122,18 @@ module ActionDispatch
Http::Headers.new(@env)
end
+ def original_fullpath
+ @original_fullpath ||= (env["ORIGINAL_FULLPATH"] || fullpath)
+ end
+
def fullpath
@fullpath ||= super
end
+ def original_url
+ base_url + original_fullpath
+ end
+
def media_type
content_mime_type.to_s
end