Skip to content

Commit bd63763

Browse files
authored
Set http.version=HTTP/1.1 in supports_gvfs_protocol() (#759)
The way the `gvfs-helper` command operates is apparently incompatible with HTTP/2, that's why #754 tried to enforce HTTP/1.1 in Scalar clones accessing Azure Repos. However, this fix was incomplete for the `scalar clone` part because it made the HTTP/1.1 enforcement contingent on the test whether the remote repository supports the GVFS protocol or not, and that test did _not_ enforce HTTP/1.1. Let's fix that Catch-22 by enforcing HTTP/1.1 usage during that GVFS Protocol capability test.
2 parents 1030eb5 + 399177b commit bd63763

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scalar.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,8 @@ static int supports_gvfs_protocol(const char *url, char **cache_server_url)
467467
return 0;
468468

469469
cp.git_cmd = 1;
470-
strvec_pushl(&cp.args, "gvfs-helper", "--remote", url, "config", NULL);
470+
strvec_pushl(&cp.args, "-c", "http.version=HTTP/1.1",
471+
"gvfs-helper", "--remote", url, "config", NULL);
471472
if (!pipe_command(&cp, NULL, 0, &out, 512, NULL, 0)) {
472473
long l = 0;
473474
struct json_iterator it =

0 commit comments

Comments
 (0)