Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@HeahDude

Description

@HeahDude
Issue body actions
Q A
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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.