1 Struct n_http_req_limits
gullradriel edited this page 2026-10-25 10:46:33 +01:00

n_http_req_limits

Module: HTTP/1.1 REQUEST HEAD: strict, bounded parser

Limits for n_http_request_parse_ex().

#include "n_http_req.h"

Public Attributes

Name
int require_host
non-zero: an HTTP/1.1 request must carry exactly one Host header and an HTTP/1.0 one at most one (RFC 9112 section 3.2)
unsigned methods
accepted methods, an OR of N_HTTP_REQ_METHOD_BIT(); any other method is an error
long long body_max
largest accepted Content-Length, 0 to N_HTTP_REQ_BODY_LIMIT_MAX

Public Attributes Documentation

variable require_host

int require_host;

non-zero: an HTTP/1.1 request must carry exactly one Host header and an HTTP/1.0 one at most one (RFC 9112 section 3.2)

variable methods

unsigned methods;

accepted methods, an OR of N_HTTP_REQ_METHOD_BIT(); any other method is an error

variable body_max

long long body_max;

largest accepted Content-Length, 0 to N_HTTP_REQ_BODY_LIMIT_MAX