wg / wrk

Modern HTTP benchmarking tool
Other
38.1k stars 2.95k forks source link

No slash after domain drops GET query params #532

Open chedatomasz opened 1 year ago

chedatomasz commented 1 year ago

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