Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim header name, if present, from flag -T value #242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ezeql
Copy link

@ezeql ezeql commented May 5, 2021

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant