Skip to content

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

Merged
pierreprinetti merged 1 commit intogophercloud:masterfrom
dtantsur:nil-map
Oct 6, 2023
Merged

Fix options initialization in ServiceClient.Request (fixes #2798)#2799
pierreprinetti merged 1 commit intogophercloud:masterfrom
dtantsur:nil-map

Conversation

@dtantsur
Copy link
Copy Markdown
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
Copy Markdown

Coverage Status

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

@dulek
Copy link
Copy Markdown
Contributor

dulek commented Oct 6, 2023

/lgtm

Copy link
Copy Markdown
Member

@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
@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.

4 participants