This is the http2 Reference Manual, version 1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 18:20:26 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
http2
HTTP2 protocol implementation
Tomáš Zellerin <tomas@zellerin.cz>
MIT
1.1
trivial-gray-streams
(system).
flexi-streams
(system).
anaphora
(system).
gzip-stream
(system).
alexandria
(system).
package.lisp
(file).
core
(module).
Modules are listed depth-first from the system components tree.
http2/core
package.lisp
(file).
http2
(system).
utils.lisp
(file).
errors.lisp
(file).
frames.lisp
(file).
classes.lisp
(file).
hpack.lisp
(file).
binary-payload.lisp
(file).
payload-streams.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
http2/http2.asd
http2/package.lisp
http2/core/utils.lisp
http2/core/errors.lisp
http2/core/frames.lisp
http2/core/classes.lisp
http2/core/hpack.lisp
http2/core/binary-payload.lisp
http2/core/payload-streams.lisp
http2/core/utils.lisp
core
(module).
+no-error+
(constant).
read-byte*
(function).
*bytes-left*
(special variable).
*bytes-to-possibly-reuse*
(special variable).
*bytes-to-reuse*
(special variable).
*error-codes*
(special variable).
*log-stream*
(special variable).
*settings*
(special variable).
*when-no-bytes-left-fn*
(special variable).
+cancel+
(constant).
+compression-error+
(constant).
+connect-error+
(constant).
+enhance-your-calm+
(constant).
+flow-control-error+
(constant).
+frame-size-error+
(constant).
+http-1-1-required+
(constant).
+inadequate-security+
(constant).
+internal-error+
(constant).
+protocol-error+
(constant).
+refused-stream+
(constant).
+settings-timeout+
(constant).
+stream-closed+
(constant).
copy-priority
(function).
find-setting-by-id
(function).
find-setting-code
(function).
get-error-name
(function).
http2-stream-state
(type).
logger
(function).
make-priority
(function).
priority
(structure).
priority-exclusive
(reader).
(setf priority-exclusive)
(writer).
priority-p
(function).
priority-stream-dependency
(reader).
(setf priority-stream-dependency)
(writer).
priority-weight
(reader).
(setf priority-weight)
(writer).
read-bytes
(function).
stream-id
(type).
vector-from-hex-text
(function).
write-bytes
(function).
http2/core/errors.lisp
core
(module).
get-connection
(reader method).
(setf get-connection)
(writer method).
print-object
(method).
print-object
(method).
print-object
(method).
bad-stream-state
(condition).
connection-error
(function).
connection-error
(condition).
duplicate-request-header
(condition).
frame-type-needs-stream
(condition).
get-actual
(reader method).
(setf get-actual)
(writer method).
get-allowed
(reader method).
(setf get-allowed)
(writer method).
get-code
(reader method).
get-code
(reader method).
(setf get-code)
(writer method).
(setf get-code)
(writer method).
get-debug-data
(reader method).
(setf get-debug-data)
(writer method).
get-error-code
(reader method).
(setf get-error-code)
(writer method).
get-frame-size
(reader method).
(setf get-frame-size)
(writer method).
get-last-stream-id
(reader method).
(setf get-last-stream-id)
(writer method).
get-max-frame-size
(reader method).
(setf get-max-frame-size)
(writer method).
get-max-seen-so-far
(reader method).
(setf get-max-seen-so-far)
(writer method).
get-name
(reader method).
(setf get-name)
(writer method).
get-stream
(reader method).
(setf get-stream)
(writer method).
get-stream-id
(reader method).
get-stream-id
(reader method).
(setf get-stream-id)
(writer method).
(setf get-stream-id)
(writer method).
get-value
(reader method).
get-value
(reader method).
get-value
(reader method).
get-value
(reader method).
(setf get-value)
(writer method).
(setf get-value)
(writer method).
(setf get-value)
(writer method).
(setf get-value)
(writer method).
go-away
(condition).
header-error
(condition).
http-stream-error
(function).
http-stream-error
(condition).
incorrect-enable-push-value
(condition).
incorrect-frame-size
(condition).
incorrect-frame-size-value
(condition).
incorrect-initial-window-size-value
(condition).
incorrect-ping-frame-size
(condition).
incorrect-pseudo-header
(condition).
incorrect-request-pseudo-header
(condition).
incorrect-response-pseudo-header
(condition).
incorrect-rst-frame-size
(condition).
incorrect-settings-frame-size
(condition).
incorrect-window-update-frame-size
(condition).
lowercase-header-field-name
(condition).
missing-header-octets
(condition).
missing-pseudo-header
(condition).
new-stream-id-too-low
(condition).
null-connection-window-update
(condition).
null-stream-window-update
(condition).
our-id-created-by-peer
(condition).
protocol-error
(condition).
pseudo-header-after-text-header
(condition).
stream-protocol-error
(condition).
too-big-frame
(condition).
too-big-padding
(condition).
unexpected-continuation-frame
(condition).
http2/core/frames.lisp
core
(module).
print-object
(method).
read-frame
(function).
write-ack-setting-frame
(function).
write-altsvc-frame
(function).
write-continuation-frame
(function).
write-data-frame
(function).
write-frame-header
(function).
write-goaway-frame
(function).
write-headers-frame
(function).
write-ping-frame
(function).
write-priority-frame
(function).
write-push-promise-frame
(function).
write-rst-stream-frame
(function).
write-settings-frame
(function).
write-window-update-frame
(function).
*flag-codes-keywords*
(special variable).
*frame-types*
(special variable).
+altsvc-frame+
(constant).
+continuation-frame+
(constant).
+data-frame+
(constant).
+goaway-frame+
(constant).
+headers-frame+
(constant).
+known-frame-types-count+
(constant).
+ping-frame+
(constant).
+priority-frame+
(constant).
+push-promise-frame+
(constant).
+rst-stream-frame+
(constant).
+settings-frame+
(constant).
+window-update-frame+
(constant).
account-frame-window-contribution
(function).
change-state-on-write-end
(function).
check-stream-state-ok
(function).
copy-frame-type
(function).
create-new-local-stream
(function).
define-frame-type
(macro).
find-http-stream-by-id
(function).
find-just-stream-by-id
(function).
flags-to-code
(function).
frame-type
(structure).
frame-type-bad-state-error
(reader).
(setf frame-type-bad-state-error)
(writer).
frame-type-connection-ok
(reader).
(setf frame-type-connection-ok)
(writer).
frame-type-documentation
(reader).
(setf frame-type-documentation)
(writer).
frame-type-flag-keywords
(reader).
(setf frame-type-flag-keywords)
(writer).
frame-type-name
(reader).
(setf frame-type-name)
(writer).
frame-type-new-stream-state
(reader).
(setf frame-type-new-stream-state)
(writer).
frame-type-old-stream-ok
(reader).
(setf frame-type-old-stream-ok)
(writer).
frame-type-p
(function).
frame-type-receive-fn
(reader).
(setf frame-type-receive-fn)
(writer).
get-flag
(function).
has-flag
(function).
make-frame-type
(function).
padded-length
(function).
possibly-padded-body
(function).
read-and-add-headers
(function).
read-continuation-frame-on-demand
(function).
read-padding
(function).
read-possibly-padded
(function).
read-priority
(function).
write-31-bits
(function).
write-32-bits
(function).
write-frame
(function).
write-priority
(function).
write-sequences
(function).
write-stream-id
(function).
http2/core/classes.lisp
core
(module).
*do-print-log*
(special variable).
add-header
(generic function).
apply-data-frame
(generic function).
apply-stream-priority
(generic function).
apply-window-size-increment
(generic function).
client-http2-connection
(class).
client-stream
(class).
close
(method).
do-goaway
(generic function).
do-pong
(generic function).
get-body
(reader method).
(setf get-body)
(writer method).
get-connection
(reader method).
(setf get-connection)
(writer method).
get-headers
(reader method).
(setf get-headers)
(writer method).
get-path
(reader method).
(setf get-path)
(writer method).
get-status
(reader method).
(setf get-status)
(writer method).
handle-undefined-frame
(generic function).
header-collecting-mixin
(class).
history-printing-object
(class).
initialize-instance
(method).
initialize-instance
(method).
logging-object
(class).
peer-acks-settings
(generic function).
peer-ends-http-stream
(generic function).
peer-expects-settings-ack
(generic function).
peer-resets-stream
(generic function).
peer-sends-push-promise
(generic function).
print-object
(method).
print-object
(method).
send-headers
(function).
send-ping
(generic function).
server-stream
(class).
set-peer-setting
(generic function).
timeshift-pinging-connection
(class).
+client-preface-start+
(special variable).
add-log
(generic function).
body-collecting-mixin
(class).
check-place-empty-and-set-it
(macro).
close-http2-stream
(function).
count-open-streams
(function).
do-ping
(generic function).
dynamic-table-entry-size
(function).
flow-control-mixin
(class).
get-acked-settings
(reader method).
(setf get-acked-settings)
(writer method).
get-authority
(reader method).
(setf get-authority)
(writer method).
get-compression-context
(reader method).
(setf get-compression-context)
(writer method).
get-data
(reader method).
(setf get-data)
(writer method).
get-decompression-context
(reader method).
(setf get-decompression-context)
(writer method).
get-depends-on
(reader method).
(setf get-depends-on)
(writer method).
get-history
(function).
get-id-to-use
(reader method).
(setf get-id-to-use)
(writer method).
get-initial-peer-window-size
(reader method).
(setf get-initial-peer-window-size)
(writer method).
get-initial-window-size
(reader method).
(setf get-initial-window-size)
(writer method).
get-last-id-seen
(reader method).
(setf get-last-id-seen)
(writer method).
get-max-frame-size
(reader method).
(setf get-max-frame-size)
(writer method).
get-max-peer-frame-size
(reader method).
(setf get-max-peer-frame-size)
(writer method).
get-method
(reader method).
(setf get-method)
(writer method).
get-network-stream
(reader method).
get-network-stream
(reader method).
(setf get-network-stream)
(writer method).
(setf get-network-stream)
(writer method).
get-peer-accepts-push
(reader method).
(setf get-peer-accepts-push)
(writer method).
get-peer-window-size
(reader method).
(setf get-peer-window-size)
(writer method).
get-reversed-history
(reader method).
(setf get-reversed-history)
(writer method).
get-scheme
(reader method).
(setf get-scheme)
(writer method).
get-seen-text-header
(reader method).
(setf get-seen-text-header)
(writer method).
get-settings
(generic function).
get-state
(generic function).
(setf get-state)
(method).
(setf get-state)
(writer method).
get-stream-class
(reader method).
(setf get-stream-class)
(writer method).
get-stream-id
(reader method).
get-stream-id
(reader method).
(setf get-stream-id)
(writer method).
(setf get-stream-id)
(writer method).
get-streams
(reader method).
(setf get-streams)
(writer method).
get-weight
(reader method).
(setf get-weight)
(writer method).
get-window-size
(reader method).
(setf get-window-size)
(writer method).
handle-alt-svc
(generic function).
history-keeping-object
(class).
http2-connection
(class).
http2-stream
(class).
is-our-stream-id
(generic function).
log-headers-mixin
(class).
logging-connection
(class).
logging-stream
(class).
maybe-lock-for-write
(generic function).
maybe-unlock-for-write
(generic function).
open-http2-stream
(function).
peer-opens-http-stream-really-open
(function).
process-end-headers
(generic function).
read-client-preface
(function).
server-http2-connection
(class).
http2/core/hpack.lisp
core
(module).
compile-headers
(function).
decode-huffman
(function).
dynamic-table-value
(function).
encode-header
(function).
get-bytes-left-in-table
(reader method).
(setf get-bytes-left-in-table)
(writer method).
get-deleted-items
(reader method).
(setf get-deleted-items)
(writer method).
get-dynamic-table
(reader method).
(setf get-dynamic-table)
(writer method).
get-dynamic-table-size
(reader method).
(setf get-dynamic-table-size)
(writer method).
get-integer-from-octet
(function).
get-updates-needed
(reader method).
(setf get-updates-needed)
(writer method).
hpack-context
(class).
integer-to-array
(function).
read-http-header
(function).
request-headers
(function).
update-dynamic-table-size
(function).
*huffman-code*
(special variable).
*use-huffman-coding-by-default*
(special variable).
+last-static-header-index+
(constant).
+last-static-header-pair+
(constant).
+literal-header-index+
(constant).
+literal-header-never-index+
(constant).
+literal-header-noindex+
(constant).
add-dynamic-header
(method).
compute-header-size
(function).
compute-update-dynamic-size-codes
(function).
context-table-element
(type).
decode-huffman-to-stream
(function).
decode-octet-fn
(function).
encode-dynamic-table-update
(function).
encode-huffman
(function).
find-header-in-tables
(function).
find-in-tables
(function).
find-pair-in-tables
(function).
header-writer
(function).
huffman-coded-size
(function).
make-cond-branch
(function).
read-from-tables
(function).
read-huffman
(function).
read-literal-header-field-new-name
(function).
read-literal-header-indexed-name
(function).
read-string-from-stream
(function).
static-headers-table
(special variable).
store-string
(function).
vector-index-to-hpack-index
(function).
write-indexed-header-pair
(function).
write-indexed-name
(function).
write-integer-to-array
(function).
write-literal-header-pair
(function).
http2/core/binary-payload.lisp
core
(module).
initialize-instance
(method).
stream-write-byte
(method).
compile-payload-from-stream
(macro).
constant-output-stream
(class).
get-output-buffer
(reader method).
(setf get-output-buffer)
(writer method).
write-binary-payload
(function).
http2/core/payload-streams.lisp
core
(module).
apply-data-frame
(method).
close
(method).
close
(method).
extract-charset-from-content-type
(function).
http-stream-to-vector
(function).
initialize-instance
(method).
initialize-instance
(method).
make-transport-output-stream
(function).
stream-element-type
(method).
stream-force-output
(method).
stream-listen
(method).
stream-read-byte
(method).
stream-write-byte
(method).
stream-write-sequence
(method).
*charset-names*
(special variable).
*default-encoding*
(special variable).
*default-text-encoding*
(special variable).
binary-stream
(class).
empty-data-p
(function).
get-base-http2-stream
(reader method).
(setf get-base-http2-stream)
(writer method).
get-charset
(reader method).
(setf get-charset)
(writer method).
get-compression
(reader method).
(setf get-compression)
(writer method).
get-data
(reader method).
(setf get-data)
(writer method).
get-index
(reader method).
(setf get-index)
(writer method).
get-output-buffer
(reader method).
(setf get-output-buffer)
(writer method).
get-payload-input-stream
(reader method).
(setf get-payload-input-stream)
(writer method).
http2-stream-with-input-stream
(class).
make-transport-input-stream
(function).
make-transport-input-stream-from-stream
(function).
make-transport-output-stream-from-stream
(function).
payload-input-stream
(class).
payload-output-stream
(class).
payload-stream
(class).
pop-frame
(function).
push-frame
(function).
send-data
(function).
with-output-payload-slots
(macro).
Packages are listed by definition order.
http2/hpack
anaphora
.
common-lisp
.
compile-headers
(function).
decode-huffman
(function).
dynamic-table-value
(function).
encode-header
(function).
get-bytes-left-in-table
(generic reader).
(setf get-bytes-left-in-table)
(generic writer).
get-deleted-items
(generic reader).
(setf get-deleted-items)
(generic writer).
get-dynamic-table
(generic reader).
(setf get-dynamic-table)
(generic writer).
get-dynamic-table-size
(generic reader).
(setf get-dynamic-table-size)
(generic writer).
get-integer-from-octet
(function).
get-updates-needed
(generic reader).
(setf get-updates-needed)
(generic writer).
hpack-context
(class).
integer-to-array
(function).
read-byte*
(function).
read-http-header
(function).
request-headers
(function).
update-dynamic-table-size
(function).
*huffman-code*
(special variable).
*use-huffman-coding-by-default*
(special variable).
+last-static-header-index+
(constant).
+last-static-header-pair+
(constant).
+literal-header-index+
(constant).
+literal-header-never-index+
(constant).
+literal-header-noindex+
(constant).
add-dynamic-header
(generic function).
compute-header-size
(function).
compute-update-dynamic-size-codes
(function).
context-table-element
(type).
decode-huffman-to-stream
(function).
decode-octet-fn
(function).
encode-dynamic-table-update
(function).
encode-huffman
(function).
find-header-in-tables
(function).
find-in-tables
(function).
find-pair-in-tables
(function).
header-writer
(function).
huffman-coded-size
(function).
make-cond-branch
(function).
read-from-tables
(function).
read-huffman
(function).
read-literal-header-field-new-name
(function).
read-literal-header-indexed-name
(function).
read-string-from-stream
(function).
static-headers-table
(special variable).
store-string
(function).
vector-index-to-hpack-index
(function).
write-indexed-header-pair
(function).
write-indexed-name
(function).
write-integer-to-array
(function).
write-literal-header-pair
(function).
http2
HTTP2 API on several levels.
First, it has some high level interface to facilitate making HTTP2 client and
server with some vanilla behaviour. The communication is done mostly by writing to and reading from (Lisp) streams and sending/parsing/receiving headers.
Then, there is an object oriented interface that allows to customize details on
how the client or server acts in some situations. This allows things such as sending pushes on the server side.
Then there is a low level frame oriented interface to read and write frames.
common-lisp
.
http2/hpack
.
*do-print-log*
(special variable).
+no-error+
(constant).
add-header
(generic function).
apply-data-frame
(generic function).
apply-stream-priority
(generic function).
apply-window-size-increment
(generic function).
client-http2-connection
(class).
client-stream
(class).
do-goaway
(generic function).
do-pong
(generic function).
extract-charset-from-content-type
(function).
get-body
(generic reader).
(setf get-body)
(generic writer).
get-connection
(generic reader).
(setf get-connection)
(generic writer).
get-headers
(generic reader).
(setf get-headers)
(generic writer).
get-path
(generic reader).
(setf get-path)
(generic writer).
get-status
(generic reader).
(setf get-status)
(generic writer).
handle-undefined-frame
(generic function).
header-collecting-mixin
(class).
history-printing-object
(class).
http-stream-to-vector
(function).
logging-object
(class).
make-transport-output-stream
(function).
peer-acks-settings
(generic function).
peer-ends-http-stream
(generic function).
peer-expects-settings-ack
(generic function).
peer-resets-stream
(generic function).
peer-sends-push-promise
(generic function).
read-frame
(function).
send-headers
(function).
send-ping
(generic function).
server-stream
(class).
set-peer-setting
(generic function).
timeshift-pinging-connection
(class).
write-ack-setting-frame
(function).
write-altsvc-frame
(function).
write-continuation-frame
(function).
write-data-frame
(function).
write-frame-header
(function).
write-goaway-frame
(function).
write-headers-frame
(function).
write-ping-frame
(function).
write-priority-frame
(function).
write-push-promise-frame
(function).
write-rst-stream-frame
(function).
write-settings-frame
(function).
write-window-update-frame
(function).
*bytes-left*
(special variable).
*bytes-to-possibly-reuse*
(special variable).
*bytes-to-reuse*
(special variable).
*charset-names*
(special variable).
*default-encoding*
(special variable).
*default-text-encoding*
(special variable).
*error-codes*
(special variable).
*flag-codes-keywords*
(special variable).
*frame-types*
(special variable).
*log-stream*
(special variable).
*settings*
(special variable).
*when-no-bytes-left-fn*
(special variable).
+altsvc-frame+
(constant).
+cancel+
(constant).
+client-preface-start+
(special variable).
+compression-error+
(constant).
+connect-error+
(constant).
+continuation-frame+
(constant).
+data-frame+
(constant).
+enhance-your-calm+
(constant).
+flow-control-error+
(constant).
+frame-size-error+
(constant).
+goaway-frame+
(constant).
+headers-frame+
(constant).
+http-1-1-required+
(constant).
+inadequate-security+
(constant).
+internal-error+
(constant).
+known-frame-types-count+
(constant).
+ping-frame+
(constant).
+priority-frame+
(constant).
+protocol-error+
(constant).
+push-promise-frame+
(constant).
+refused-stream+
(constant).
+rst-stream-frame+
(constant).
+settings-frame+
(constant).
+settings-timeout+
(constant).
+stream-closed+
(constant).
+window-update-frame+
(constant).
account-frame-window-contribution
(function).
add-log
(generic function).
bad-stream-state
(condition).
binary-stream
(class).
body-collecting-mixin
(class).
change-state-on-write-end
(function).
check-place-empty-and-set-it
(macro).
check-stream-state-ok
(function).
close-http2-stream
(function).
compile-payload-from-stream
(macro).
connection-error
(function).
connection-error
(condition).
constant-output-stream
(class).
copy-frame-type
(function).
copy-priority
(function).
count-open-streams
(function).
create-new-local-stream
(function).
define-frame-type
(macro).
do-ping
(generic function).
duplicate-request-header
(condition).
dynamic-table-entry-size
(function).
empty-data-p
(function).
find-http-stream-by-id
(function).
find-just-stream-by-id
(function).
find-setting-by-id
(function).
find-setting-code
(function).
flags-to-code
(function).
flow-control-mixin
(class).
frame-type
(structure).
frame-type-bad-state-error
(reader).
(setf frame-type-bad-state-error)
(writer).
frame-type-connection-ok
(reader).
(setf frame-type-connection-ok)
(writer).
frame-type-documentation
(reader).
(setf frame-type-documentation)
(writer).
frame-type-flag-keywords
(reader).
(setf frame-type-flag-keywords)
(writer).
frame-type-name
(reader).
(setf frame-type-name)
(writer).
frame-type-needs-stream
(condition).
frame-type-new-stream-state
(reader).
(setf frame-type-new-stream-state)
(writer).
frame-type-old-stream-ok
(reader).
(setf frame-type-old-stream-ok)
(writer).
frame-type-p
(function).
frame-type-receive-fn
(reader).
(setf frame-type-receive-fn)
(writer).
get-acked-settings
(generic reader).
(setf get-acked-settings)
(generic writer).
get-actual
(generic reader).
(setf get-actual)
(generic writer).
get-allowed
(generic reader).
(setf get-allowed)
(generic writer).
get-authority
(generic reader).
(setf get-authority)
(generic writer).
get-base-http2-stream
(generic reader).
(setf get-base-http2-stream)
(generic writer).
get-charset
(generic reader).
(setf get-charset)
(generic writer).
get-code
(generic reader).
(setf get-code)
(generic writer).
get-compression
(generic reader).
(setf get-compression)
(generic writer).
get-compression-context
(generic reader).
(setf get-compression-context)
(generic writer).
get-data
(generic reader).
(setf get-data)
(generic writer).
get-debug-data
(generic reader).
(setf get-debug-data)
(generic writer).
get-decompression-context
(generic reader).
(setf get-decompression-context)
(generic writer).
get-depends-on
(generic reader).
(setf get-depends-on)
(generic writer).
get-error-code
(generic reader).
(setf get-error-code)
(generic writer).
get-error-name
(function).
get-flag
(function).
get-frame-size
(generic reader).
(setf get-frame-size)
(generic writer).
get-history
(function).
get-id-to-use
(generic reader).
(setf get-id-to-use)
(generic writer).
get-index
(generic reader).
(setf get-index)
(generic writer).
get-initial-peer-window-size
(generic reader).
(setf get-initial-peer-window-size)
(generic writer).
get-initial-window-size
(generic reader).
(setf get-initial-window-size)
(generic writer).
get-last-id-seen
(generic reader).
(setf get-last-id-seen)
(generic writer).
get-last-stream-id
(generic reader).
(setf get-last-stream-id)
(generic writer).
get-max-frame-size
(generic reader).
(setf get-max-frame-size)
(generic writer).
get-max-peer-frame-size
(generic reader).
(setf get-max-peer-frame-size)
(generic writer).
get-max-seen-so-far
(generic reader).
(setf get-max-seen-so-far)
(generic writer).
get-method
(generic reader).
(setf get-method)
(generic writer).
get-name
(generic reader).
(setf get-name)
(generic writer).
get-network-stream
(generic reader).
(setf get-network-stream)
(generic writer).
get-output-buffer
(generic reader).
(setf get-output-buffer)
(generic writer).
get-payload-input-stream
(generic reader).
(setf get-payload-input-stream)
(generic writer).
get-peer-accepts-push
(generic reader).
(setf get-peer-accepts-push)
(generic writer).
get-peer-window-size
(generic reader).
(setf get-peer-window-size)
(generic writer).
get-reversed-history
(generic reader).
(setf get-reversed-history)
(generic writer).
get-scheme
(generic reader).
(setf get-scheme)
(generic writer).
get-seen-text-header
(generic reader).
(setf get-seen-text-header)
(generic writer).
get-settings
(generic function).
get-state
(generic function).
(setf get-state)
(generic function).
get-stream
(generic reader).
(setf get-stream)
(generic writer).
get-stream-class
(generic reader).
(setf get-stream-class)
(generic writer).
get-stream-id
(generic reader).
(setf get-stream-id)
(generic writer).
get-streams
(generic reader).
(setf get-streams)
(generic writer).
get-value
(generic reader).
(setf get-value)
(generic writer).
get-weight
(generic reader).
(setf get-weight)
(generic writer).
get-window-size
(generic reader).
(setf get-window-size)
(generic writer).
go-away
(condition).
handle-alt-svc
(generic function).
has-flag
(function).
header-error
(condition).
history-keeping-object
(class).
http-stream-error
(function).
http-stream-error
(condition).
http2-connection
(class).
http2-stream
(class).
http2-stream-state
(type).
http2-stream-with-input-stream
(class).
incorrect-enable-push-value
(condition).
incorrect-frame-size
(condition).
incorrect-frame-size-value
(condition).
incorrect-initial-window-size-value
(condition).
incorrect-ping-frame-size
(condition).
incorrect-pseudo-header
(condition).
incorrect-request-pseudo-header
(condition).
incorrect-response-pseudo-header
(condition).
incorrect-rst-frame-size
(condition).
incorrect-settings-frame-size
(condition).
incorrect-window-update-frame-size
(condition).
is-our-stream-id
(generic function).
log-headers-mixin
(class).
logger
(function).
logging-connection
(class).
logging-stream
(class).
lowercase-header-field-name
(condition).
make-frame-type
(function).
make-priority
(function).
make-transport-input-stream
(function).
make-transport-input-stream-from-stream
(function).
make-transport-output-stream-from-stream
(function).
maybe-lock-for-write
(generic function).
maybe-unlock-for-write
(generic function).
missing-header-octets
(condition).
missing-pseudo-header
(condition).
new-stream-id-too-low
(condition).
null-connection-window-update
(condition).
null-stream-window-update
(condition).
open-http2-stream
(function).
our-id-created-by-peer
(condition).
padded-length
(function).
payload-input-stream
(class).
payload-output-stream
(class).
payload-stream
(class).
peer-opens-http-stream-really-open
(function).
pop-frame
(function).
possibly-padded-body
(function).
priority
(structure).
priority-exclusive
(reader).
(setf priority-exclusive)
(writer).
priority-p
(function).
priority-stream-dependency
(reader).
(setf priority-stream-dependency)
(writer).
priority-weight
(reader).
(setf priority-weight)
(writer).
process-end-headers
(generic function).
protocol-error
(condition).
pseudo-header-after-text-header
(condition).
push-frame
(function).
read-and-add-headers
(function).
read-bytes
(function).
read-client-preface
(function).
read-continuation-frame-on-demand
(function).
read-padding
(function).
read-possibly-padded
(function).
read-priority
(function).
send-data
(function).
server-http2-connection
(class).
stream-id
(type).
stream-protocol-error
(condition).
too-big-frame
(condition).
too-big-padding
(condition).
unexpected-continuation-frame
(condition).
vector-from-hex-text
(function).
with-output-payload-slots
(macro).
write-31-bits
(function).
write-32-bits
(function).
write-binary-payload
(function).
write-bytes
(function).
write-frame
(function).
write-priority
(function).
write-sequences
(function).
write-stream-id
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Set to true value to log to the *TRACE-OUTPUT*.
Header on position IDX in the dynamic table in CONTEXT.
This is factored out to be used in testing.
Encode header consisting of NAME and VALUE.
The ‘never-indexed‘ format is never generated,
use a separate function for this (and this function needs to be written).
When CONTEXT is provided, use incremental indexing with dynamic table in
that CONTEXT.
Use Huffman when HUFFMAN is true.
Guess charset from the content type. NIL for binary data.
Decode an integer from starting OCTET and additional octets in STREAM as defined in RFC7541 sect. 5.1.
Read HTTP2 stream payload data, do guessed conversions and return either
string or octets vector. You can expect the HTTP2 stream to be closed after calling
this.
Represent integer to a vector as defined in RFC7541 sect. 5.1.
An OUTPUT-STREAM built atop RAW STREAM with added text to binary encoding using charset (as understood by flexi-streams) and possibly gzip compression.
All frames begin with a fixed 9-octet header followed by a variable-
length payload.
#+begin_src artist
+———————————————–+
| Length (24) |
+—————+—————+—————+
| Type (8) | Flags (8) |
+-+————-+—————+——————————-+
|R| Stream Identifier (31) |
+=+=============================================================+
| Frame Payload (0...) ...
+—————————————————————+
#+end_src
Length: The length of the frame payload expressed as an unsigned
24-bit integer. Values greater than 2^14 (16,384) MUST NOT be
sent unless the receiver has set a larger value for
SETTINGS_MAX_FRAME_SIZE.
The 9 octets of the frame header are not included in this value.
Type: The 8-bit type of the frame. The frame type determines the
format and semantics of the frame. Implementations MUST ignore
and discard any frame that has a type that is unknown.
Flags: An 8-bit field reserved for boolean flags specific to the
frame type.
Flags are assigned semantics specific to the indicated frame type.
Flags that have no defined semantics for a particular frame type
MUST be ignored and MUST be left unset (0x0) when sending.
R: A reserved 1-bit field. The semantics of this bit are undefined,
and the bit MUST remain unset (0x0) when sending and MUST be
ignored when receiving.
Stream Identifier: A stream identifier (see Section 5.1.1) expressed as an unsigned 31-bit integer. The value 0x0 is reserved for frames that are associated with the connection as a whole as opposed to an individual stream.
Read header field from network stream associated with the CONNECTION.
Note that we can get missing-header-octets on first octet if we have zero length continuation frame.
Encode standard request headers that are obligatory.
Send HEADERS to a HTTP2 stream. The stream is returned.
The END-HEADERS and END-STREAM allow to set the appropriate flags.
Update dynamic table for new size that is smaller than the previous one.
Zero size means evict completely; in this case the new vector can be cleaned
Write ACK settings frame.
ACK (0x1): When set, bit 0 indicates that this frame acknowledges receipt and application of the peer’s SETTINGS frame. When this bit is set, the payload of the SETTINGS frame MUST be empty. Receipt of a SETTINGS frame with the ACK flag set and a length field value other than 0 MUST be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR. For more information, see Section 6.5.3 ("Settings Synchronization").
See RFC 7838. The ALTSVC HTTP/2 frame advertises the availability of an
alternative service to an HTTP/2 client.
#+begin_src artist +——————————-+——————————-+ | Origin-Len (16) | Origin? (*) ... +——————————-+——————————-+ | Alt-Svc-Field-Value (*) ... +—————————————————————+ #+end_src
#+begin_src artist
+—————————————————————+
| Header Block Fragment (*) ...
+—————————————————————+
#+end_src
The CONTINUATION frame (type=0x9) is used to continue a sequence of header block fragments (Section 4.3). Any number of CONTINUATION frames can be sent, as long as the preceding frame is on the same stream and is a HEADERS, PUSH_PROMISE, or CONTINUATION frame without the END_HEADERS flag set.
#+begin_src artist
+—————+———————————————–+
| Data (*) ...
+—————————————————————+
#+end_src
DATA frames (type=0x0) convey arbitrary, variable-length sequences of octets associated with a stream. One or more DATA frames are used, for instance, to carry HTTP request or response payloads.
All frames begin with a fixed 9-octet header followed by a variable-
length payload.
#+begin_src artist
+———————————————–+
| Length (24) |
+—————+—————+—————+
| Type (8) | Flags (8) |
+-+————-+—————+——————————-+
|R| Stream Identifier (31) |
+=+=============================================================+
| Frame Payload (0...) ...
+—————————————————————+
#+end_src
Length: The length of the frame payload expressed as an unsigned
24-bit integer. Values greater than 2^14 (16,384) MUST NOT be
sent unless the receiver has set a larger value for
SETTINGS_MAX_FRAME_SIZE.
The 9 octets of the frame header are not included in this value.
Type: The 8-bit type of the frame. The frame type determines the
format and semantics of the frame.
Flags: An 8-bit field reserved for boolean flags specific to the
frame type.
Flags are assigned semantics specific to the indicated frame type.
Flags that have no defined semantics for a particular frame type
MUST be ignored and MUST be left unset (0x0) when sending.
R: A reserved 1-bit field. The semantics of this bit are undefined,
and the bit MUST remain unset (0x0) when sending and MUST be
ignored when receiving.
Stream Identifier: A stream identifier (see Section 5.1.1) expressed as an unsigned 31-bit integer. The value 0x0 is reserved for frames that are associated with the connection as a whole as opposed to an individual stream.
#+begin_src artist
+-+————————————————————-+
|R| Last-Stream-ID (31) |
+-+————————————————————-+
| Error Code (32) |
+—————————————————————+
| Additional Debug Data (*) |
+—————————————————————+
#+end_src
The GOAWAY frame (type=0x7) is used to initiate shutdown of a connection or to signal serious error conditions. GOAWAY allows an endpoint to gracefully stop accepting new streams while still finishing processing of previously established streams. This enables administrative actions, like server maintenance.
#+begin_src artist
+-+————-+———————————————–+
|E| Stream Dependency? (31) |
+-+————-+———————————————–+
| Weight? (8) |
+-+————-+———————————————–+
| Header Block Fragment (*) ...
+—————————————————————+
#+end_src
The HEADERS frame (type=0x1) is used to open a stream (Section 5.1), and additionally carries a header block fragment. HEADERS frames can be sent on a stream in the "idle", "reserved (local)", "open", or "half-closed (remote)" state.
The PING frame (type=0x6) is a mechanism for measuring a minimal
round-trip time from the sender, as well as determining whether an
idle connection is still functional. PING frames can be sent from
any endpoint.
#+begin_src artist
+—————————————————————+
| |
| Opaque Data (64) |
| |
+—————————————————————+
#+end_src
Figure 12: PING Payload Format
In addition to the frame header, PING frames MUST contain 8 octets of
opaque data in the payload. A sender can include any value it
chooses and use those octets in any fashion.
Receivers of a PING frame that does not include an ACK flag MUST send
a PING frame with the ACK flag set in response, with an identical
payload. PING responses SHOULD be given higher priority than any
other frame.
The PING frame defines the following flags:
ACK (0x1): When set, bit 0 indicates that this PING frame is a PING response. An endpoint MUST set this flag in PING responses. An endpoint MUST NOT respond to PING frames containing this flag.
The PRIORITY frame (type=0x2) specifies the sender-advised priority
of a stream (Section 5.3).
#+begin_src artist
+-+————————————————————-+
|E| Stream Dependency (31) |
+-+————-+———————————————–+
| Weight (8) |
+-+————-+
#+end_src
The payload of a PRIORITY frame contains the following fields:
E: A single-bit flag indicating that the stream dependency is
exclusive (see Section 5.3).
Stream Dependency: A 31-bit stream identifier for the stream that
this stream depends on (see Section 5.3).
Weight: An unsigned 8-bit integer representing a priority weight for the stream (see Section 5.3). Add one to the value to obtain a weight between 1 and 256.
The PUSH_PROMISE frame (type=0x5) is used to notify the peer endpoint
in advance of streams the sender intends to initiate. The
PUSH_PROMISE frame includes the unsigned 31-bit identifier of the
stream the endpoint plans to create along with a set of headers that
provide additional context for the stream. Section 8.2 contains a
thorough description of the use of PUSH_PROMISE frames.
#+begin_src artist
+-+————-+———————————————–+
|R| Promised Stream ID (31) |
+-+—————————–+——————————-+
| Header Block Fragment (*) ...
+—————————————————————+
#+end_src
The PUSH_PROMISE frame payload has the following fields:
R: A single reserved bit.
Promised Stream ID: An unsigned 31-bit integer that identifies the
stream that is reserved by the PUSH_PROMISE. The promised stream
identifier MUST be a valid choice for the next stream sent by the
sender (see "new stream identifier" in Section 5.1.1).
Header Block Fragment: A header block fragment (Section 4.3)
containing request header fields.
The PUSH_PROMISE frame defines the following flags:
END_HEADERS (0x4): When set, bit 2 indicates that this frame
contains an entire header block (Section 4.3) and is not followed
by any CONTINUATION frames.
A PUSH_PROMISE frame without the END_HEADERS flag set MUST be followed by a CONTINUATION frame for the same stream. A receiver MUST treat the receipt of any other type of frame or a frame on a different stream as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
The RST_STREAM frame (type=0x3) allows for immediate termination of a
stream. RST_STREAM is sent to request cancellation of a stream or to
indicate that an error condition has occurred.
#+begin_src artist
+—————————————————————+
| Error Code (32) |
+—————————————————————+
#+end_src
The RST_STREAM frame contains a single unsigned, 32-bit integer
identifying the error code (Section 7). The error code indicates why
the stream is being terminated.
The RST_STREAM frame does not define any flags.
#+begin_src artist
+——————————-+
| Identifier (16) |
+——————————-+——————————-+
| Value (32) |
+—————————————————————+
#+end_src
The SETTINGS frame (type=0x4) conveys configuration parameters that affect how endpoints communicate, such as preferences and constraints on peer behavior. The SETTINGS frame is also used to acknowledge the receipt of those parameters. Individually, a SETTINGS parameter can also be referred to as a "setting".
#+begin_src artist
+-+————————————————————-+
|R| Window Size Increment (31) |
+-+————————————————————-+
#+end_src
The WINDOW_UPDATE frame (type=0x8) is used to implement flow control; see Section 5.2 for an overview. Flow control operates at two levels: on each individual stream and on the entire connection.
http2-stream
) name value) ¶Decode compressed headers
server-stream
) (name symbol
) value) ¶client-stream
) (name symbol
) value) ¶log-headers-mixin
) name value) ¶header-collecting-mixin
) name value) ¶logging-object
) name value) ¶Data frame is received by a stream.
By default does nothing; there are several mixins that implement reading the
data.
http2-stream-with-input-stream
) frame-data) ¶body-collecting-mixin
) data) ¶logging-object
) payload) ¶Called when priority frame - or other frame with priority settings set - arrives. Does nothing, as priorities are deprecated in RFC9113 anyway.
logging-object
) exclusive weight stream-dependency) ¶Called on window update frame. By default, increases PEER-WINDOW-SIZE slot of the strem or connection.
(eql :closed)
) increment) ¶logging-object
) increment) ¶Called when a go-away frame is received. By default throws GO-AWAY condition if error was reported.
logging-object
) error-code last-stream-id debug-data) ¶client-http2-connection
) error-code last-stream-id debug-data) ¶server-http2-connection
) error-code last-stream-id debug-data) ¶Called when ping-frame with ACK is received. By default warns about unexpected ping response; see also TIMESHIFT-PINGING-CONNECTION mixin.
logging-object
) data) ¶timeshift-pinging-connection
) data) ¶body-collecting-mixin
)) ¶automatically generated reader method
body
.
body-collecting-mixin
)) ¶automatically generated writer method
body
.
hpack-context
)) ¶automatically generated reader method
hpack-context
)) ¶automatically generated writer method
http2-stream
)) ¶automatically generated reader method
connection-error
)) ¶http2-stream
)) ¶automatically generated writer method
connection-error
)) ¶hpack-context
)) ¶automatically generated reader method
hpack-context
)) ¶automatically generated writer method
hpack-context
)) ¶automatically generated reader method
hpack-context
)) ¶automatically generated writer method
hpack-context
)) ¶automatically generated reader method
hpack-context
)) ¶automatically generated writer method
header-collecting-mixin
)) ¶automatically generated reader method
header-collecting-mixin
)) ¶automatically generated writer method
server-stream
)) ¶server-stream
)) ¶The path and query parts of the target URI
path
.
client-stream
)) ¶client-stream
)) ¶HTTP status code field (see [RFC7231], Section 6)
hpack-context
)) ¶automatically generated reader method
hpack-context
)) ¶automatically generated writer method
Callback that is called when a frame of unknown type is received - see extensions.
Called when SETTINGS-FRAME with ACK flag is received. By default does nothing.
logging-object
)) ¶Do relevant state changes when closing http stream (as part of received HEADERS or PAYLOAD).
logging-object
)) ¶Called when settings-frame without ACK is received, after individual SET-PEER-SETTING calls. By default, send ACK frame.
logging-object
)) ¶The RST_STREAM frame fully terminates the referenced stream and causes it to enter the "closed" state. After receiving a RST_STREAM on a stream, the receiver MUST NOT send additional frames for that stream, with the exception of PRIORITY. However, after sending the RST_STREAM, the sending endpoint MUST be prepared to receive and process additional frames sent on the stream that might have been sent by the peer prior to the arrival of the RST_STREAM.
(eql :closed)
) error-code) ¶logging-object
) error-code) ¶This should be called on push promise (FIXME: and maybe it is not, and maybe the parameters should be different anyway). By default throws an error.
Send a ping request.
timeshift-pinging-connection
) &optional payload) ¶Process received information about peers setting.
The setting relates to the CONNECTION. NAME is a keyword symbol (see *SETTINGS*, subject to possible change to 16bit number in future) and VALUE is 32bit number.
Fallback.
logging-object
) name value) ¶(eql :header-table-size)
) value) ¶(eql :initial-window-size)
) value) ¶(eql :max-frame-size)
) value) ¶(eql :max-header-list-size)
) value) ¶client-http2-connection
) (name (eql :enable-push)
) value) ¶server-http2-connection
) (name (eql :enable-push)
) value) ¶(eql :max-concurrent-streams)
) value) ¶http2-connection
) &key &allow-other-keys) ¶payload-output-stream
) &key &allow-other-keys) ¶payload-input-stream
) &key &allow-other-keys) ¶client-http2-connection
) &key &allow-other-keys) ¶In HTTP/2, each endpoint is required to send a connection preface as a
final confirmation of the protocol in use and to establish the
initial settings for the HTTP/2 connection. The client and server
each send a different connection preface.
The client connection preface starts with a sequence of 24 octets. This sequence MUST be followed by a SETTINGS frame (Section 6.5), which MAY be empty.
payload-output-stream
) &key base-http2-stream connection window-size &allow-other-keys) ¶payload-input-stream
) &key base-http2-stream &allow-other-keys) ¶http2-stream
) &key connection) ¶constant-output-stream
) &key &allow-other-keys) ¶server-stream
) out) ¶frame-type
) stream) ¶http2-stream
) out) ¶http-stream-error
) out) ¶connection-error
) out) ¶binary-stream
)) ¶payload-output-stream
)) ¶sb-gray
.
payload-input-stream
)) ¶sb-gray
.
payload-input-stream
)) ¶sb-gray
.
payload-output-stream
) byte) ¶sb-gray
.
constant-output-stream
) byte) ¶sb-gray
.
payload-output-stream
) sequence start end &key) ¶trivial-gray-streams
.
Client connections have odd-numbered streams.
Initarg | Value |
---|---|
:id-to-use | 1 |
HTTP2 stream that checks headers as required for clients (no psedoheader other than :status allowed, etc.
Initarg | Value |
---|---|
:status | nil |
HTTP status code field (see [RFC7231], Section 6)
:status
Mixin to be used to collect all observed headers to a slot.
Initarg | Value |
---|---|
:headers | nil |
:headers
A LOGGING-OBJECT that implements ADD-LOG to print all logs to *TRACE-OUTPUT* as soon as it receives them.
Dynamic tables implementation: they are stored in an adjustable array, with
[0] element storing first element initially (indexed by s+1), and (s+k)th element after k
insertions.
After deletion of D elements, element s+k is stored on index D, element s+1
on index
<———- Index Address Space ———->
<– Static Table –> <– Dynamic Table –>
+—+———–+—+ +—–+———–+—–+
| 1 | ... | s | |s+1+D| ... |s+k+D| ...deleted...
+—+———–+—+ +—–+———–+—–+
k D 0
<—– table aref index ————–>
^ |
| V
Insertion Point Dropping Point
Initarg | Value |
---|---|
:dynamic-table | (make-array 0 fill-pointer 0 adjustable t) |
:dynamic-table-size | 4096 |
:deleted-items | 0 |
:updates-needed | nil |
:dynamic-table
:dynamic-table-size
:dynamic-table-size
:updates-needed
:deleted-items
Objects with this mixin have ADD-LOG called in many situations so that the communication can be debugged or recorded.
Initarg | Value |
---|---|
:method | nil |
:scheme | nil |
:authority | nil |
:path | nil |
The HTTP method ([RFC7231], Section 4)
common-lisp
.
:method
Scheme portion of the target URI ([RFC3986], Section 3.1).
Not restricted to "http" and "https" schemed URIs.
A proxy or gateway can translate requests for non-HTTP schemes,
enabling the use of HTTP to interact with non-HTTP services
:scheme
The authority portion of the target URI ([RFC3986], Section 3.2)
:authority
The path and query parts of the target URI
:path
A mixin that implements specific DO-PING and DO-PONG so that the RTT is printed after DO-PING is send.
stream cancelled
compression state not updated
tcp connection error for connect method
processing capacity exceeded
flow-control limits exceeded
frame size incorrect
Use HTTP/1.1 for the request
negotiated tls parameters not acceptable
implementation fault
Frame types are indexed by an octet.
protocol error detected
stream not processed
settings not acknowledged
frame received for closed stream
Number of bytes left in frame
Translation table from header charset names to FLEXI-STREAM keywords.
Character encoding to be used when not recognized from headers. Default is nil - binary.
Character encoding for text/ content to be used when not recognized from headers.
This table maps error codes to mnemonic names - symbols.
Error codes are 32-bit fields that are used in RST_STREAM and GOAWAY frames to convey the reasons for the stream or connection error.
Error codes share a common code space. Some error codes apply only to either streams or the entire connection and have no defined semantics in the other context.
Property list of flag names and their values..
This makes use of the fact that same flag name has same index in all headers where it is used.
Array of frame types. It is populated later with DEFINE-FRAME-TYPE.
The code-and-code-size table from the RFC 7541 (hpack) appendix B
Stream for logging output send by LOGGER.
See https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml
Is set, the headers are by default huffman-encoded. Special value :maybe means whatever is shorter, plain encoding in case of draw.
Function to call when no bytes are left. Either errors or calls continuations.
The client connection preface starts with a sequence of 24 octets, which in hex notation is this. That is, the connection preface starts with the string "PRI * HTTP/2.0rnrnSMrnrn").
Static headers table. Each element is either list of header name and value, or just header name. The content is defined in the RFC7541, and is supposed to start at index 1, so leading nil.
All HTTP/2 requests MUST include exactly one valid value for the :method, :scheme, and :path pseudo-header fields, unless it is a CONNECT request (Section 8.3). An HTTP request that omits mandatory pseudo-header fields is malformed (Section 8.1.2.6).
Define:
- A frame type object that allows to read frame of given type,
- a constant named ‘+foo+‘ that translates to TYPE-CODE,
- a writer function WRITE-FOO that takes CONNECTION or HTTP-STREAM and possibly
other PARAMETERS and FLAGSs and writes appropriate frame.
Each PARAMETER is a list of name, size in bits or type specifier and documentation.
Change state of the stream when STREAM-END is sent.
Throw BAD-STATE-ERROR when the stream state is not appropriate for the frame type.
Return the HTTP-STREAM.
Close the http2 stream.
It marks the stream as closed, which is maybe unnecessary, as the stream is
immediately removed from the list of streams of its connection. This is
consistent with the concept that any stream not in the connection streams
explicitly is either idle (if above last-id-seen or id-to-use, depending on
even/odd) or closed - see FIND-HTTP-STREAM-BY-ID.
The removal of unused streams is necessary to prevent leakage for big requests -
other solution would be to send go-away after the number of streams is too high;
however some clients (e.g., h2load) do not retry when they receive this.
This stream removal should be done with lock on the appropriate stream when in multiple threads. When this is called from the read-frame callbacks it is done automatically, otherwise caller must ensure it.
Size of the header for dynamic cache purposes: 32 octets plus header and name sizes, including leading : at special header names.
Create new local stream of default class on CONNECTION. Additional PARS are passed to the make-instance
The size of an entry is the sum of its name’s length in octets (as
defined in Section 5.2), its value’s length in octets, and 32.
The size of an entry is calculated using the length of its name and value without any Huffman encoding applied.
Encode table update to NEW-SIZE to an adjustable array RES.
Convert string to huffman encoding.
Find header NAME in static table and, if CONNECTION is not null, in its dynamic table. Return the index, or NIL if not found.
Find HTTP stream in the connection.
Returns either HTTP2-STREAM object (existing or new), CONNECTION or one of :IDLE
:CLOSED for yet or already nonexistent streams.
Also do some checks on the stream id based on the frame type.
Find something (pair or header name) in static and possibly dynamic table.
Find STREAM by ID in STREAMS, or :closed
The list of streams should already be sorted from high number to low number, so we caould stop as soon as we can see lower value. However, we assume the list needed to be searched is pretty short so we do not care.
Find header PAIR in static table and, if CONNECTION is not null, in its dynamic table. Return the index, or NIL if not found.
Find setting name by code
name
.
Encode header consisting of NAME and VALUE.
The ‘never-indexed‘ format is never generated, use a separate function for
this (and this function needs to be written).
When CONTEXT is provided, use incremental indexing with dynamic table in
that CONTEXT.
Use Huffman when HUFFMAN is true.
We detected an error on peer stream. So we send a RST frame, warn in case someone in interested, and go on.
Size of huffman-coded text
Send a format message to *LOG-STREAM*.
Return decoder code for I matching PREFIX among codes.
INPUT-STREAM built atop RAW-STREAM.
Guess encoding and need to gunzip from headers:
- apply zip decompression if gzip is set
- if charset is not null, use it to convert to text.
INPUT-STREAM built atop RAW-STREAM.
Guess encoding and need to gunzip from headers:
- apply zip decompression content-encoding is gzip (FIXME: also compression)
- use charset if understood in content-type
- otherwise guess whether text (use UTF-8) or binary.
An OUTPUT-STREAM built atop RAW STREAM with added charset and possibly compression.
Open http2 stream by sending headers.
Length of the frame with added padding (incl. padding size).
Add padding code to BODY if needed.
Read N bytes from stream to an integer
Read continuation frame header when it is expected on STREAM.
Return two values, length of the payload and END-HEADERS flag.
Read item on INDEX in static table or dynamic table in CONNECTION.
Read Huffman coded text of length LEN from STREAM.
See 6.2.1 fig. 7, and 6.2.2. fig. 9 -
Neither name of the header nor value is in table, so read both as literals.
See Fig. 6 and Fig. 8 - Name of header is in tables, value is literal.
Use USE-BITS from the OCTET0 for name index
Read the padding from the stream if padding-size is not NIL.
Padding is used by some frame types.
A receiver is not obligated to verify padding but MAY treat non-zero padding as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. For now we ignore the padding.
Read string literal from a STREAM as defined in RFC7541 sect 5.2.
Send data in OUTPUT-BUFFER and SIZE data from SEQUENCE starting at START in
one data frame; mark them as sent.
Return new START.
Add STRING to fillable array RES in format defined by HPACK, possibly using huffman encoding.
Convert between hpack index and index in the vector. This works both ways.
Write 31 bits of VALUE to a STREAM. Set first bit if FLAG is set.
Write binary PAYLOAD to the http2 STREAM.
The payload is written in chunks of frame size, and if the available window is not big enough we wait for confirmation (note that other things may happen during waiting, such as receiving request for another data if we act as the server).
write VALUE as N octets to stream. Maximum length is 64 bits (used by ping).
Universal function to write a frame to a stream and account for it.
Write integer to a fillable vector as defined in RFC7541 sect. 5.1.
Return the fillable vector.
Write a list of sequences to stream.
Write STREAM-ID to the binary stream
Add dynamic header to a table. Return the header.
history-keeping-object
) log-pars) ¶history-printing-object
) log-pars) ¶Called when ping-frame without ACK is received. By default send ping-frame with ACK and same data.
logging-object
) data) ¶http2-connection
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated writer method
bad-stream-state
)) ¶bad-stream-state
)) ¶bad-stream-state
)) ¶bad-stream-state
)) ¶server-stream
)) ¶server-stream
)) ¶The authority portion of the target URI ([RFC3986], Section 3.2)
payload-stream
)) ¶automatically generated reader method
payload-stream
)) ¶automatically generated writer method
http2-stream-with-input-stream
)) ¶automatically generated reader method
http2-stream-with-input-stream
)) ¶automatically generated writer method
http-stream-error
)) ¶http-stream-error
)) ¶code
.
connection-error
)) ¶connection-error
)) ¶code
.
http2-stream-with-input-stream
)) ¶automatically generated reader method
http2-stream-with-input-stream
)) ¶automatically generated writer method
http2-connection
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated writer method
payload-input-stream
)) ¶tlist that of accepted frames and cons of last frame and nil.
data
.
http2-stream
)) ¶automatically generated reader method
data
.
payload-input-stream
)) ¶tlist that of accepted frames and cons of last frame and nil.
data
.
http2-stream
)) ¶automatically generated writer method
data
.
http2-connection
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated writer method
http2-stream
)) ¶automatically generated reader method
http2-stream
)) ¶automatically generated writer method
too-big-frame
)) ¶too-big-frame
)) ¶http2-connection
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated writer method
payload-input-stream
)) ¶automatically generated reader method
payload-input-stream
)) ¶automatically generated writer method
http2-connection
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated writer method
http2-connection
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated writer method
http2-connection
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated writer method
http2-connection
)) ¶automatically generated reader method
too-big-frame
)) ¶http2-connection
)) ¶automatically generated writer method
too-big-frame
)) ¶http2-connection
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated writer method
new-stream-id-too-low
)) ¶new-stream-id-too-low
)) ¶server-stream
)) ¶server-stream
)) ¶The HTTP method ([RFC7231], Section 4)
header-error
)) ¶header-error
)) ¶name
.
http2-stream
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated reader method
http2-stream
)) ¶automatically generated writer method
http2-connection
)) ¶automatically generated writer method
payload-output-stream
)) ¶automatically generated reader method
constant-output-stream
)) ¶automatically generated reader method
payload-output-stream
)) ¶automatically generated writer method
constant-output-stream
)) ¶automatically generated writer method
http2-stream-with-input-stream
)) ¶automatically generated reader method
http2-stream-with-input-stream
)) ¶automatically generated writer method
server-http2-connection
)) ¶automatically generated reader method
server-http2-connection
)) ¶automatically generated writer method
flow-control-mixin
)) ¶automatically generated reader method
flow-control-mixin
)) ¶automatically generated writer method
history-keeping-object
)) ¶automatically generated reader method
history-keeping-object
)) ¶automatically generated writer method
server-stream
)) ¶server-stream
)) ¶Scheme portion of the target URI ([RFC3986], Section 3.1).
Not restricted to "http" and "https" schemed URIs.
A proxy or gateway can translate requests for non-HTTP schemes,
enabling the use of HTTP to interact with non-HTTP services
http2-stream
)) ¶http2-stream
)) ¶Set if in the header block a non-pseudo header was already seen.
append
.
:most-specific-first
client-http2-connection
)) ¶http2-stream
)) ¶automatically generated reader method
(eql :closed)
)) ¶logging-object
)) ¶http2-stream
)) ¶automatically generated writer method
http-stream-error
)) ¶http-stream-error
)) ¶http2-connection
)) ¶http2-connection
)) ¶Class for new streams
http2-stream
)) ¶automatically generated reader method
http2-connection
)) ¶automatically generated reader method
bad-stream-state
)) ¶new-stream-id-too-low
)) ¶http2-stream
)) ¶automatically generated writer method
http2-connection
)) ¶automatically generated writer method
bad-stream-state
)) ¶new-stream-id-too-low
)) ¶http2-connection
)) ¶http2-connection
)) ¶Sequence of HTTP2 streams
header-error
)) ¶header-error
)) ¶incorrect-initial-window-size-value
)) ¶incorrect-initial-window-size-value
)) ¶incorrect-frame-size-value
)) ¶incorrect-frame-size-value
)) ¶incorrect-enable-push-value
)) ¶incorrect-enable-push-value
)) ¶http2-stream
)) ¶automatically generated reader method
http2-stream
)) ¶automatically generated writer method
flow-control-mixin
)) ¶automatically generated reader method
flow-control-mixin
)) ¶automatically generated writer method
An ALTSVC frame from a server to a client on a stream other than
stream 0 indicates that the conveyed alternative service is
associated with the origin of that stream.
An ALTSVC frame from a server to a client on stream 0 indicates that the conveyed alternative service is associated with the origin contained in the Origin field of the frame. An association with an origin that the client does not consider authoritative for the current connection MUST be ignored.
Default method ignores alt-svc info.
logging-object
) origin value) ¶Return true if the STREAM-ID should be initiated on our side. The ID is known not to be zero.
client-http2-connection
) stream-id) ¶logging-connection
) stream-id) ¶server-http2-connection
) stream-id) ¶This is called when a new frame is ready
This is called when a new frame is ready
logging-object
)) ¶client-stream
)) ¶server-stream
)) ¶Frame cannot be applied to stream in particular state
A connection error is signalled when we detect an illegal frame content.
Typically it is signalled from CONNECTION-ERROR function that also sends appropriate GOAWAY frame. After that it should be handled by server or client as needed - server may close connection, client may retry the request.
Frame MUST be associated with a stream. If a frame is received whose stream identifier field is 0x0, the recipient MUST respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
Signaleed when GO-AWAY frame received.
Client must have ENABLE-PUSH 0 or 1. Server must have ENABLE-PUSH 0.
:value
A PRIORITY frame with a length other than 5 octets MUST be treated as a stream error (Section 5.4.2) of type FRAME_SIZE_ERROR.
Initarg | Value |
---|---|
:code | +frame-size-error+ |
Frame size MUST be between the initial value 16384 and the maximum allowed frame size (2^24-1 or 16,777,215 octets), inclusive.
:value
SETTINGS_INITIAL_WINDOW_SIZE must be below 2^31.
:value
Receipt of a PING frame with a length field value other than 8 MUST be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.
Initarg | Value |
---|---|
:code | +frame-size-error+ |
A RST_STREAM frame with a length other than 4 octets MUST be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.
Initarg | Value |
---|---|
:code | +frame-size-error+ |
A SETTINGS frame with a length other than a multiple of 6 octets MUST be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.
Initarg | Value |
---|---|
:code | +frame-size-error+ |
Receipt of a PING frame with a length field value other than 8 MUST be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.
Initarg | Value |
---|---|
:code | +frame-size-error+ |
A request or response containing uppercase header field names MUST be treated as malformed. (...) Malformed requests or responses that are detected MUST be treated as a stream error of type PROTOCOL_ERROR.
We try to process headers, but end up in a middle of one.
:status pseudo-header field MUST be included in all responses.
All HTTP/2 requests MUST include exactly one valid value for the :method, :scheme, and :path pseudo-header fields, unless it is a CONNECT request.
The identifier of a newly established stream MUST be numerically
greater than all streams that the initiating endpoint has opened or
reserved (max was ~d). This governs streams that are opened using a
HEADERS frame and streams that are reserved using PUSH_PROMISE. An
endpoint that receives an unexpected stream identifier MUST respond with a
connection error (Section 5.4.1) of type PROTOCOL_ERROR.
Errors on the connection flow-control window MUST be treated as a connection error.
A receiver MUST treat the receipt of a WINDOW_UPDATE frame with a flow-control window increment of 0 as a stream error.
Initarg | Value |
---|---|
:code | +protocol-error+ |
Initarg | Value |
---|---|
:code | +protocol-error+ |
Pseudo header follows text header.
Initarg | Value |
---|---|
:code | +protocol-error+ |
Frame exceeds the size defined in SETTINGS_MAX_FRAME_SIZE.
Length of the padding is the length of the frame payload or greater.
A CONTINUATION frame MUST be preceded by a HEADERS, PUSH_PROMISE or CONTINUATION frame without the END_HEADERS flag set. A recipient that observes violation of this rule MUST respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
Description of a frame type.
Apart from name and documentation, each frame type keeps this:
- RECEIVE-FN :: How to handle reading of received frames
- NEW-STREAM-STATE :: whether it can be used to create new streams (i.e., is allowed on streams in
IDLE state) and if so what is new state of such stream
- OLD-STREAM-OK :: in what stream states the frame can be received
- CONNECTION-OK :: whether the frame can have STREAM-ID equal to zero, that is, act on connections.
structure-object
.
common-lisp
.
(or null string)
symbol
function
(constantly nil)
(or null (unsigned-byte 8))
Mixin to collect all payload parts to one string.
Initarg | Value |
---|---|
:body |
|
:body
Binary stream that accepts new octets to the output-buffer
binary-stream
.
fundamental-binary-output-stream
.
Initarg | Value |
---|---|
:to-write | 0 |
:to-store | 0 |
The flow control parameters are used both for streams and connections.
Initarg | Value |
---|---|
:reversed-history | nil |
:reversed-history
A simple connection: promise push not allowed, otherwise reasonable behaviour
close
.
(setf get-acked-settings)
.
get-acked-settings
.
(setf get-compression-context)
.
get-compression-context
.
(setf get-decompression-context)
.
get-decompression-context
.
(setf get-id-to-use)
.
get-id-to-use
.
(setf get-initial-peer-window-size)
.
get-initial-peer-window-size
.
(setf get-initial-window-size)
.
get-initial-window-size
.
(setf get-last-id-seen)
.
get-last-id-seen
.
(setf get-max-frame-size)
.
get-max-frame-size
.
(setf get-max-peer-frame-size)
.
get-max-peer-frame-size
.
(setf get-network-stream)
.
get-network-stream
.
(setf get-stream-class)
.
get-stream-class
.
(setf get-stream-id)
.
get-stream-id
.
(setf get-streams)
.
get-streams
.
Initarg | Value |
---|---|
:id-to-use | 1 |
:last-id-seen | 0 |
:streams | nil |
:acked-settings | nil |
:window-size | 0 |
:compression-context | (make-instance (quote hpack-context)) |
:decompression-context | (make-instance (quote hpack-context)) |
:stream-class | (quote http2-stream) |
:initial-peer-window-size | 65535 |
:initial-window-size | 65535 |
:max-frame-size | 16384 |
:max-peer-frame-size | 16384 |
:peer-window-size | 65535 |
:network-stream
Sequence of HTTP2 streams
:streams
:acked-settings
:compression-context
:decompression-context
http2::stream-id
:last-id-seen
http2::stream-id
:id-to-use
Class for new streams
:stream-class
:initial-window-size
:initial-peer-window-size
:max-frame-size
:max-peer-frame-size
:class
0
:stream-id
Representation of HTTP/2 stream. See RFC7540.
add-header
.
(setf get-connection)
.
get-connection
.
(setf get-data)
.
get-data
.
(setf get-depends-on)
.
get-depends-on
.
(setf get-network-stream)
.
get-network-stream
.
(setf get-seen-text-header)
.
get-seen-text-header
.
(setf get-state)
.
get-state
.
(setf get-stream-id)
.
get-stream-id
.
(setf get-weight)
.
get-weight
.
initialize-instance
.
print-object
.
Initarg | Value |
---|---|
:state | (quote idle) |
:window-size | 0 |
:weight | 16 |
:depends-on | (quote (non-exclusive 0)) |
:seen-text-header | nil |
:connection
:network-stream
http2::stream-id
:stream-id
http2::http2-stream-state
:state
:data
:weight
:depends-on
Set if in the header block a non-pseudo header was already seen.
:seen-text-header
HTTP2 stream that passes all its DATA frames to PAYLOAD-INPUT-STREAM.
Class that logs some activities and state changes.
Binary stream that reads data from the http stream.
It keeps data from last data frame in BUFFER, starting with INDEX.
fundamental-binary-input-stream
.
payload-stream
.
Initarg | Value |
---|---|
:index | 0 |
:data | (cons nil nil) |
:index
tlist that of accepted frames and cons of last frame and nil.
:data
Binary stream that accepts new octets to the output-buffer, until it is big
enough to send the data as a data frame on BASE-HTTP2-STREAM (or forced to by close of force-output)
fundamental-binary-output-stream
.
payload-stream
.
Initarg | Value |
---|---|
:to-write | 0 |
:to-store | 0 |
Base class for a CL binary stream that is defined over http2 stream
:base-http2-stream
Initarg | Value |
---|---|
:id-to-use | 2 |
:peer-accepts-push | t |
:peer-accepts-push
Jump to: | (
A C D E F G H I L M O P R S U V W |
---|
Jump to: | (
A C D E F G H I L M O P R S U V W |
---|
Jump to: | *
+
A B C D E F H I L M N O P R S U V W |
---|