Prevents content-type duplication. If the header name is present, it will be removed from the value provided in flag -T.
Currently an invocation like: hey -m POST -T 'Content-Type: application/json' -d '{"foo": "bar"}' http://localhost will make the header be set to 'Content-Type:Content-Type: application/json'
The introduced change fixes the user mistake by deduplicating "Content-Type" so the above example produces the intended request.
Hope this prevents unnecessary headaches for users :)
Prevents content-type duplication. If the header name is present, it will be removed from the value provided in flag -T.
Currently an invocation like:
hey -m POST -T 'Content-Type: application/json' -d '{"foo": "bar"}' http://localhost
will make the header be set to'Content-Type:Content-Type: application/json'
The introduced change fixes the user mistake by deduplicating
"Content-Type"
so the above example produces the intended request.Hope this prevents unnecessary headaches for users :)