mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 4.0.1
This commit is contained in:
parent
1b113d192f
commit
8fb7e2c02c
2 changed files with 12 additions and 10 deletions
|
@ -106,6 +106,7 @@ SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} /wd4245") # conversion from 'int' to 'unsi
|
|||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} /wd4267") # integer conversion
|
||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} /wd4214") # nonstandard extension used: bit field types other than int
|
||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} /wd4295") # array is too small to include a terminating null character
|
||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} /wd4324") # structure was padded due to alignment specifier
|
||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} /wd4334") # result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
|
||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} /wd4456") # hide previous local declaration
|
||||
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} /wd4459") # hide global declaration
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Copyright (c) 2017 - 2022 LiteSpeed Technologies Inc. See LICENSE. */
|
||||
#ifndef LSXPACK_HEADER_H_v207
|
||||
#define LSXPACK_HEADER_H_v207
|
||||
#ifndef LSXPACK_HEADER_H_v208
|
||||
#define LSXPACK_HEADER_H_v208
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
#define LSXPACK_MAX_STRLEN UINT16_MAX
|
||||
#endif
|
||||
|
||||
typedef int32_t lsxpack_offset_t;
|
||||
#if LSXPACK_MAX_STRLEN == UINT16_MAX
|
||||
typedef uint16_t lsxpack_strlen_t;
|
||||
#elif LSXPACK_MAX_STRLEN == UINT32_MAX
|
||||
|
@ -49,9 +50,9 @@ struct lsxpack_header
|
|||
char *buf; /* the buffer for headers */
|
||||
uint32_t name_hash; /* hash value for name */
|
||||
uint32_t nameval_hash; /* hash value for name + value */
|
||||
lsxpack_strlen_t name_offset; /* the offset for name in the buffer */
|
||||
lsxpack_offset_t name_offset; /* the offset for name in the buffer */
|
||||
lsxpack_offset_t val_offset; /* the offset for value in the buffer */
|
||||
lsxpack_strlen_t name_len; /* the length of name */
|
||||
lsxpack_strlen_t val_offset; /* the offset for value in the buffer */
|
||||
lsxpack_strlen_t val_len; /* the length of value */
|
||||
uint16_t chain_next_idx; /* mainly for cookie value chain */
|
||||
uint8_t hpack_index; /* HPACK static table index */
|
||||
|
@ -99,11 +100,11 @@ lsxpack_header_set_offset(lsxpack_header_t *hdr, const char *buf,
|
|||
{
|
||||
memset(hdr, 0, sizeof(*hdr));
|
||||
hdr->buf = (char *)buf;
|
||||
hdr->name_offset = (lsxpack_strlen_t)name_offset;
|
||||
hdr->name_offset = (lsxpack_offset_t)name_offset;
|
||||
assert(name_len <= LSXPACK_MAX_STRLEN);
|
||||
hdr->name_len = (lsxpack_strlen_t)name_len;
|
||||
assert(name_offset + name_len + 2 <= LSXPACK_MAX_STRLEN);
|
||||
hdr->val_offset = (lsxpack_strlen_t)(name_offset + name_len + 2);
|
||||
hdr->val_offset = (lsxpack_offset_t)(name_offset + name_len + 2);
|
||||
assert(val_len <= LSXPACK_MAX_STRLEN);
|
||||
hdr->val_len = (lsxpack_strlen_t)val_len;
|
||||
}
|
||||
|
@ -116,11 +117,11 @@ lsxpack_header_set_offset2(lsxpack_header_t *hdr, const char *buf,
|
|||
{
|
||||
memset(hdr, 0, sizeof(*hdr));
|
||||
hdr->buf = (char *)buf;
|
||||
hdr->name_offset = (lsxpack_strlen_t)name_offset;
|
||||
hdr->name_offset = (lsxpack_offset_t)name_offset;
|
||||
assert(name_len <= LSXPACK_MAX_STRLEN);
|
||||
hdr->name_len = (lsxpack_strlen_t)name_len;
|
||||
assert(val_offset <= LSXPACK_MAX_STRLEN);
|
||||
hdr->val_offset = (lsxpack_strlen_t)val_offset;
|
||||
hdr->val_offset = (lsxpack_offset_t)val_offset;
|
||||
assert(val_len <= LSXPACK_MAX_STRLEN);
|
||||
hdr->val_len = (lsxpack_strlen_t)val_len;
|
||||
}
|
||||
|
@ -133,7 +134,7 @@ lsxpack_header_prepare_decode(lsxpack_header_t *hdr,
|
|||
memset(hdr, 0, sizeof(*hdr));
|
||||
hdr->buf = out;
|
||||
assert(offset <= LSXPACK_MAX_STRLEN);
|
||||
hdr->name_offset = (lsxpack_strlen_t)offset;
|
||||
hdr->name_offset = (lsxpack_offset_t)offset;
|
||||
if (len > LSXPACK_MAX_STRLEN)
|
||||
hdr->val_len = LSXPACK_MAX_STRLEN;
|
||||
else
|
||||
|
@ -166,4 +167,4 @@ lsxpack_header_mark_val_changed(lsxpack_header_t *hdr)
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif //LSXPACK_HEADER_H_v207
|
||||
#endif //LSXPACK_HEADER_H_v208
|
||||
|
|
Loading…
Reference in a new issue