2015-01-09 16:37:42 +01:00
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
|
.
|
2016-06-09 16:36:30 +02:00
|
|
|
.TH "NGHTTP" "1" "June 09, 2016" "1.12.0-DEV" "nghttp2"
|
2014-02-15 08:46:11 +01:00
|
|
|
.SH NAME
|
2015-10-25 09:05:48 +01:00
|
|
|
nghttp \- HTTP/2 client
|
2015-01-09 16:37:42 +01:00
|
|
|
.
|
|
|
|
.nr rst2man-indent-level 0
|
|
|
|
.
|
|
|
|
.de1 rstReportMargin
|
|
|
|
\\$1 \\n[an-margin]
|
|
|
|
level \\n[rst2man-indent-level]
|
|
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
-
|
|
|
|
\\n[rst2man-indent0]
|
|
|
|
\\n[rst2man-indent1]
|
|
|
|
\\n[rst2man-indent2]
|
|
|
|
..
|
|
|
|
.de1 INDENT
|
|
|
|
.\" .rstReportMargin pre:
|
|
|
|
. RS \\$1
|
|
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
|
. nr rst2man-indent-level +1
|
|
|
|
.\" .rstReportMargin post:
|
|
|
|
..
|
|
|
|
.de UNINDENT
|
|
|
|
. RE
|
|
|
|
.\" indent \\n[an-margin]
|
|
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.nr rst2man-indent-level -1
|
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
|
..
|
2014-02-15 08:46:11 +01:00
|
|
|
.SH SYNOPSIS
|
2015-01-09 16:37:42 +01:00
|
|
|
.sp
|
|
|
|
\fBnghttp\fP [OPTIONS]... <URI>...
|
2014-02-15 08:46:11 +01:00
|
|
|
.SH DESCRIPTION
|
2015-01-09 16:37:42 +01:00
|
|
|
.sp
|
2015-10-19 17:22:03 +02:00
|
|
|
HTTP/2 client
|
2015-01-09 16:37:42 +01:00
|
|
|
.INDENT 0.0
|
2014-05-16 16:54:09 +02:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B <URI>
|
2014-05-16 16:54:09 +02:00
|
|
|
Specify URI to access.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
2015-02-01 10:33:24 +01:00
|
|
|
.SH OPTIONS
|
2015-01-09 16:37:42 +01:00
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-v, \-\-verbose
|
2015-01-15 16:10:16 +01:00
|
|
|
Print debug information such as reception and
|
|
|
|
transmission of frames and name/value pairs. Specifying
|
|
|
|
this option multiple times increases verbosity.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-n, \-\-null\-out
|
2014-02-15 08:46:11 +01:00
|
|
|
Discard downloaded data.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-O, \-\-remote\-name
|
2015-01-15 16:10:16 +01:00
|
|
|
Save download data in the current directory. The
|
2015-11-12 15:14:45 +01:00
|
|
|
filename is derived from URI. If URI ends with \(aq\fI/\fP\(aq,
|
2015-01-15 16:10:16 +01:00
|
|
|
\(aqindex.html\(aq is used as a filename. Not implemented
|
|
|
|
yet.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-05-07 13:55:10 +02:00
|
|
|
.B \-t, \-\-timeout=<DURATION>
|
|
|
|
Timeout each request after <DURATION>. Set 0 to disable
|
|
|
|
timeout.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-w, \-\-window\-bits=<N>
|
2015-01-15 16:10:16 +01:00
|
|
|
Sets the stream level initial window size to 2**<N>\-1.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-W, \-\-connection\-window\-bits=<N>
|
2015-01-15 16:10:16 +01:00
|
|
|
Sets the connection level initial window size to
|
2014-05-16 16:54:09 +02:00
|
|
|
2**<N>\-1.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-a, \-\-get\-assets
|
2015-01-15 16:10:16 +01:00
|
|
|
Download assets such as stylesheets, images and script
|
|
|
|
files linked from the downloaded resource. Only links
|
|
|
|
whose origins are the same with the linking resource
|
|
|
|
will be downloaded. nghttp prioritizes resources using
|
|
|
|
HTTP/2 dependency based priority. The priority order,
|
|
|
|
from highest to lowest, is html itself, css, javascript
|
|
|
|
and images.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-s, \-\-stat
|
2014-02-15 08:46:11 +01:00
|
|
|
Print statistics.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-H, \-\-header=<HEADER>
|
2015-01-15 16:10:16 +01:00
|
|
|
Add a header to the requests. Example: \fI\%\-H\fP\(aq:method: PUT\(aq
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-03-14 10:52:50 +01:00
|
|
|
.B \-\-trailer=<HEADER>
|
|
|
|
Add a trailer header to the requests. <HEADER> must not
|
|
|
|
include pseudo header field (header field name starting
|
2015-04-17 16:14:23 +02:00
|
|
|
with \(aq:\(aq). To send trailer, one must use \fI\%\-d\fP option to
|
|
|
|
send request body. Example: \fI\%\-\-trailer\fP \(aqfoo: bar\(aq.
|
2015-03-14 10:52:50 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-\-cert=<CERT>
|
2015-01-15 16:10:16 +01:00
|
|
|
Use the specified client certificate file. The file
|
|
|
|
must be in PEM format.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-\-key=<KEY>
|
2015-01-15 16:10:16 +01:00
|
|
|
Use the client private key file. The file must be in
|
|
|
|
PEM format.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-07-28 17:01:12 +02:00
|
|
|
.B \-d, \-\-data=<PATH>
|
2015-01-15 16:10:16 +01:00
|
|
|
Post FILE to server. If \(aq\-\(aq is given, data will be read
|
|
|
|
from stdin.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-m, \-\-multiply=<N>
|
2015-01-15 16:10:16 +01:00
|
|
|
Request each URI <N> times. By default, same URI is not
|
|
|
|
requested twice. This option disables it too.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-u, \-\-upgrade
|
2015-01-15 16:10:16 +01:00
|
|
|
Perform HTTP Upgrade for HTTP/2. This option is ignored
|
2015-04-17 16:14:23 +02:00
|
|
|
if the request URI has https scheme. If \fI\%\-d\fP is used, the
|
2015-01-15 16:10:16 +01:00
|
|
|
HTTP upgrade request is performed with OPTIONS method.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-p, \-\-weight=<WEIGHT>
|
2015-01-15 16:10:16 +01:00
|
|
|
Sets priority group weight. The valid value range is
|
|
|
|
[1, 256], inclusive.
|
2015-01-09 16:37:42 +01:00
|
|
|
.sp
|
|
|
|
Default: \fB16\fP
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-M, \-\-peer\-max\-concurrent\-streams=<N>
|
2015-01-15 16:10:16 +01:00
|
|
|
Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value of
|
|
|
|
remote endpoint as if it is received in SETTINGS frame.
|
2015-12-08 15:56:21 +01:00
|
|
|
.sp
|
|
|
|
Default: \fB100\fP
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-15 16:10:16 +01:00
|
|
|
.B \-c, \-\-header\-table\-size=<SIZE>
|
2015-10-25 09:05:48 +01:00
|
|
|
Specify decoder header table size. If this option is
|
|
|
|
used multiple times, and the minimum value among the
|
|
|
|
given values except for last one is strictly less than
|
|
|
|
the last value, that minimum value is set in SETTINGS
|
|
|
|
frame payload before the last value, to simulate
|
|
|
|
multiple header table size change.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-02-15 08:46:11 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-b, \-\-padding=<N>
|
2015-01-15 16:10:16 +01:00
|
|
|
Add at most <N> bytes to a frame payload as padding.
|
|
|
|
Specify 0 to disable padding.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-05-16 16:54:09 +02:00
|
|
|
.TP
|
2015-07-28 17:01:12 +02:00
|
|
|
.B \-r, \-\-har=<PATH>
|
|
|
|
Output HTTP transactions <PATH> in HAR format. If \(aq\-\(aq
|
2015-01-15 16:10:16 +01:00
|
|
|
is given, data is written to stdout.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-11-24 07:27:41 +01:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-\-color
|
2014-02-15 08:46:11 +01:00
|
|
|
Force colored log output.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-05-16 16:54:09 +02:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-\-continuation
|
2014-05-16 16:54:09 +02:00
|
|
|
Send large header to test CONTINUATION.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-05-16 16:54:09 +02:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-\-no\-content\-length
|
|
|
|
Don\(aqt send content\-length header field.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-07-08 17:38:43 +02:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-\-no\-dep
|
2015-01-15 16:10:16 +01:00
|
|
|
Don\(aqt send dependency based priority hint to server.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-11-24 07:27:41 +01:00
|
|
|
.TP
|
2015-03-26 16:37:12 +01:00
|
|
|
.B \-\-hexdump
|
|
|
|
Display the incoming traffic in hexadecimal (Canonical
|
|
|
|
hex+ASCII display). If SSL/TLS is used, decrypted data
|
|
|
|
are used.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2015-04-19 11:10:54 +02:00
|
|
|
.B \-\-no\-push
|
|
|
|
Disable server push.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2015-07-11 05:45:23 +02:00
|
|
|
.B \-\-max\-concurrent\-streams=<N>
|
|
|
|
The number of concurrent pushed streams this client
|
|
|
|
accepts.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2016-04-10 09:59:57 +02:00
|
|
|
.B \-\-expect\-continue
|
|
|
|
Perform an Expect/Continue handshake: wait to send DATA
|
|
|
|
(up to a short timeout) until the server sends a 100
|
|
|
|
Continue interim response. This option is ignored unless
|
|
|
|
combined with the \fI\%\-d\fP option.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-\-version
|
2014-05-16 16:54:09 +02:00
|
|
|
Display version information and exit.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2014-05-16 16:54:09 +02:00
|
|
|
.TP
|
2015-01-09 16:37:42 +01:00
|
|
|
.B \-h, \-\-help
|
2014-05-16 16:54:09 +02:00
|
|
|
Display this help and exit.
|
2015-01-09 16:37:42 +01:00
|
|
|
.UNINDENT
|
2015-01-15 16:10:16 +01:00
|
|
|
.sp
|
|
|
|
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
|
|
|
|
10 * 1024). Units are K, M and G (powers of 1024).
|
2015-05-07 13:55:10 +02:00
|
|
|
.sp
|
|
|
|
The <DURATION> argument is an integer and an optional unit (e.g., 1s
|
|
|
|
is 1 second and 500ms is 500 milliseconds). Units are h, m, s or ms
|
|
|
|
(hours, minutes, seconds and milliseconds, respectively). If a unit
|
|
|
|
is omitted, a second is used as unit.
|
2015-04-17 16:14:23 +02:00
|
|
|
.SH DEPENDENCY BASED PRIORITY
|
|
|
|
.sp
|
|
|
|
nghttp sends priority hints to server by default unless
|
|
|
|
\fI\%\-\-no\-dep\fP is used. nghttp mimics the way Firefox employs to
|
|
|
|
manages dependency using idle streams. We follows the behaviour of
|
|
|
|
Firefox Nightly as of April, 2015, and nghttp\(aqs behaviour is very
|
|
|
|
static and could be different from Firefox in detail. But reproducing
|
|
|
|
the same behaviour of Firefox is not our goal. The goal is provide
|
|
|
|
the easy way to test out the dependency priority in server
|
|
|
|
implementation.
|
|
|
|
.sp
|
|
|
|
When connection is established, nghttp sends 5 PRIORITY frames to idle
|
|
|
|
streams 3, 5, 7, 9 and 11 to create "anchor" nodes in dependency
|
|
|
|
tree:
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
+\-\-\-\-\-+
|
|
|
|
|id=0 |
|
|
|
|
+\-\-\-\-\-+
|
|
|
|
^ ^ ^
|
|
|
|
w=201 / | \e w=1
|
|
|
|
/ | \e
|
|
|
|
/ w=101| \e
|
|
|
|
+\-\-\-\-\-+ +\-\-\-\-\-+ +\-\-\-\-\-+
|
|
|
|
|id=3 | |id=5 | |id=7 |
|
|
|
|
+\-\-\-\-\-+ +\-\-\-\-\-+ +\-\-\-\-\-+
|
|
|
|
^ ^
|
|
|
|
w=1 | w=1 |
|
|
|
|
| |
|
|
|
|
+\-\-\-\-\-+ +\-\-\-\-\-+
|
|
|
|
|id=11| |id=9 |
|
|
|
|
+\-\-\-\-\-+ +\-\-\-\-\-+
|
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
In the above figure, \fBid\fP means stream ID, and \fBw\fP means weight.
|
|
|
|
The stream 0 is non\-existence stream, and forms the root of the tree.
|
|
|
|
The stream 7 and 9 are not used for now.
|
|
|
|
.sp
|
|
|
|
The URIs given in the command\-line depend on stream 11 with the weight
|
|
|
|
given in \fI\%\-p\fP option, which defaults to 16.
|
|
|
|
.sp
|
|
|
|
If \fI\%\-a\fP option is used, nghttp parses the resource pointed by
|
|
|
|
URI given in command\-line as html, and extracts resource links from
|
|
|
|
it. When requesting those resources, nghttp uses dependency according
|
|
|
|
to its resource type.
|
|
|
|
.sp
|
|
|
|
For CSS, and Javascript files inside "head" element, they depend on
|
|
|
|
stream 3 with the weight 2. The Javascript files outside "head"
|
2015-05-07 13:55:10 +02:00
|
|
|
element depend on stream 5 with the weight 2. The mages depend on
|
2015-04-17 16:14:23 +02:00
|
|
|
stream 11 with the weight 12. The other resources (e.g., icon) depend
|
|
|
|
on stream 11 with the weight 2.
|
2015-01-09 16:37:42 +01:00
|
|
|
.SH SEE ALSO
|
|
|
|
.sp
|
|
|
|
\fInghttpd(1)\fP, \fInghttpx(1)\fP, \fIh2load(1)\fP
|
|
|
|
.SH AUTHOR
|
|
|
|
Tatsuhiro Tsujikawa
|
|
|
|
.SH COPYRIGHT
|
2016-01-11 08:23:32 +01:00
|
|
|
2012, 2015, 2016, Tatsuhiro Tsujikawa
|
2015-01-09 16:37:42 +01:00
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|