Skip to content

Commit a397c96

Browse files
cynthiajianga-maurice
authored andcommitted
Fix integration test caused by curl http2 default setting
PiperOrigin-RevId: 317136423
1 parent 6b100bc commit a397c96

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/rest/transport_curl.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ bool BackgroundTransportCurl::PerformBackground(Request* request) {
474474
CheckOk(curl_easy_setopt(curl_, CURLOPT_TIMEOUT_MS, options.timeout_ms),
475475
"set http timeout milliseconds");
476476

477+
// curl library is using http2 as default, so need to specify this.
478+
CheckOk(curl_easy_setopt(curl_, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1),
479+
"set http version to http1");
480+
477481
// SDK error in initialization stage is not recoverable.
478482
FIREBASE_ASSERT(err_code_ == CURLE_OK);
479483

0 commit comments

Comments
 (0)