Commit 1e987525b3bd86fc29e7ff67d973861efd22faf7

Edward Thomson 2020-09-08T17:25:06

Merge pull request #5624 from csware/http-upgrade-header Don't fail if a HTTP server announces he supports a protocol upgrade

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/transports/httpclient.c b/src/transports/httpclient.c
index dda2678..3c940c9 100644
--- a/src/transports/httpclient.c
+++ b/src/transports/httpclient.c
@@ -1120,11 +1120,6 @@ GIT_INLINE(int) client_read_and_parse(git_http_client *client)
 		return -1;
 	}
 
-	if (parser->upgrade) {
-		git_error_set(GIT_ERROR_HTTP, "server requested upgrade");
-		return -1;
-	}
-
 	if (ctx->parse_status == PARSE_STATUS_ERROR) {
 		client->connected = 0;
 		return ctx->error ? ctx->error : -1;