diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-12-30 02:02:21 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2013-12-30 02:03:36 +0000 |
commit | 5535a4e78637c35081d42bf949e3995997ceefcb (patch) | |
tree | f5d15859ee12099e697ac1a751aea31305afb2e6 /extras/try_gzip_static.rb | |
parent | 4fe625b9a42b003e31329edd45d087b9c47ef5ed (diff) | |
download | yahns-5535a4e78637c35081d42bf949e3995997ceefcb.tar.gz |
Proper POSIX filesystems are encoding-agnostic.
Diffstat (limited to 'extras/try_gzip_static.rb')
-rw-r--r-- | extras/try_gzip_static.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/try_gzip_static.rb b/extras/try_gzip_static.rb index b8abb03..d562957 100644 --- a/extras/try_gzip_static.rb +++ b/extras/try_gzip_static.rb @@ -33,12 +33,12 @@ class TryGzipStatic end def initialize(root, default_type = 'text/plain') - @root = root + @root = root.b @default_type = default_type end def fspath(env) - path_info = Rack::Utils.unescape(env["PATH_INFO"]) + path_info = Rack::Utils.unescape(env["PATH_INFO"], Encoding::BINARY) path_info =~ /\.\./ ? nil : "#@root#{path_info}" end |