Permalink
Browse files

Force inferred port, otherwise someone may think we are calling port 80

  • Loading branch information...
rewritten committed Apr 27, 2012
1 parent 6f47691 commit 9e726fb4099b8703c0cd8e132358e0822dc76fa9
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/faraday/oauth2.rb
View
@@ -7,6 +7,7 @@ module FaradayMiddleware
class OAuth2 < Faraday::Middleware
def call(env)
env[:url] = Addressable::URI.parse(env[:url])
+ env[:url].port = env[:url].inferred_port
if env[:method] == :get or env[:method] == :delete
env[:url].query_values = {} if env[:url].query_values.nil?

0 comments on commit 9e726fb

Please sign in to comment.