Skip to content

No slash after domain drops GET query params #532

@chedatomasz

Description

@chedatomasz

When wrk is called on an address such as example.com?key=val, it quietly truncates to example.com/ and skips the query params.
This is different to the behaviour of other tools such as curl, which corrects example.com?key=val to example.com/?key=val.

Technically any behaviour is correct because example.com?key=val is not a valid URL - the standard allows omitting the training slash representing the empty path only when the query params are used (https://www.rfc-editor.org/rfc/rfc1738#section-3.3)

However, given the behaviour of other tools and user experience (this took a LONG time to track down), I believe either rewriting like curl or failing explicitly is vastly preferable to the current rewriting and the current behaviour should be treated as a bug.
@wg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions