Skip to content

Commit a807e37

Browse files
committed
Merge pull request libgit2#5852 from implausible/httpclient/skip-entire-body
1 parent 7617d1f commit a807e37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/transports/httpclient.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ static int generate_request(
734734
git_buf_printf(buf, "Expect: 100-continue\r\n");
735735

736736
if ((error = apply_server_credentials(buf, client, request)) < 0 ||
737-
(error = apply_proxy_credentials(buf, client, request)) < 0)
737+
(!client->proxy_connected && (error = apply_proxy_credentials(buf, client, request)) < 0))
738738
return error;
739739

740740
if (request->custom_headers) {
@@ -1503,7 +1503,7 @@ int git_http_client_skip_body(git_http_client *client)
15031503
"unexpected data handled in callback");
15041504
error = -1;
15051505
}
1506-
} while (!error);
1506+
} while (error >= 0 && client->state != DONE);
15071507

15081508
if (error < 0)
15091509
client->connected = 0;

0 commit comments

Comments
 (0)