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

Merged
clns merged 1 commits from http-basic-auth into main 2022-07-13 06:50:31 -05:00

1 Commits

Author SHA1 Message Date
calin 8f8289976a Set BasicAuth in http.go only if username and password are not empty
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.
2022-04-20 21:38:04 -06:00