diff --git a/VERSION b/VERSION index 5d4294b..cb0c939 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.1 \ No newline at end of file +0.5.2 diff --git a/lib/reverse_proxy/client.rb b/lib/reverse_proxy/client.rb index 0916da9..662fcc4 100644 --- a/lib/reverse_proxy/client.rb +++ b/lib/reverse_proxy/client.rb @@ -1,5 +1,6 @@ require 'rack' require 'rack-proxy' +require 'addressable/uri' module ReverseProxy class Client @@ -45,7 +46,7 @@ module ReverseProxy source_request = Rack::Request.new(env) # We can pass in a custom path - uri = URI.parse("#{url}#{options[:path] || env['ORIGINAL_FULLPATH']}") + uri = Addressable::URI.parse("#{url}#{options[:path] || env['ORIGINAL_FULLPATH']}") # Initialize request target_request = Net::HTTP.const_get(source_request.request_method.capitalize).new(uri.request_uri)