Skip to content

RedirectPlugin is wrongly overwriting path and falsely detects circular redirect #217

Closed
@ostrolucky

Description

@ostrolucky

PHP version: 8.1.7

Description
Given HTTPlug requests http://foo/entry?deviceoutput=app
And URL above responds with redirect to http://foo?deviceoutput=app
Then RedirectPlugin falsely detects circular redirect

Possible Solution
I believe reason for this is because original request is used as a base object for target location here https://github.com/php-http/client-common/blob/master/src/Plugin/RedirectPlugin.php#L233

And path from it is not overridden if it's not specified in location header.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions