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

Fix options initialization in ServiceClient.Request (fixes #2798) #2799

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

dtantsur
Copy link
Contributor

@dtantsur dtantsur commented Oct 6, 2023

Request is a part of the public API, but it relies on being called by
Get/Post/etc to properly initialize its options. Namely:

  1. it may crash on a nil map assignment if there are MoreHeaders,
  2. it does not handle microversions.

This change moves the relevant code to Request.

…d#2798)

Request is a part of the public API, but it relies on being called by
Get/Post/etc to properly initialize its options. Namely:
1) it may crash on a nil map assignment if there are MoreHeaders,
2) it does not handle microversions.

This change moves the relevant code to Request.
@github-actions github-actions bot added the semver:patch No API change label Oct 6, 2023
@coveralls
Copy link

Coverage Status

coverage: 77.441%. remained the same when pulling 0f4a9ff on dtantsur:nil-map into f276bd9 on gophercloud:master.

@dulek
Copy link
Contributor

dulek commented Oct 6, 2023

/lgtm

Copy link
Contributor

@pierreprinetti pierreprinetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Good catch.

@pierreprinetti pierreprinetti added the backport-v1 This PR will be backported to v1 label Oct 6, 2023
@pierreprinetti pierreprinetti merged commit 4e19ac8 into gophercloud:master Oct 6, 2023
20 checks passed
@dtantsur dtantsur deleted the nil-map branch October 6, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v1 This PR will be backported to v1 semver:patch No API change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants