Skip to content

Conversation

@clue
Copy link
Owner

@clue clue commented Apr 12, 2024

This changeset improves consistency when parsing incoming HTTP proxy requests using the CONNECT request method when using the PHP SAPI. We already reject any such requests with a 400 Bad Request error response consistently (see #46). On top of this, we now also consistently parse the request URI in case the request will be processed through any global request middleware handlers. This does not otherwise affect our public API and comes with full code coverage, so this should be safe to apply.

In particular, ReactPHP now ships a new PSR-7 implementation and no longer uses the dated RingCentral PSR-7 implementation. The updated tests are now in line with the requirements outlined by PSR-7 which are now properly enforced via reactphp/http#521 and reactphp/http#522. Specifically, a CONNECT request now uses a request URI with the appropriate scheme specified. The previous test used incorrect assumptions provided by the dated RingCentral PSR-7 implementation and has been in place ever since #46 has been merged several years ago.

Builds on top of #46, reactphp/http#521, reactphp/http#201, reactphp/http#158 and others

@clue clue added the new feature New feature or request label Apr 12, 2024
@clue clue requested a review from SimonFrings April 12, 2024 20:44
@clue clue force-pushed the connect-request branch from 81fd4b3 to 2b2c499 Compare April 12, 2024 20:50
@clue clue added this to the v0.17.0 milestone Apr 12, 2024
Copy link
Contributor

@SimonFrings SimonFrings left a comment

Choose a reason for hiding this comment

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

Looks good, let's get this in 👍

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

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants