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

[HttpClient] URL with colon is not correctly parsed #58313

Copy link
Copy link
Closed
@philipzeyen

Description

@philipzeyen
Issue body actions

Symfony version(s) affected

5.4

Description

The HttpClientTrait::parseUrl Method cannot parse Urls containing a colon correctly.
EDIT: Solution developed in #58218 does not fix this problem

How to reproduce

$client = new NativeHttpClient([ // this client can be replaced with others
    'base_uri' => 'https://host.tld/'
]);
$response = $client->request(Request::METHOD_DELETE, 'foo/bar:1/baz');
// throws following exception: 'Symfony\Component\HttpClient\Exception\TransportException: Could not resolve host "foo"'

Possible Solution

Adding the configured base_uri before calling PHPs parse_url

Additional Context

No response

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.