| @@ -0,0 +1,11 @@ | ||
| 1 | +# Monkey patch https://github.com/lostisland/faraday/pull/513 | |
| 2 | +# Fixes encoding issue when passing an URL with non UTF-8 characters | |
| 3 | +module Faraday | |
| 4 | + module Utils | |
| 5 | + def unescape(s) | |
| 6 | + string = s.to_s | |
| 7 | + string.force_encoding(Encoding::BINARY) if RUBY_VERSION >= '1.9' | |
| 8 | + CGI.unescape string | |
| 9 | + end | |
| 10 | + end | |
| 11 | +end |