Am 04.01.2013 10:51, schrieb Matthias Georgi:
> In lib/rack_dav/controller.rb:
>
>>        end.tr(' ', '+')
>>      end
>>
>>      def url_unescape(s)
>>        s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
>> -        [$1.delete('%')].pack('H*')
>> -      end
>> +        URI.unescape($1).to_s
>
> Couldn't we just replace the whole thing by URI.unescape ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/georgi/rack_dav/pull/14/files#r2548455>.
>
The problem with all this escaping and unescaping is, that we'd have to 
guess how the client escaped. If the client is strange then we have to 
use more magick to guess the encoding right.

If it's ok for you I'd go for utf8 then we could replace the 
url_unescape implementation with URI.unescape. I don't know how it is 
with url_escape but it could be the same.