From ceb288b8ce552a248f141bddbd16426641a4fd0d Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 17 Feb 2012 13:33:44 +0000 Subject: Fix ActionDispatch::Static to serve files with unencoded PCHAR RFC 3986[1] allows sub-delim characters in path segments unencoded, however Rack::File requires them to be encoded so we use URI's unescape method to leave them alone and then escape them again. Also since the path gets passed to Dir[] we need to escape any glob characters in the path. [1]: http://www.ietf.org/rfc/rfc3986.txt --- actionpack/test/fixtures/public/foo/foo'bar.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 actionpack/test/fixtures/public/foo/foo'bar.html (limited to 'actionpack/test/fixtures/public/foo/foo'bar.html') diff --git a/actionpack/test/fixtures/public/foo/foo'bar.html b/actionpack/test/fixtures/public/foo/foo'bar.html new file mode 100644 index 0000000000..25c3275736 --- /dev/null +++ b/actionpack/test/fixtures/public/foo/foo'bar.html @@ -0,0 +1 @@ +/foo/foo'bar.html \ No newline at end of file -- cgit v1.2.3