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

[BrowserKit] odd handling of HTTP_HOST header in Client::request  #15398

Copy link
Copy link
Closed
@Naktibalda

Description

@Naktibalda
Issue body actions
  1. If HTTP_HOST is set in $server parameter of request method, it overrides hostname part of URI.
    https://github.com/symfony/BrowserKit/blob/292751e7b351b1e7d400c7529c07d713af2ff92a/Client.php#L299
  2. HTTP_HOST header is set to hostname part of URI.
    https://github.com/symfony/BrowserKit/blob/292751e7b351b1e7d400c7529c07d713af2ff92a/Client.php#L313
  3. HTTP_HOST set with setServerParameters is completely ignored.

The first action is completely unexpected and should be removed.
The second action should only be used if HTTP_HOST is not set in $server.
Currently it is set to localhost by default
which is never used, so it should be removed.

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.