Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert default rest_v3 request data to nil #439

Merged
merged 1 commit into from
Apr 29, 2016

Conversation

domcleal
Copy link
Contributor

Fixes refreshing of smart proxies against Foreman, since the PUT
request data defaulted to {}. This causes the oauth gem to form
encode the empty hash data, overriding the Content-Type to application/
x-www-form-urlencoded and the request is rejected by Foreman with a 415
HTTP response.

https://github.com/oauth-xx/oauth-ruby/blob/v0.5.1/lib/oauth/consumer.rb#L362-L364 checks for a Hash overrides the content type.

Fixes refreshing of smart proxies against Foreman, since the PUT
request data defaulted to `{}`. This causes the oauth gem to form
encode the empty hash data, overriding the Content-Type to application/
x-www-form-urlencoded and the request is rejected by Foreman with a 415
HTTP response.
@mmoll
Copy link
Contributor

mmoll commented Apr 29, 2016

damn, I think I ran into this when testing #436 yesterday, but couldn't reproduce it...
👍 on green tests.

@mmoll mmoll merged commit eb1f2a9 into theforeman:master Apr 29, 2016
@mmoll
Copy link
Contributor

mmoll commented Apr 29, 2016

merged, thanks @domcleal!

cegeka-jenkins pushed a commit to cegeka/puppet-foreman that referenced this pull request Oct 23, 2017
Fixes refreshing of smart proxies against Foreman, since the PUT
request data defaulted to `{}`. This causes the oauth gem to form
encode the empty hash data, overriding the Content-Type to application/
x-www-form-urlencoded and the request is rejected by Foreman with a 415
HTTP response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants