daemon/http: HTTP response codes
Fixes #728 (closed)
Related #618 (closed)
Currently:
- Replies with
400when aGETquery has no DNS query in it (the basic case in #728 (closed)) - Replies with
404when querying unknown endpoints (anything other than/dohor/dns-query) - Replies with
431when a header is too large
To do:
-
Reply with 400when thePOSTbody is malformed (but only if DNS itself cannot deal with it, then it is200as per RFC 8484) -
Reply with(changed to413when thePOSTbody is too long (attempted but not working at the moment)400) -
Reply with(changed to414when theGETURL is too long400) -
Check RFCs for more codes -
Make sure the way it's currently simply calling http_send_responseon error does not cause any problems -
Possibly more?
Edited by Vladimír Čunát