Skip to content

cf-h2-proxy: drop interim responses#21626

Closed
icing wants to merge 2 commits into
curl:masterfrom
icing:cf-h2-proxy-drop-interims
Closed

cf-h2-proxy: drop interim responses#21626
icing wants to merge 2 commits into
curl:masterfrom
icing:cf-h2-proxy-drop-interims

Conversation

@icing
Copy link
Copy Markdown
Contributor

@icing icing commented May 15, 2026

Any 1xx response before the CONNECT final one can be dropped as no one uses those in the HTTP/2 proxy filter. This eliminates a potential memory exhaustion by the famous malicious server on the internet.

Any 1xx response before the CONNECT final one can be dropped as no one
uses those in the HTTP/2 proxy filter. This eliminates a potential
memory exhaustion by the famous malicious server on the internet.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces memory exposure in the HTTP/2 proxy CONNECT path by discarding previously received interim responses instead of retaining a response chain.

Changes:

  • Frees any existing tunnel response before storing the newly parsed HTTP/2 CONNECT response.
  • Keeps only the most recent response for final CONNECT response handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/cf-h2-proxy.c
@bagder bagder closed this in 12d6d8e May 15, 2026
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Any 1xx response before the CONNECT final one can be dropped as no one
uses those in the HTTP/2 proxy filter. This eliminates a potential
memory exhaustion by the famous malicious server on the internet.

Closes curl#21626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants