-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Browserkit client https fix #32293
Browserkit client https fix #32293
Conversation
I‘m still not sure about this. Maybe we should keep the boolean and also just pass „on“ to the request object if the HTTPS value ist „true“ (less changes). On the other hand: It’s a wrong value and we also pass other server values as they are - so the current pr is more consistent. |
@@ -302,7 +302,9 @@ public function request($method, $uri, array $parameters = [], array $files = [] | |||
$server['HTTP_HOST'] = $this->extractHost($uri); | |||
} | |||
|
|||
$server['HTTPS'] = 'https' == parse_url($uri, PHP_URL_SCHEME); |
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.
I think we should do the smallest possible change.
What about this?
$server['HTTPS'] = (int) ('https' == parse_url($uri, PHP_URL_SCHEME));
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.
Isn't it a BC break?
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.
@fabpot i just rechecked the whole thing. In fact, the "https" value always gets redefined in the client object, no matter which value $server
is passing. So i think it's not a real bc break. You could pass any https
value in $server => request()
, it always checks against the url scheme via parse_url
:
$server['HTTPS'] = 'https' == parse_url($uri, PHP_URL_SCHEME); |
fad6f34
to
081c601
Compare
Thanks for reporting, now that this is fixed on Guzzle's side, no need to change anything here. |
@nicolas-grekas you might want to reconsider since this might be the behavior of guzzle psr7 on version 2 |
But then the issue would lie in the code bridging this class (which doesn't know anything about Guzzle) and Guzzle. |
This PR fixes the wrong server header type
HTTPS
(currently boolean) which should be not available if not true oron
if request is in https mode.