1 2.. GENERATED by help2rst.py. DO NOT EDIT DIRECTLY. 3 4.. program:: nghttp 5 6nghttp(1) 7========= 8 9SYNOPSIS 10-------- 11 12**nghttp** [OPTIONS]... <URI>... 13 14DESCRIPTION 15----------- 16 17HTTP/2 client 18 19.. describe:: <URI> 20 21 Specify URI to access. 22 23OPTIONS 24------- 25 26.. option:: -v, --verbose 27 28 Print debug information such as reception and 29 transmission of frames and name/value pairs. Specifying 30 this option multiple times increases verbosity. 31 32.. option:: -n, --null-out 33 34 Discard downloaded data. 35 36.. option:: -O, --remote-name 37 38 Save download data in the current directory. The 39 filename is derived from URI. If URI ends with '*/*', 40 'index.html' is used as a filename. Not implemented 41 yet. 42 43.. option:: -t, --timeout=<DURATION> 44 45 Timeout each request after <DURATION>. Set 0 to disable 46 timeout. 47 48.. option:: -w, --window-bits=<N> 49 50 Sets the stream level initial window size to 2\*\*<N>-1. 51 52.. option:: -W, --connection-window-bits=<N> 53 54 Sets the connection level initial window size to 55 2\*\*<N>-1. 56 57.. option:: -a, --get-assets 58 59 Download assets such as stylesheets, images and script 60 files linked from the downloaded resource. Only links 61 whose origins are the same with the linking resource 62 will be downloaded. nghttp prioritizes resources using 63 HTTP/2 dependency based priority. The priority order, 64 from highest to lowest, is html itself, css, javascript 65 and images. 66 67.. option:: -s, --stat 68 69 Print statistics. 70 71.. option:: -H, --header=<HEADER> 72 73 Add a header to the requests. Example: :option:`-H`\':method: PUT' 74 75.. option:: --trailer=<HEADER> 76 77 Add a trailer header to the requests. <HEADER> must not 78 include pseudo header field (header field name starting 79 with ':'). To send trailer, one must use :option:`-d` option to 80 send request body. Example: :option:`--trailer` 'foo: bar'. 81 82.. option:: --cert=<CERT> 83 84 Use the specified client certificate file. The file 85 must be in PEM format. 86 87.. option:: --key=<KEY> 88 89 Use the client private key file. The file must be in 90 PEM format. 91 92.. option:: -d, --data=<PATH> 93 94 Post FILE to server. If '-' is given, data will be read 95 from stdin. 96 97.. option:: -m, --multiply=<N> 98 99 Request each URI <N> times. By default, same URI is not 100 requested twice. This option disables it too. 101 102.. option:: -u, --upgrade 103 104 Perform HTTP Upgrade for HTTP/2. This option is ignored 105 if the request URI has https scheme. If :option:`-d` is used, the 106 HTTP upgrade request is performed with OPTIONS method. 107 108.. option:: -p, --weight=<WEIGHT> 109 110 Sets weight of given URI. This option can be used 111 multiple times, and N-th :option:`-p` option sets weight of N-th 112 URI in the command line. If the number of :option:`-p` option is 113 less than the number of URI, the last :option:`-p` option value is 114 repeated. If there is no :option:`-p` option, default weight, 16, 115 is assumed. The valid value range is 116 [1, 256], inclusive. 117 118.. option:: -M, --peer-max-concurrent-streams=<N> 119 120 Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value of 121 remote endpoint as if it is received in SETTINGS frame. 122 123 Default: ``100`` 124 125.. option:: -c, --header-table-size=<SIZE> 126 127 Specify decoder header table size. If this option is 128 used multiple times, and the minimum value among the 129 given values except for last one is strictly less than 130 the last value, that minimum value is set in SETTINGS 131 frame payload before the last value, to simulate 132 multiple header table size change. 133 134.. option:: --encoder-header-table-size=<SIZE> 135 136 Specify encoder header table size. The decoder (server) 137 specifies the maximum dynamic table size it accepts. 138 Then the negotiated dynamic table size is the minimum of 139 this option value and the value which server specified. 140 141.. option:: -b, --padding=<N> 142 143 Add at most <N> bytes to a frame payload as padding. 144 Specify 0 to disable padding. 145 146.. option:: -r, --har=<PATH> 147 148 Output HTTP transactions <PATH> in HAR format. If '-' 149 is given, data is written to stdout. 150 151.. option:: --color 152 153 Force colored log output. 154 155.. option:: --continuation 156 157 Send large header to test CONTINUATION. 158 159.. option:: --no-content-length 160 161 Don't send content-length header field. 162 163.. option:: --no-dep 164 165 Don't send dependency based priority hint to server. 166 167.. option:: --hexdump 168 169 Display the incoming traffic in hexadecimal (Canonical 170 hex+ASCII display). If SSL/TLS is used, decrypted data 171 are used. 172 173.. option:: --no-push 174 175 Disable server push. 176 177.. option:: --max-concurrent-streams=<N> 178 179 The number of concurrent pushed streams this client 180 accepts. 181 182.. option:: --expect-continue 183 184 Perform an Expect/Continue handshake: wait to send DATA 185 (up to a short timeout) until the server sends a 100 186 Continue interim response. This option is ignored unless 187 combined with the :option:`-d` option. 188 189.. option:: -y, --no-verify-peer 190 191 Suppress warning on server certificate verification 192 failure. 193 194.. option:: --ktls 195 196 Enable ktls. 197 198.. option:: --no-rfc7540-pri 199 200 Disable RFC7540 priorities. 201 202.. option:: --version 203 204 Display version information and exit. 205 206.. option:: -h, --help 207 208 Display this help and exit. 209 210 211 212The <SIZE> argument is an integer and an optional unit (e.g., 10K is 21310 * 1024). Units are K, M and G (powers of 1024). 214 215The <DURATION> argument is an integer and an optional unit (e.g., 1s 216is 1 second and 500ms is 500 milliseconds). Units are h, m, s or ms 217(hours, minutes, seconds and milliseconds, respectively). If a unit 218is omitted, a second is used as unit. 219 220DEPENDENCY BASED PRIORITY 221------------------------- 222 223nghttp sends priority hints to server by default unless 224:option:`--no-dep` is used. nghttp mimics the way Firefox employs to 225manages dependency using idle streams. We follows the behaviour of 226Firefox Nightly as of April, 2015, and nghttp's behaviour is very 227static and could be different from Firefox in detail. But reproducing 228the same behaviour of Firefox is not our goal. The goal is provide 229the easy way to test out the dependency priority in server 230implementation. 231 232When connection is established, nghttp sends 5 PRIORITY frames to idle 233streams 3, 5, 7, 9 and 11 to create "anchor" nodes in dependency 234tree: 235 236.. code-block:: text 237 238 +-----+ 239 |id=0 | 240 +-----+ 241 ^ ^ ^ 242 w=201 / | \ w=1 243 / | \ 244 / w=101| \ 245 +-----+ +-----+ +-----+ 246 |id=3 | |id=5 | |id=7 | 247 +-----+ +-----+ +-----+ 248 ^ ^ 249 w=1 | w=1 | 250 | | 251 +-----+ +-----+ 252 |id=11| |id=9 | 253 +-----+ +-----+ 254 255In the above figure, ``id`` means stream ID, and ``w`` means weight. 256The stream 0 is non-existence stream, and forms the root of the tree. 257The stream 7 and 9 are not used for now. 258 259The URIs given in the command-line depend on stream 11 with the weight 260given in :option:`-p` option, which defaults to 16. 261 262If :option:`-a` option is used, nghttp parses the resource pointed by 263URI given in command-line as html, and extracts resource links from 264it. When requesting those resources, nghttp uses dependency according 265to its resource type. 266 267For CSS, and Javascript files inside "head" element, they depend on 268stream 3 with the weight 2. The Javascript files outside "head" 269element depend on stream 5 with the weight 2. The mages depend on 270stream 11 with the weight 12. The other resources (e.g., icon) depend 271on stream 11 with the weight 2. 272 273SEE ALSO 274-------- 275 276:manpage:`nghttpd(1)`, :manpage:`nghttpx(1)`, :manpage:`h2load(1)` 277