[WIP] Use a managed HTTP(S) transport implementation #374

Closed
carlosmn wants to merge 15 commits from cmn/go-http into main
1 changed files with 3 additions and 0 deletions
Showing only changes of commit 2aa2ae5150 - Show all commits

View File

@ -208,6 +208,9 @@ func (self *ManagedHttpStream) sendRequest() error {
if resp.StatusCode == http.StatusUnauthorized {
resp.Body.Close()
var cred *C.git_cred
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ret := C.git_transport_smart_credentials(&cred, self.owner.owner, nil, C.GIT_CREDTYPE_USERPASS_PLAINTEXT)
if ret != 0 {