Rewrite isc_httpd using picohttpparser and isc_url_parse [v9.18]
Rewrite the isc_httpd to be more robust.
- 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).
- Replace the hand-crafted URL parser with isc_url_parse for parsing the URL from the HTTP request.
- 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.
- Process the received buffer from single isc_nm_read() in a single loop and schedule the sends to be independent of each other.
- Replace the truncated test with two new tests: a) test that sending more than 10 headers makes the connection to closed; b) test that sending huge HTTP request makes the connection to be closed.
Backport of !6879 (merged)
Edited by Michał Kępień