• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
Man page generated from reStructuredText.
. . .nr rst2man-indent-level 0 . \\$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] .. .rstReportMargin pre:
. RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .rstReportMargin post:
.. . 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]]
..
"NGHTTP" "1" "Oct 27, 2023" "1.58.0" "nghttp2"
NAME
nghttp - HTTP/2 client
SYNOPSIS
nghttp [OPTIONS]... <URI>...
DESCRIPTION
HTTP/2 client NDENT 0.0

<URI> Specify URI to access. NINDENT

OPTIONS
NDENT 0.0

-v, --verbose Print debug information such as reception and transmission of frames and name/value pairs. Specifying this option multiple times increases verbosity. NINDENT NDENT 0.0

-n, --null-out Discard downloaded data. NINDENT NDENT 0.0

-O, --remote-name Save download data in the current directory. The filename is derived from URI. If URI ends with \(aq/\(aq, \(aqindex.html\(aq is used as a filename. Not implemented yet. NINDENT NDENT 0.0

-t, --timeout=<DURATION> Timeout each request after <DURATION>. Set 0 to disable timeout. NINDENT NDENT 0.0

-w, --window-bits=<N> Sets the stream level initial window size to 2**<N>-1. NINDENT NDENT 0.0

-W, --connection-window-bits=<N> Sets the connection level initial window size to 2**<N>-1. NINDENT NDENT 0.0

-a, --get-assets 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. NINDENT NDENT 0.0

-s, --stat Print statistics. NINDENT NDENT 0.0

-H, --header=<HEADER> Add a header to the requests. Example: \%-H\(aq:method: PUT\(aq NINDENT NDENT 0.0

--trailer=<HEADER> Add a trailer header to the requests. <HEADER> must not include pseudo header field (header field name starting with \(aq:\(aq). To send trailer, one must use \%-d option to send request body. Example: \%--trailer \(aqfoo: bar\(aq. NINDENT NDENT 0.0

--cert=<CERT> Use the specified client certificate file. The file must be in PEM format. NINDENT NDENT 0.0

--key=<KEY> Use the client private key file. The file must be in PEM format. NINDENT NDENT 0.0

-d, --data=<PATH> Post FILE to server. If \(aq-\(aq is given, data will be read from stdin. NINDENT NDENT 0.0

-m, --multiply=<N> Request each URI <N> times. By default, same URI is not requested twice. This option disables it too. NINDENT NDENT 0.0

-u, --upgrade Perform HTTP Upgrade for HTTP/2. This option is ignored if the request URI has https scheme. If \%-d is used, the HTTP upgrade request is performed with OPTIONS method. NINDENT NDENT 0.0

-p, --weight=<WEIGHT> Sets weight of given URI. This option can be used multiple times, and N-th \%-p option sets weight of N-th URI in the command line. If the number of \%-p option is less than the number of URI, the last \%-p option value is repeated. If there is no \%-p option, default weight, 16, is assumed. The valid value range is [1, 256], inclusive. NINDENT NDENT 0.0

-M, --peer-max-concurrent-streams=<N> Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value of remote endpoint as if it is received in SETTINGS frame. Default: 100 NINDENT NDENT 0.0

-c, --header-table-size=<SIZE> 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. NINDENT NDENT 0.0

--encoder-header-table-size=<SIZE> Specify encoder header table size. The decoder (server) specifies the maximum dynamic table size it accepts. Then the negotiated dynamic table size is the minimum of this option value and the value which server specified. NINDENT NDENT 0.0

-b, --padding=<N> Add at most <N> bytes to a frame payload as padding. Specify 0 to disable padding. NINDENT NDENT 0.0

-r, --har=<PATH> Output HTTP transactions <PATH> in HAR format. If \(aq-\(aq is given, data is written to stdout. NINDENT NDENT 0.0

--color Force colored log output. NINDENT NDENT 0.0

--continuation Send large header to test CONTINUATION. NINDENT NDENT 0.0

--no-content-length Don\(aqt send content-length header field. NINDENT NDENT 0.0

--no-dep Don\(aqt send dependency based priority hint to server. NINDENT NDENT 0.0

--hexdump Display the incoming traffic in hexadecimal (Canonical hex+ASCII display). If SSL/TLS is used, decrypted data are used. NINDENT NDENT 0.0

--no-push Disable server push. NINDENT NDENT 0.0

--max-concurrent-streams=<N> The number of concurrent pushed streams this client accepts. NINDENT NDENT 0.0

--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 \%-d option. NINDENT NDENT 0.0

-y, --no-verify-peer Suppress warning on server certificate verification failure. NINDENT NDENT 0.0

--ktls Enable ktls. NINDENT NDENT 0.0

--no-rfc7540-pri Disable RFC7540 priorities. NINDENT NDENT 0.0

--version Display version information and exit. NINDENT NDENT 0.0

-h, --help Display this help and exit. NINDENT 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). 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.

DEPENDENCY BASED PRIORITY
nghttp sends priority hints to server by default unless \%--no-dep 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. When connection is established, nghttp sends 5 PRIORITY frames to idle streams 3, 5, 7, 9 and 11 to create \(dqanchor\(dq nodes in dependency tree: NDENT 0.0 NDENT 3.5
 +-----+
 |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 |
 +-----+ +-----+
NINDENT NINDENT In the above figure, id means stream ID, and w 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. The URIs given in the command-line depend on stream 11 with the weight given in \%-p option, which defaults to 16. If \%-a 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. For CSS, and Javascript files inside \(dqhead\(dq element, they depend on stream 3 with the weight 2. The Javascript files outside \(dqhead\(dq element depend on stream 5 with the weight 2. The mages depend on stream 11 with the weight 12. The other resources (e.g., icon) depend on stream 11 with the weight 2.
SEE ALSO
nghttpd(1), nghttpx(1), h2load(1)
AUTHOR
Tatsuhiro Tsujikawa
COPYRIGHT
2012, 2015, 2016, Tatsuhiro Tsujikawa Generated by docutils manpage writer.
.