Skip to content

Draft: Fix/rapid CDN http2 support bad backend

When backend behavior is unexpected, like 444 then CDN on http/2 results with damaged reply like "Secure Connection Failed", can be observed with curl:

while :; do curl -D - --http2 https://example.com/ ; done
curl: (56) Connection died, tried 5 times before giving up
curl: (56) Connection died, tried 5 times before giving up
HTTP/2 502
content-length: 107
cache-control: no-cache
content-type: text/html
via: HTTP/1.1 rapid-cdn-backend-XXX
date: Fri, 22 May 2026 09:08:50 GMT
via: HTTP/2.0 rapid-cdn-frontend-XXX

<html><body><h1>502 Bad Gateway</h1>
The server returned an invalid or incomplete response.
</body></html>

It means that sometimes the CDN correctly replies like with http/1:

curl -D - --http1.1 https://example.com/
HTTP/1.1 502 Bad Gateway
content-length: 107
cache-control: no-cache
content-type: text/html
via: HTTP/1.1 rapid-cdn-backend-XXX
date: Fri, 22 May 2026 09:18:41 GMT
via: HTTP/1.1 rapid-cdn-frontend-XXX

<html><body><h1>502 Bad Gateway</h1>
The server returned an invalid or incomplete response.
</body></html>

CDN shall work the same for http/1.1, http/2 and http3.

Tests are missing for this case for all types of connection.

Merge request reports