Skip to content

Commit

Permalink
Fix swupd operations when curl is not HTTP2-enabled
Browse files Browse the repository at this point in the history
To support running swupd on distros without an HTTP2-enabled curl
package, explicitly check for the "unsupported protocol" error, returned
by libcurl in this event.

Signed-off-by: Patrick McCarty <[email protected]>
  • Loading branch information
phmccarty committed Sep 7, 2016
1 parent 706a755 commit f442666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ CURLcode swupd_curl_set_basic_options(CURL *curl, const char *url)
}

curl_ret = curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
if (curl_ret != CURLE_OK) {
if (curl_ret != CURLE_OK && curl_ret != CURLE_UNSUPPORTED_PROTOCOL) {
goto exit;
}

Expand Down

0 comments on commit f442666

Please sign in to comment.