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

Need to set Accepted-Encoding header #505

Open
nyurik opened this issue May 26, 2024 · 1 comment
Open

Need to set Accepted-Encoding header #505

nyurik opened this issue May 26, 2024 · 1 comment

Comments

@nyurik
Copy link

nyurik commented May 26, 2024

I was doing some testing of the Martin tile server using OHA, and in this case Brotli compression seems to be the culprit. Using oha --disable-compression does not allow proper gzip vs br testing.

Please add --accepted-encoding parameter that allows custom header parameters.

Thanks for the great tool!

@hatoo
Copy link
Owner

hatoo commented May 27, 2024

You can add a custom header using -H option and it overwrites the default header value.

oha -n 1 http://localhost:3000 -H "accept-encoding: gzip"
✦ ❯ nc -l 3000
GET / HTTP/1.1
accept: */*
accept-encoding: gzip
user-agent: oha/1.4.4
host: localhost:3000

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

No branches or pull requests

2 participants