Skip to content

proxy: chunked response, error code#21084

Closed
icing wants to merge 3 commits intocurl:masterfrom
icing:proxy-chunked-error
Closed

proxy: chunked response, error code#21084
icing wants to merge 3 commits intocurl:masterfrom
icing:proxy-chunked-error

Conversation

@icing
Copy link
Copy Markdown
Contributor

@icing icing commented Mar 24, 2026

Add test1715 to check proper handling of chunked transfer encoding in CONNECT responses. Change proxy error code from 56 (RECV_ERROR) for everything to 7 (COULDNT_CONNECT) when the server response could be read successfully, but establishing the connection is not possible (http status code wrong).

Adapt several test expectations from 56 to 7.

Add test1715 to check proper handling of chunked transfer
encoding in CONNECT responses. Change proxy error code from
56 (RECV_ERROR) for everything to 7 (COULDNT_CONNECT) when
the server response could be read successfully, but establishing
the connection is not possible (http status code wrong).

Adapt several test expectations from 56 to 7.
@icing icing requested a review from bagder March 24, 2026 09:41
@bagder
Copy link
Copy Markdown
Member

bagder commented Mar 24, 2026

augment review

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 24, 2026

🤖 Augment PR Summary

Summary: Improves proxy CONNECT tunnel error reporting and adds coverage for tricky CONNECT responses.

Changes:

  • Adjust HTTP/1 CONNECT response draining to prioritize Transfer-Encoding: chunked over Content-Length when ignoring a response body.
  • Change CONNECT-tunnel failures with a fully readable non-2xx response to return CURLE_COULDNT_CONNECT (HTTP/1 and HTTP/2 proxy filters).
  • Add a new regression test (test1715) and update existing test expectations (including Python tests) to match the new exit code semantics.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@icing icing requested a review from bagder March 24, 2026 12:50
@bagder bagder closed this in a186ecf Mar 25, 2026
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.

2 participants