pull: If built with --disable-http2, allow enabling via http2=1

We have a `http2=[0|1]` remote config option; let's have the
`--disable-http2` build option define the default for that.  This way
it's easy to still enable http2 for testing even if
we have it disabled by default.

Closes: #1798
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2019-01-09 15:04:27 +00:00
1 parent fa35ec38b7
commit 308d30d080
2 files changed
+8 -4

No files matched your search

+7 -2
View File
@@ -2948,9 +2948,14 @@ _ostree_repo_remote_new_fetcher (OstreeRepo *self,
if (gzip)
fetcher_flags |= OSTREE_FETCHER_FLAGS_TRANSFER_GZIP;
{ gboolean http2 = TRUE;
{ gboolean http2_default = TRUE;
#ifndef BUILDOPT_HTTP2
http2_default = FALSE;
#endif
gboolean http2;
if (!ostree_repo_get_remote_boolean_option (self, remote_name,
"http2", TRUE,
"http2", http2_default,
&http2, error))
goto out;
if (!http2)