Skip to content

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

Open
shashanklmurthy wants to merge 1 commit intorakyll:masterfrom
shashanklmurthy:fix-host-header
Open

fix: default the retrieval of the Host header if passed using -H#278
shashanklmurthy wants to merge 1 commit intorakyll:masterfrom
shashanklmurthy:fix-host-header

Conversation

@shashanklmurthy
Copy link

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

Signed-off-by: Shashank Murthy [email protected]

@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