-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Hi,
We have upgraded libcurl and now it supports HTTP/2 protocol.
After the upgrade ppconsul fails if I try to loads keys or items with BadException.
The reason of the failure is the HTTP response did not match with http/2 response (HTTP/2 200).
As a short term solution I made this small change to force HTTP 1.1:
--- a/src/curl/http_client.cpp
+++ b/src/curl/http_client.cpp
@@ -80,6 +80,7 @@ namespace ppconsul { namespace curl {
size_t headerCallback(char *ptr, size_t size_, size_t nitems, void *outputResponse_)
{
+
const auto size = size_ * nitems;
auto outputResponse = reinterpret_cast<CurlHttpClient::GetResponse *>(outputResponse_);
@@ -236,6 +237,7 @@ namespace ppconsul { namespace curl {
setopt(CURLOPT_SSL_VERIFYSTATUS, 1l);
#endif
}
+ setopt(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
}
CurlHttpClient::~CurlHttpClient() = default;
Regards,
Metadata
Metadata
Assignees
Labels
No labels