mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-08 11:08:52 +08:00
Use 4086 as max DATA payload size to make DATA frame fit into 4K buffer
This commit is contained in:
@@ -42,8 +42,10 @@
|
||||
/* The maximum payload length of a frame */
|
||||
#define NGHTTP2_MAX_FRAME_LENGTH ((1 << 14) - 1)
|
||||
|
||||
/* The maximum length of DATA frame payload. */
|
||||
#define NGHTTP2_DATA_PAYLOAD_LENGTH 4096
|
||||
/* The maximum length of DATA frame payload. To fit entire DATA frame
|
||||
into 4096K buffer, we use subtract header size (8 bytes) + 2 bytes
|
||||
padding. See nghttp2_session_pack_data(). */
|
||||
#define NGHTTP2_DATA_PAYLOAD_LENGTH 4086
|
||||
|
||||
/* The number of bytes of frame header. */
|
||||
#define NGHTTP2_FRAME_HEAD_LENGTH 8
|
||||
|
||||
@@ -74,9 +74,8 @@ typedef struct {
|
||||
/* Buffer length for inbound raw byte stream. */
|
||||
#define NGHTTP2_INBOUND_BUFFER_LENGTH 16384
|
||||
|
||||
#define NGHTTP2_INITIAL_OUTBOUND_FRAMEBUF_LENGTH (NGHTTP2_DATA_PAYLOAD_LENGTH+8)
|
||||
#define NGHTTP2_INITIAL_INBOUND_FRAMEBUF_LENGTH \
|
||||
NGHTTP2_INITIAL_OUTBOUND_FRAMEBUF_LENGTH
|
||||
#define NGHTTP2_INITIAL_OUTBOUND_FRAMEBUF_LENGTH 4096
|
||||
|
||||
#define NGHTTP2_INITIAL_NV_BUFFER_LENGTH 4096
|
||||
|
||||
/* Internal state when receiving incoming frame */
|
||||
|
||||
Reference in New Issue
Block a user