From 2ef145883348e92c9e6393ece9b6967e3a5a80c7 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Wed, 21 Mar 2018 16:33:36 +0000 Subject: Use ASCII-8BIT paths in ActionDispatch::Static The rack gem returns PATH_INFO as an ASCII-8BIT encoded string but it was being converted to US-ASCII by the match? method because it was calling Rack::Utils.escape_path. To prevent incompatibile encoding warnings use ASCII-8BIT strings for the root path and let Ruby handle any filename encoding conversion. Fixes #32294, Closes #32314. --- ...5\343\202\210\343\201\206\343\201\252\343\202\211.html" | 1 + ...43\202\210\343\201\206\343\201\252\343\202\211.html.gz" | Bin 0 -> 67 bytes 2 files changed, 1 insertion(+) create mode 100644 "actionpack/test/fixtures/public/foo/\343\201\225\343\202\210\343\201\206\343\201\252\343\202\211.html" create mode 100644 "actionpack/test/fixtures/public/foo/\343\201\225\343\202\210\343\201\206\343\201\252\343\202\211.html.gz" (limited to 'actionpack/test/fixtures/public/foo') diff --git "a/actionpack/test/fixtures/public/foo/\343\201\225\343\202\210\343\201\206\343\201\252\343\202\211.html" "b/actionpack/test/fixtures/public/foo/\343\201\225\343\202\210\343\201\206\343\201\252\343\202\211.html" new file mode 100644 index 0000000000..627bb2469f --- /dev/null +++ "b/actionpack/test/fixtures/public/foo/\343\201\225\343\202\210\343\201\206\343\201\252\343\202\211.html" @@ -0,0 +1 @@ +means goodbye in Japanese diff --git "a/actionpack/test/fixtures/public/foo/\343\201\225\343\202\210\343\201\206\343\201\252\343\202\211.html.gz" "b/actionpack/test/fixtures/public/foo/\343\201\225\343\202\210\343\201\206\343\201\252\343\202\211.html.gz" new file mode 100644 index 0000000000..4f484cfe86 Binary files /dev/null and "b/actionpack/test/fixtures/public/foo/\343\201\225\343\202\210\343\201\206\343\201\252\343\202\211.html.gz" differ -- cgit v1.2.3