-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parsing CONNECT request without Host header #201
Conversation
Since we already have code in |
$data = "CONNECT example.com:443 HTTP/1.1\r\n\r\n"; | ||
$this->connection->emit('data', array($data)); | ||
|
||
$this->assertInstanceOf('RingCentral\Psr7\Request', $requestAssertion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this test against Psr\Http\Message\ServerRequestInterface
instead of the implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no :-)
This test is in line with all other tests, but I agree that we should also change all other tests as well. I'll keep this as-is for now and will look into filing a follow-up clean-up PR? 👍
Yes and no :-) Given the current state of the repo, both are actually valid options and I'd vote to just tag a Only a single other PR has been merged to the We could maintain separate release branches, but this would actually require additional effort right now and would provide very little value otherwise. We would have to file this PR against the My vote would be to get this fix out rather sooner than later, but I'm open to either option 👍 |
Using master sounds good to me then 👍 |
This means that all of these examples now correctly return the same URI and also the same Host header value example.com without the default port in this case:
Builds on top of #158 and #173