diff options
Diffstat (limited to 'doc/man7')
| -rw-r--r-- | doc/man7/libweb_handler.7 | 8 | ||||
| -rw-r--r-- | doc/man7/libweb_http.7 | 19 |
2 files changed, 23 insertions, 4 deletions
diff --git a/doc/man7/libweb_handler.7 b/doc/man7/libweb_handler.7 index 5c910e0..b9fd53f 100644 --- a/doc/man7/libweb_handler.7 +++ b/doc/man7/libweb_handler.7 @@ -1,4 +1,4 @@ -.TH LIBWEB_HANDLER 7 2023-09-15 0.1.0 "libweb Library Reference" +.TH LIBWEB_HANDLER 7 2023-11-18 0.2.0 "libweb Library Reference" .SH NAME libweb_handler \- libweb high-level website configuration @@ -69,15 +69,17 @@ struct handler_cfg const char *\fItmpdir\fP; int (*\fIlength\fP)(unsigned long long len, const struct http_cookie *c, struct http_response *r, void *user); void *\fIuser\fP; + size_t \fImax_headers\fP; }; .EE .in .PP .IR tmpdir , -.I length -and +.IR length , .I user +and +.I max_headers are passed directly to the .I struct http_cfg object used to initialize a diff --git a/doc/man7/libweb_http.7 b/doc/man7/libweb_http.7 index 329a616..93bb882 100644 --- a/doc/man7/libweb_http.7 +++ b/doc/man7/libweb_http.7 @@ -1,4 +1,4 @@ -.TH LIBWEB_HTTP 7 2023-09-15 0.1.0 "libweb Library Reference" +.TH LIBWEB_HTTP 7 2023-11-18 0.2.0 "libweb Library Reference" .SH NAME libweb_http \- libweb HTTP connection handling and utilities @@ -84,6 +84,7 @@ struct http_cfg int (*\fIlength\fP)(unsigned long long \fIlen\fP, const struct http_cookie *\fIc\fP, struct http_response *\fIr\fP, void *\fIuser\fP); const char *\fItmpdir\fP; void *\fIuser\fP; + size_t \fImax_headers\fP; }; .EE .in @@ -195,6 +196,15 @@ other function pointers defined by .I user can be a null pointer. +.I max_headers +refers to the maximum number of header fields that shall be passed to the +.IR "struct http_payload" +object passed to the function pointed to by +.IR payload . +Any extra headers sent by the client outside this maximum value shall be +silently ignored by +.IR libweb . + .SS HTTP payload When a client submits a request to the server, @@ -224,6 +234,8 @@ struct http_payload const struct http_arg *\fIargs\fP; size_t \fIn_args\fP; + const struct http_header *\fIheaders\fP; + size_t \fIn_headers\fP; }; .EE .in @@ -260,6 +272,11 @@ defines a list of key-value pairs containing URL parameters. Its length is defined by .IR n_args . +.I headers +defines a list of key-value pairs containing header fields. Its length +is defined by +.IR n_headers . + .SS HTTP POST payload As opposed to payload-less HTTP/1.1 operations, such as |
