1 .\" Man page generated from reStructuredText.
3 .TH "NGHTTP" "1" "Oct 19, 2021" "1.46.0" "nghttp2"
5 nghttp \- HTTP/2 client
7 .nr rst2man-indent-level 0
11 level \\n[rst2man-indent-level]
12 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
19 .\" .rstReportMargin pre:
21 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
22 . nr rst2man-indent-level +1
23 .\" .rstReportMargin post:
27 .\" indent \\n[an-margin]
28 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .nr rst2man-indent-level -1
30 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
31 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
35 \fBnghttp\fP [OPTIONS]... <URI>...
42 Specify URI to access.
48 Print debug information such as reception and
49 transmission of frames and name/value pairs. Specifying
50 this option multiple times increases verbosity.
55 Discard downloaded data.
59 .B \-O, \-\-remote\-name
60 Save download data in the current directory. The
61 filename is derived from URI. If URI ends with \(aq\fI/\fP\(aq,
62 \(aqindex.html\(aq is used as a filename. Not implemented
67 .B \-t, \-\-timeout=<DURATION>
68 Timeout each request after <DURATION>. Set 0 to disable
73 .B \-w, \-\-window\-bits=<N>
74 Sets the stream level initial window size to 2**<N>\-1.
78 .B \-W, \-\-connection\-window\-bits=<N>
79 Sets the connection level initial window size to
84 .B \-a, \-\-get\-assets
85 Download assets such as stylesheets, images and script
86 files linked from the downloaded resource. Only links
87 whose origins are the same with the linking resource
88 will be downloaded. nghttp prioritizes resources using
89 HTTP/2 dependency based priority. The priority order,
90 from highest to lowest, is html itself, css, javascript
100 .B \-H, \-\-header=<HEADER>
101 Add a header to the requests. Example: \fI\%\-H\fP\(aq:method: PUT\(aq
105 .B \-\-trailer=<HEADER>
106 Add a trailer header to the requests. <HEADER> must not
107 include pseudo header field (header field name starting
108 with \(aq:\(aq). To send trailer, one must use \fI\%\-d\fP option to
109 send request body. Example: \fI\%\-\-trailer\fP \(aqfoo: bar\(aq.
114 Use the specified client certificate file. The file
115 must be in PEM format.
120 Use the client private key file. The file must be in
125 .B \-d, \-\-data=<PATH>
126 Post FILE to server. If \(aq\-\(aq is given, data will be read
131 .B \-m, \-\-multiply=<N>
132 Request each URI <N> times. By default, same URI is not
133 requested twice. This option disables it too.
138 Perform HTTP Upgrade for HTTP/2. This option is ignored
139 if the request URI has https scheme. If \fI\%\-d\fP is used, the
140 HTTP upgrade request is performed with OPTIONS method.
144 .B \-p, \-\-weight=<WEIGHT>
145 Sets weight of given URI. This option can be used
146 multiple times, and N\-th \fI\%\-p\fP option sets weight of N\-th
147 URI in the command line. If the number of \fI\%\-p\fP option is
148 less than the number of URI, the last \fI\%\-p\fP option value is
149 repeated. If there is no \fI\%\-p\fP option, default weight, 16,
150 is assumed. The valid value range is
155 .B \-M, \-\-peer\-max\-concurrent\-streams=<N>
156 Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value of
157 remote endpoint as if it is received in SETTINGS frame.
163 .B \-c, \-\-header\-table\-size=<SIZE>
164 Specify decoder header table size. If this option is
165 used multiple times, and the minimum value among the
166 given values except for last one is strictly less than
167 the last value, that minimum value is set in SETTINGS
168 frame payload before the last value, to simulate
169 multiple header table size change.
173 .B \-\-encoder\-header\-table\-size=<SIZE>
174 Specify encoder header table size. The decoder (server)
175 specifies the maximum dynamic table size it accepts.
176 Then the negotiated dynamic table size is the minimum of
177 this option value and the value which server specified.
181 .B \-b, \-\-padding=<N>
182 Add at most <N> bytes to a frame payload as padding.
183 Specify 0 to disable padding.
187 .B \-r, \-\-har=<PATH>
188 Output HTTP transactions <PATH> in HAR format. If \(aq\-\(aq
189 is given, data is written to stdout.
194 Force colored log output.
199 Send large header to test CONTINUATION.
203 .B \-\-no\-content\-length
204 Don\(aqt send content\-length header field.
209 Don\(aqt send dependency based priority hint to server.
214 Display the incoming traffic in hexadecimal (Canonical
215 hex+ASCII display). If SSL/TLS is used, decrypted data
225 .B \-\-max\-concurrent\-streams=<N>
226 The number of concurrent pushed streams this client
231 .B \-\-expect\-continue
232 Perform an Expect/Continue handshake: wait to send DATA
233 (up to a short timeout) until the server sends a 100
234 Continue interim response. This option is ignored unless
235 combined with the \fI\%\-d\fP option.
239 .B \-y, \-\-no\-verify\-peer
240 Suppress warning on server certificate verification
246 Display version information and exit.
251 Display this help and exit.
254 The <SIZE> argument is an integer and an optional unit (e.g., 10K is
255 10 * 1024). Units are K, M and G (powers of 1024).
257 The <DURATION> argument is an integer and an optional unit (e.g., 1s
258 is 1 second and 500ms is 500 milliseconds). Units are h, m, s or ms
259 (hours, minutes, seconds and milliseconds, respectively). If a unit
260 is omitted, a second is used as unit.
261 .SH DEPENDENCY BASED PRIORITY
263 nghttp sends priority hints to server by default unless
264 \fI\%\-\-no\-dep\fP is used. nghttp mimics the way Firefox employs to
265 manages dependency using idle streams. We follows the behaviour of
266 Firefox Nightly as of April, 2015, and nghttp\(aqs behaviour is very
267 static and could be different from Firefox in detail. But reproducing
268 the same behaviour of Firefox is not our goal. The goal is provide
269 the easy way to test out the dependency priority in server
272 When connection is established, nghttp sends 5 PRIORITY frames to idle
273 streams 3, 5, 7, 9 and 11 to create "anchor" nodes in dependency
287 +\-\-\-\-\-+ +\-\-\-\-\-+ +\-\-\-\-\-+
288 |id=3 | |id=5 | |id=7 |
289 +\-\-\-\-\-+ +\-\-\-\-\-+ +\-\-\-\-\-+
293 +\-\-\-\-\-+ +\-\-\-\-\-+
295 +\-\-\-\-\-+ +\-\-\-\-\-+
301 In the above figure, \fBid\fP means stream ID, and \fBw\fP means weight.
302 The stream 0 is non\-existence stream, and forms the root of the tree.
303 The stream 7 and 9 are not used for now.
305 The URIs given in the command\-line depend on stream 11 with the weight
306 given in \fI\%\-p\fP option, which defaults to 16.
308 If \fI\%\-a\fP option is used, nghttp parses the resource pointed by
309 URI given in command\-line as html, and extracts resource links from
310 it. When requesting those resources, nghttp uses dependency according
311 to its resource type.
313 For CSS, and Javascript files inside "head" element, they depend on
314 stream 3 with the weight 2. The Javascript files outside "head"
315 element depend on stream 5 with the weight 2. The mages depend on
316 stream 11 with the weight 12. The other resources (e.g., icon) depend
317 on stream 11 with the weight 2.
320 \fBnghttpd(1)\fP, \fBnghttpx(1)\fP, \fBh2load(1)\fP
324 2012, 2015, 2016, Tatsuhiro Tsujikawa
325 .\" Generated by docutils manpage writer.