bind9/lib
Ondřej Surý beecde7120 Rewrite isc_httpd using picohttpparser and isc_url_parse
Rewrite the isc_httpd to be more robust.

1. Replace the hand-crafted HTTP request parser with picohttpparser for
   parsing the whole HTTP/1.0 and HTTP/1.1 requests.  Limit the number
   of allowed headers to 10 (arbitrary number).

2. Replace the hand-crafted URL parser with isc_url_parse for parsing
   the URL from the HTTP request.

3. Increase the receive buffer to match the isc_netmgr buffers, so we
   can at least receive two full isc_nm_read()s.  This makes the
   truncation processing much simpler.

4. Process the received buffer from single isc_nm_read() in a single
   loop and schedule the sends to be independent of each other.

The first two changes makes the code simpler and rely on already
existing libraries that we already had (isc_url based on nodejs) or are
used elsewhere (picohttpparser).

The second two changes remove the artificial "truncation" limit on
parsing multiple request.  Now only a request that has too many
headers (currently 10) or is too big (so, the receive buffer fills up
without reaching end of the request) will end the connection.

We can be benevolent here with the limites, because the statschannel
channel is by definition private and access must be allowed only to
administrators of the server.  There are no timers, no rate-limiting, no
upper limit on the number of requests that can be served, etc.
2022-10-14 11:26:54 +02:00
..
bind9 Clarify error message about missing inline-signing & dnssec-policy 2022-10-06 10:26:30 +02:00
dns Replace #define DNS_NAMEATTR_ with struct of bools 2022-10-13 17:04:02 +02:00
irs Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
isc Rewrite isc_httpd using picohttpparser and isc_url_parse 2022-10-14 11:26:54 +02:00
isccc Convert DST_ALG defines to enum and group HMAC algorithms 2022-09-27 16:54:36 +02:00
isccfg flag "random-device" as ancient 2022-09-14 09:36:58 -07:00
ns Replace #define DNS_NAMEATTR_ with struct of bools 2022-10-13 17:04:02 +02:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
Makefile.am move samples/resolve.c to bin/tests/system 2021-04-16 14:29:43 +02:00