Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Rack::Utils since it's already there

  • Loading branch information...
commit f6364d417b1d956d8c1752ffba87ec275a79959e 1 parent a582b30
Chris Heald authored
Showing with 1 addition and 5 deletions.
  1. +1 −1  lib/rack/oauth2/server.rb
  2. +0 −4 lib/rack/oauth2/server/utils.rb
2  lib/rack/oauth2/server.rb
View
@@ -293,7 +293,7 @@ def request_authorization(request, logger)
# handle the rest.
auth_request = AuthRequest.create(client, requested_scope, redirect_uri.to_s, response_type, state)
uri = URI.parse(request.url)
- uri.query = Utils.hash_to_query request.GET.merge(:authorization => auth_request.id.to_s)
+ uri.query = Rack::Utils.build_query request.GET.merge(:authorization => auth_request.id.to_s)
return redirect_to(uri, 303)
end
rescue OAuthError=>error
4 lib/rack/oauth2/server/utils.rb
View
@@ -20,10 +20,6 @@ def parse_redirect_uri(redirect_uri)
def normalize_scope(scope)
(Array === scope ? scope.join(" ") : scope || "").split(/\s+/).compact.uniq.sort
end
-
- def hash_to_query(hsh)
- hsh.map {|k,v| "%s=%s" % [Rack::Utils.escape(k), Rack::Utils.escape(v)] }.join("&")
- end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.