Website Security & Threat Management
Go and enhance your calm- demolishing an HTTP:2 interop problem

Go and enhance your calm- demolishing an HTTP:2 interop problem

10/31/2025 · Lucas Pardue, Zak Cutner

What this post added

This post details a specific instance of an internal microservice communication hitting Cloudflare's HTTP/2 PING flood mitigation (ENHANCE_YOUR_CALM). It explains the underlying Go standard library behavior where calling `resp.Body.Close()` without fully reading the response body can lead to unnecessary RST_STREAM frames, which in turn can trigger PING flood detection. The post provides a solution by ensuring the response body is fully read using `io.Copy(io.Discard, resp.Body)` before closing it, and offers a more robust pattern for handling response bodies in Go clients.

Read the original post ↗