Set BasicAuth in http.go only if username and password are not empty (#914) #921

Open
github-actions[bot] wants to merge 1 commits from cherry-pick-2663196279-release-1.0 into release-1.0
github-actions[bot] commented 2022-07-13 06:50:51 -05:00 (Migrated from github.com)

This prevents error "read/write on closed pipe".

Go's http.client::send() always closes req.Body, so if the first request attempt
is unsuccessful, any subsequent requests after calling the CredentialsCallback
will attempt to read/write on a closed pipe.

(cherry picked from commit 9db5de109c)

This prevents error "read/write on closed pipe". Go's http.client::send() always closes req.Body, so if the first request attempt is unsuccessful, any subsequent requests after calling the `CredentialsCallback` will attempt to read/write on a closed pipe. (cherry picked from commit 9db5de109c166aa802b85cfae2dced3c4728a00d)
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b cherry-pick-2663196279-release-1.0 release-1.0
git pull origin cherry-pick-2663196279-release-1.0

Step 2:

Merge the changes and update on Gitea.
git checkout release-1.0
git merge --no-ff cherry-pick-2663196279-release-1.0
git push origin release-1.0
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#921
No description provided.