The problem is described in https://github.com/encode/httpcore/discussions/921 I made a proposal how to fix it in a comment