-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
openstack::core: Don't mutate params between request retries #508
Conversation
Since f72d2fc (first released in v0.1.20) fog-openstack mutates the params passed on `Fog::Openstack::Core#request` by calling `#delete(:headers)`[1] on the params hash to access it. In case of a re-authentication the request is re-issued[2] but the headers hash is no longer present. As a result all headers passed by the user are lost and the request gets just the default headers[3]. This commit fixes the aforementioned behavior by not mutating the params hash in order to access its `:headers` part. [1]: https://github.com/fog/fog-openstack/blob/v1.0.10/lib/fog/openstack/core.rb#L57 [2]: https://github.com/fog/fog-openstack/blob/v1.0.10/lib/fog/openstack/core.rb#L61 [3]: https://github.com/fog/fog-openstack/blob/v1.0.10/lib/fog/openstack/core.rb#L128
Forgot to mention the maintainers as the cc @dhague, @Ladas, @seanhandley, @mdarby and @jjasghar. |
Build succeeded.
|
Any news on this one? |
Looks good to me 👍 |
@aufi Thanks for merging this. Are there any plans for a patch version release any time soon? |
I don't have permissions to create a new gem release, but there few new things, so it would make sense to me 👍 @Ladas Would it be possible create a new release? |
Hope you are well and healthy. Any news on the upcoming release? |
@ares are you planning new release soon? |
let me forward this question to @domitea, is there already something you want to push? I can do the release if not |
@ares Nothing right now. |
ok, |
@nhh Do you have a sample request/snippet of code that reproduces it? |
@avgerin0s I'm using it with carrierwave, so there is no direct fog-openstack code. It may be a problem with carrierwave too, but #501 and #502 sounds pretty much like my problem. CarrierWave::Storage::Fog::File Calling the |
@avgerin0s I've opened a more detailed issue on carrierwave. It may be useful for you? carrierwaveuploader/carrierwave#2484 I dont know what gem causes this issue, so sorry for the confusion. |
This PR fixes #507 and potentially #501 and #502
Since f72d2fc (first released in v0.1.20) fog-openstack mutates the
params passed on
Fog::Openstack::Core#request
by calling#delete(:headers)
1 on the params hash to access it.In case of a re-authentication the request is re-issued2 but the
headers hash is no longer present. As a result all headers passed by the
user are lost and the request gets just the default headers3.
This commit fixes the aforementioned behavior by not mutating the params
hash in order to access its
:headers
part.