Skip to content

Conversation

@metcoder95
Copy link
Member

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@metcoder95 metcoder95 marked this pull request as ready for review September 12, 2025 09:01
Copy link
Contributor

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 corrects the CONNECT behavior for HTTP/2 connections by properly handling the response headers and status codes.

  • Updates the CONNECT method handling to wait for the 'response' event before calling onUpgrade
  • Passes the actual status code and parsed headers to the onUpgrade callback instead of null values
  • Adds comprehensive test coverage for CONNECT functionality with a proxy server scenario

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/dispatcher/client-h2.js Updated CONNECT method handling to properly process response headers and status codes
test/http2.js Added comprehensive test for CONNECT functionality and updated existing test structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

RSLGTM

(because this is rn over my head :D)

@metcoder95 metcoder95 merged commit 9bc0741 into main Sep 17, 2025
34 checks passed
@metcoder95 metcoder95 deleted the h2_connect branch September 17, 2025 21:22
@github-actions github-actions bot mentioned this pull request Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants