aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/static_test.rb
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-02-16 21:50:07 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-02-16 21:50:07 +0300
commitd07b2f3e295031b4a2b6a3f8c80d7e92a78329c2 (patch)
treeb45d4ec9711b941291c6d4da255b7b8c6849cc1a /actionpack/test/dispatch/static_test.rb
parent079e2f4ec1c299424200f59b45bb2beae08d5966 (diff)
downloadrails-d07b2f3e295031b4a2b6a3f8c80d7e92a78329c2.tar.gz
rails-d07b2f3e295031b4a2b6a3f8c80d7e92a78329c2.tar.bz2
rails-d07b2f3e295031b4a2b6a3f8c80d7e92a78329c2.zip
escape static file path to prevent double unescaping
Diffstat (limited to 'actionpack/test/dispatch/static_test.rb')
-rw-r--r--actionpack/test/dispatch/static_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb
index b7a53353a9..d91a857d18 100644
--- a/actionpack/test/dispatch/static_test.rb
+++ b/actionpack/test/dispatch/static_test.rb
@@ -35,6 +35,10 @@ module StaticTests
assert_html "means hello in Japanese\n", get("/foo/#{Rack::Utils.escape("こんにちは.html")}")
end
+ def test_serves_static_file_with_plus_in_filename
+ assert_html "foo+bar\n", get('/foo/foo%2Bbar.html')
+ end
+
private
def assert_html(body, response)