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

fix: default the retrieval of the Host header if passed using -H #278

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

Conversation

shashanklmurthy
Copy link

Defaults the host header to the one passed using the -H option

Signed-off-by: Shashank Murthy shashank.murthy@olacabs.com

Signed-off-by: Shashank Murthy <shashank.murthy@olacabs.com>
@shashanklmurthy
Copy link
Author

@rakyll - for approval

@jclegras
Copy link

jclegras commented Sep 5, 2022

Overall, we have two possibilities to set the Host currently, --host and -H Host: blabla (the latter doesn't work currently indeed)

Nonetheless, why two possibilities for the same purpose ? I would agree with the fact that -H Host: blabla is the most common one

@shashanklmurthy
Copy link
Author

shashanklmurthy commented Sep 15, 2022

@jclegras - The two ways of doing this does seem wonky but my assessment would be that since -H allows us to pass any arbitrary header, why should the tool explicitly choose to ignore only the Host header?

Whilst trying to use this to simulate a load test, I ran into an issue due to the host not being passed through the headers which I thought was a weird behaviour given that I was passing all the rest of the headers the same way and seeing them in the downstream application,

I would favour keeping the two options so that a user could do it one way or another (setting both -host and -H Host: blah would make the -host option take precedence) just to be safe.

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.

2 participants