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

[RFC] [BrowserKit] HTTPS and HTTP_HOST - uri vs server precedence #22933

HeahDude opened this Issue May 28, 2017 · 0 comments


None yet
3 participants

HeahDude commented May 28, 2017

Bug report? yes
Feature request? no
BC Break report? yes
RFC? yes
Symfony version 3.4

Hello everyone.

It seems that we broke BC by merging #16265 in lower branches. The break was reported #17601, and yet the documentation needs some clarification too, see symfony/symfony-docs#6421.

The problem comes from the precedence of the uri passed to the client over the server parameters.

I must say I don't really understand the original bug since we're simulating the http context, and why we had to fix it since the fix basically reverts #10549.

And if there was a problem back then for HTTP_HOST, it still exists for HTTPS.

I encountered the BC break while migrating an app from Symfony 2.6 to 2.8.

Use case: dynamic sub domains need to be defined per request and this was done thanks to the server var HTTP_HOST while relative paths are always used in WebTestCase by convention, same as the doc issue.

I understand that it is now too late to revert that fix in 2.x branches, but I think we should definitely fix this is 3.4 by deprecating one way or the other, because in the end, the uri requested is not "synchronized" with those variables in some cases.

I suggest to deprecated the precedence of the guessing from uri in favor of server parameters for both HTTPS and HOST.

What do you think is best? Thanks!

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