Constants and error types for the built‐in HTTP server's request parsing.

Types

Name

Description

ContentTooLargeError

Thrown when a request body exceeds MAX_BODY_SIZE (or will exceed, in chunked transfer) so the server can reply with more specific code 413 (content too large) vs general 400 (bad request)

Variables

Name

Description

MAX_BODY_SIZE

Maximum size of an HTTP request body

MAX_HEADERS_SIZE

Maximum size of each headers line in an HTTP request, also the maximum size of all headers total. See https://github.com/bitcoin/bitcoin/pull/6859 And libevent http.c evhttp_parse_headers_()

MIN_REQUEST_LINE_LENGTH

Shortest valid request line, used by libevent in evhttp_parse_request_line()

Created with MrDocs