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
When wrk is called on an address such as
example.com?key=val
, it quietly truncates toexample.com/
and skips the query params. This is different to the behaviour of other tools such as curl, which correctsexample.com?key=val
toexample.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