diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-11-18 00:56:04 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-11-18 01:03:12 +0100 |
| commit | 65031ca3502e0c27780be847fd97c112546741a9 (patch) | |
| tree | 31c8ac5bb815baf5e4b63bde3af9076eb30a30ed /handler.c | |
| parent | b71a6174e12b4709acaf8bc151938ba12d2a54f6 (diff) | |
Send HTTP headers to payload callback
Even if libweb already parses some common headers, such as
Content-Length, some users might find it interesting to inspect which
headers were received from a request.
Since HTTP/1.1 does not define a limit on the number of maximum headers
a client can send, for security reasons a maximum value must be provided
by the user. Any extra headers shall be then discarded by libweb.
An example application showing this new feature is also provided.
Diffstat (limited to 'handler.c')
| -rw-r--r-- | handler.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -109,7 +109,8 @@ static struct client *find_or_alloc_client(struct handler *const h, .payload = on_payload, .length = on_length, .user = ret, - .tmpdir = h->cfg.tmpdir + .tmpdir = h->cfg.tmpdir, + .max_headers = h->cfg.max_headers }; *ret = (const struct client) |
