Skip to content

Commit 2dea3eb

Browse files
committed
Don't fail if a HTTP server announces he supports a protocol upgrade
cf. RFC7230 section 6.7, an Upgrade header in a normal response merely informs the client that the server supports upgrading to other protocols, and the client can ask for such an upgrade in a later request. The server requiring an upgrade is via the 426 Upgrade Required response code, not the mere presence of the Upgrade response header. (closes issue libgit2#5573) Signed-off-by: Sven Strickroth <email@cs-ware.de>
1 parent f29e6dd commit 2dea3eb

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/transports/httpclient.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,11 +1120,6 @@ GIT_INLINE(int) client_read_and_parse(git_http_client *client)
11201120
return -1;
11211121
}
11221122

1123-
if (parser->upgrade) {
1124-
git_error_set(GIT_ERROR_HTTP, "server requested upgrade");
1125-
return -1;
1126-
}
1127-
11281123
if (ctx->parse_status == PARSE_STATUS_ERROR) {
11291124
client->connected = 0;
11301125
return ctx->error ? ctx->error : -1;

0 commit comments

Comments
 (0)