Skip to content
Browse files

Apparently Rack::Test doesn't send REQUEST_URI sometimes.

  • Loading branch information...
1 parent 61c5212 commit cb327bdd839cfdd238e4ade0ba36464f7569e1ef @jcoglan jcoglan committed Apr 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/oauth2/router.rb
View
2 lib/oauth2/router.rb
@@ -51,7 +51,7 @@ def access_token_from_request(env)
def request_from(env_or_request)
env = env_or_request.respond_to?(:env) ? env_or_request.env : env_or_request
- env = Rack::MockRequest.env_for(env['REQUEST_URI'], :input => env['RAW_POST_DATA']).merge(env)
+ env = Rack::MockRequest.env_for(env['REQUEST_URI'] || '', :input => env['RAW_POST_DATA']).merge(env)
Rack::Request.new(env)
end

0 comments on commit cb327bd

Please sign in to comment.
Something went wrong with that request. Please try again.