hatoo / oha

Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation.
MIT License
5.62k stars 138 forks source link

Need to set `Accepted-Encoding` header #505

Open nyurik opened 4 months ago

nyurik commented 4 months ago

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 commented 4 months ago

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