Skip to content

Conversation

f0ssel
Copy link
Collaborator

@f0ssel f0ssel commented Sep 16, 2025

Replaces http.ReadRequest with incremental header parsing to fix hanging issues with streaming requests and CONNECT tunnels.

Key changes:

  • parseHTTPRequestHeaders: Parse headers line-by-line without reading body
  • streamRequestToTarget: Bidirectional streaming between client and target
  • handleConnectStreaming: Proper CONNECT tunnel handling (basic version)
  • Rule evaluation on headers only, before body streaming begins

This should fix the hanging issues with claude and other clients that use streaming requests or CONNECT tunnels.

Replaces http.ReadRequest with incremental header parsing to fix
hanging issues with streaming requests and CONNECT tunnels.

Key changes:
- parseHTTPRequestHeaders: Parse headers line-by-line without reading body
- streamRequestToTarget: Bidirectional streaming between client and target
- handleConnectStreaming: Proper CONNECT tunnel handling (basic version)
- Rule evaluation on headers only, before body streaming begins

This should fix the hanging issues with claude and other clients
that use streaming requests or CONNECT tunnels.
@f0ssel f0ssel merged commit d3a2bb7 into main Sep 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant