From d07b2f3e295031b4a2b6a3f8c80d7e92a78329c2 Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Thu, 16 Feb 2012 21:50:07 +0300 Subject: escape static file path to prevent double unescaping --- actionpack/test/dispatch/static_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/test/dispatch/static_test.rb') 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) -- cgit v1.2.3