fix: force HTTP/1.1 for SSE streaming to avoid HTTP/2 framing errors

This commit is contained in:
russell@unturf.com 2026-02-01 17:23:33 -05:00
parent 296a4fe056
commit 3bcf52e96f

View file

@ -2909,6 +2909,8 @@ static int stream_paas_logs(const UnsandboxCredentials *creds,
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, stream_sse_callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, NULL);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "un-cli/2.0");
// Force HTTP/1.1 — SSE streaming breaks with HTTP/2 framing
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
// No timeout — stream until interrupted
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 0L);
// Low-speed limit to detect dead connections (10 bytes in 120s accounts for keepalives)