Release 2.14.0

- [API] Use lsxpack_header structure to send HTTP headers.
- [OPTIMIZATION] nocopy's readable_bytes() function.
- http_server: fix typo in error message
- Use ls-hpack 2.1.0.
- Use ls-qpack 2.0.0.
This commit is contained in:
Dmitri Tikhonov 2020-03-30 13:34:43 -04:00
parent a686ef2a56
commit 55613f4414
31 changed files with 10666 additions and 10735 deletions

View file

@ -1350,17 +1350,70 @@ for both reading and writing,
Sending HTTP Headers
--------------------
.. type:: lsquic_http_header_t
.. type:: struct lsxpack_header
.. member:: struct iovec name
This type is defined in _lsxpack_header.h_. See that header file for
more information.
Header name.
.. member:: char *buf
.. member:: struct iovec value
the buffer for headers
Header value.
.. member:: const char *name_ptr
HTTP header structure. Contains header name and value.
the name pointer can be optionally set for encoding
.. member:: uint32_t name_hash
hash value for name
.. member:: uint32_t nameval_hash
hash value for name + value
.. member:: lsxpack_strlen_t name_offset
the offset for name in the buffer
.. member:: lsxpack_strlen_t name_len
the length of name
.. member:: lsxpack_strlen_t val_offset
the offset for value in the buffer
.. member:: lsxpack_strlen_t val_len
the length of value
.. member:: uint16_t chain_next_idx
mainly for cookie value chain
.. member:: uint8_t hpack_index
HPACK static table index
.. member:: uint8_t qpack_index
QPACK static table index
.. member:: uint8_t app_index
APP header index
.. member:: enum lsxpack_flag flags:8
combination of lsxpack_flag
.. member:: uint8_t indexed_type
control to disable index or not
.. member:: uint8_t dec_overhead
num of extra bytes written to decoded buffer
.. type:: lsquic_http_headers_t
@ -1368,11 +1421,11 @@ Sending HTTP Headers
Number of headers in ``headers``.
.. member:: lsquic_http_header_t *headers
.. member:: struct lsxpack_header *headers
Pointer to an array of HTTP headers.
HTTP header list structure. Contains a list of HTTP headers in key/value pairs.
HTTP header list structure. Contains a list of HTTP headers.
.. function:: int lsquic_stream_send_headers (lsquic_stream_t *stream, const lsquic_http_headers_t *headers, int eos)
@ -1407,9 +1460,10 @@ fields yourself. In that case, the header set must be "read" from the stream vi
.. type:: struct lsquic_hset_if
.. member:: void * (*hsi_create_header_set)(void *hsi_ctx, int is_push_promise)
.. member:: void * (*hsi_create_header_set)(void *hsi_ctx, lsquic_stream_t *stream, int is_push_promise)
:param hsi_ctx: User context. This is the pointer specifed in ``ea_hsi_ctx``.
:param stream: Stream with which the header set is associated.
:param is_push_promise: Boolean value indicating whether this header set is
for a push promise.
:return: Pointer to user-defined header set object.
@ -1459,6 +1513,11 @@ fields yourself. In that case, the header set must be "read" from the stream vi
Discard header set. This is called for unclaimed header sets and
header sets that had an error.
.. member:: enum lsquic_hsi_flag hsi_flags
These flags specify properties of decoded headers passed to
``hsi_process_header()``.
.. function:: void * lsquic_stream_get_hset (lsquic_stream_t *stream)
:param stream: Stream to fetch header set from.
@ -1478,7 +1537,7 @@ fields yourself. In that case, the header set must be "read" from the stream vi
Push Promises
-------------
.. function:: int lsquic_conn_push_stream (lsquic_conn_t *conn, void *hdr_set, lsquic_stream_t *stream, const struct iovec* url, const struct iovec* authority, const lsquic_http_headers_t *headers)
.. function:: int lsquic_conn_push_stream (lsquic_conn_t *conn, void *hdr_set, lsquic_stream_t *stream, const lsquic_http_headers_t *headers)
:return:
@ -1491,10 +1550,7 @@ Push Promises
to stream ``stream``. It will behave as if the client made a request: it will
trigger ``on_new_stream()`` event and it can be used as a regular client-initiated stream.
If ``hdr_set`` is not set, it is generated by using ``ea_hsi_if`` callbacks (if set).
In either case, the header set object belongs to the connection. The
user is not to free this object until ``hsi_discard_header_set()`` is
called.
``hdr_set`` must be set. It is passed as-is to :func:`lsquic_stream_get_hset()`.
.. function:: int lsquic_conn_is_push_enabled (lsquic_conn_t *conn)
@ -1807,6 +1863,25 @@ Miscellaneous Types
.. member:: LSCONN_ST_CLOSED
.. member:: LSCONN_ST_PEER_GOING_AWAY
.. type:: enum lsquic_hsi_flag
These flags are ORed together to specify properties of
:type:`lsxpack_header` passed to :member:`lsquic_hset_if.hsi_process_header`.
.. member:: LSQUIC_HSI_HTTP1X
Turn HTTP/1.x mode on or off. In this mode, decoded name and value
pair are separated by ``": "`` and ``"\r\n"`` is appended to the end
of the string. By default, this mode is off.
.. member:: LSQUIC_HSI_HASH_NAME
Include name hash into lsxpack_header.
.. member:: LSQUIC_HSI_HASH_NAMEVAL
Include nameval hash into lsxpack_header.
Global Variables
----------------

View file

@ -24,9 +24,9 @@ copyright = u'2020, LiteSpeed Technologies'
author = u'LiteSpeed Technologies'
# The short X.Y version
version = u'2.13'
version = u'2.14'
# The full version, including alpha/beta/rc tags
release = u'2.13.3'
release = u'2.14.0'
# -- General configuration ---------------------------------------------------