aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib')
-rw-r--r--activeresource/lib/active_resource/base.rb4
-rw-r--r--activeresource/lib/active_resource/connection.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index d79198f49b..4d43a800eb 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -204,8 +204,8 @@ module ActiveResource
@site = nil
else
@site = create_site_uri_from(site)
- @user = @site.user if @site.user
- @password = @site.password if @site.password
+ @user = URI.decode(@site.user) if @site.user
+ @password = URI.decode(@site.password) if @site.password
end
end
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index cf4681b25b..c8cee7aaa3 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -76,8 +76,8 @@ module ActiveResource
# Set URI for remote service.
def site=(site)
@site = site.is_a?(URI) ? site : URI.parse(site)
- @user = @site.user if @site.user
- @password = @site.password if @site.password
+ @user = URI.decode(@site.user) if @site.user
+ @password = URI.decode(@site.password) if @site.password
end
# Set user for remote service.