From 501f7d8cdee34e2118ae49454070de55c6ea78e0 Mon Sep 17 00:00:00 2001 From: laserlemon Date: Mon, 11 Oct 2010 14:49:58 -0400 Subject: [PATCH] Properly normalize the parsed URI upon header initialization. --- lib/simple_oauth.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/simple_oauth.rb b/lib/simple_oauth.rb index ba11832..a0d286a 100644 --- a/lib/simple_oauth.rb +++ b/lib/simple_oauth.rb @@ -24,7 +24,11 @@ module SimpleOAuth def initialize(method, url, params, options = {}) @method = method.to_s.upcase - @uri = URI.parse(url).normalize + @uri = URI.parse(url).tap do |uri| + uri.scheme = uri.scheme.downcase + uri.normalize! + uri.fragment = nil + end @params = params @options = self.class.default_options.merge(options) end