Skip to content

Commit

Permalink
Merge pull request #188 from reddshack/empty_oauth_token
Browse files Browse the repository at this point in the history
prevent empty oauth_token in header
  • Loading branch information
Hiroshi Nakamura committed May 21, 2014
2 parents 0a16401 + 3e1446a commit 42f780c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/httpclient/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,10 @@ def challenge(uri, param_str = nil)
def calc_cred(req, config)
header = {}
header['oauth_consumer_key'] = config.consumer_key
header['oauth_token'] = config.token
header['oauth_signature_method'] = config.signature_method
header['oauth_timestamp'] = config.debug_timestamp || Time.now.to_i.to_s
header['oauth_nonce'] = config.debug_nonce || generate_nonce()
header['oauth_token'] = config.token if config.token
header['oauth_version'] = config.version if config.version
header['oauth_callback'] = config.callback if config.callback
header['oauth_verifier'] = config.verifier if config.verifier
Expand Down

0 comments on commit 42f780c

Please sign in to comment.