-
Notifications
You must be signed in to change notification settings - Fork 932
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
Ensure response body is always closed in CloudControllerConnection #2423
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a-b
approved these changes
May 18, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This was referenced May 18, 2023
a-b
force-pushed
the
fix/close-response-body
branch
2 times, most recently
from
June 8, 2023 04:13
955db0c
to
17a4ae8
Compare
a-b
force-pushed
the
fix/close-response-body
branch
2 times, most recently
from
June 15, 2023 14:08
fab3836
to
b8e2f8d
Compare
a-b
force-pushed
the
fix/close-response-body
branch
from
July 13, 2023 21:03
b8e2f8d
to
8415e6b
Compare
a-b
requested changes
Jan 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chitoku-k
force-pushed
the
fix/close-response-body
branch
from
January 10, 2024 02:26
8415e6b
to
a1b1bfb
Compare
Thanks, I have modified the commit in this and the other two PRs that way. |
@chitoku-k Thanks for your fast response on these changes. |
ccjaimes
approved these changes
Jan 11, 2024
a-b
approved these changes
Jan 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Does this PR modify CLI v6, CLI v7, or CLI v8?
main
Description of the Change
This PR ensures that a response body returned from
HTTPClient
inCloudControllerConnection.Make()
is correctly closed in all of the following circumstances:http.StatusNoContent
X-Cf-Warnings
returns an errorWhy Is This PR Valuable?
Some projects import cloudfoundry/cli as a means to interact with CAPI and they should benefit from this fix.
Why Should This Be In Core?
N/A
Applicable Issues
N/A
How Urgent Is The Change?
There should be a few projects that are currently affected by this bug such as bosh-prometheus/cf_exporter.
Other Relevant Parties
None.