tatsuhiro-t/nghttp2 — pull request #91 by kennypeng (2014-10-21 08:34:48+00:00)
Title: Headers add/override and URI list file imports

These are 2 new features of h2load:

Feature I -- headers add/override
- Background: adding headers or overriding headers (like: :host) for load testing is a common and useful feature. Thus, I tried to implement -H option in h2load to support this.
- Implementation:
* add a new member custom_headers within config objects and push all values of -H options into it.
* For options of header :host, :scheme and :method will be overridden and others will be added.
- Usage:
$ h2load -n10 -c10 -m1 -H':host: it.cinema.yahoo.com' \
-H'ccept-encoding: gzip' \
-H'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.122 Safari/537.36' \
https://media-border2.global.media.yahoo.com/

Feature || -- URI list file imports
- Background: although current h2load support multiple URIs as arguments, too many URIs input by arguments causes long input and hard to management. Thus, accept a URI list file which contain all URIs might be a good way to manage different load tests.
- Implementation:
* include fstream
* change usage, neither using URIs nor URI_LIST_FILE path.
- Usage:
$ cat test_uris
https://www.google.com/
https://www.google.com/#q=http2
https://www.google.com/#tbm=shop&q=server
https://www.google.com/#q=git&tbm=bks
$ h2load -n10 -c10 -m1test_uris