1
Fork 0
hare-http/net/http
Jan-Erik Rediger 53a13840bd Add Host header into target uri
Previously this would lead to an abort for an empty path (`/`), because
`http:/` cannot be parsed correctly.
The URI becomes the `target` in `request`, so it seems best to add the
`Host` header value too.

Note that this is still not 100% correct:
HTTP headers are case-insensitive, so it could also be `host:` or `HoSt`.
Right now headers are not normalized.
However it will not abort if `Host` is missing:
In that case `header_get` returns an empty string and then `http:///`
(three slashes) is parsed with an empty host name as expected.
2024-05-27 22:49:41 +02:00
..
client.ha net::http: export new_request{,_body} 2023-10-08 11:14:26 +02:00
constants.ha Define new request method constants 2024-03-04 11:23:13 +01:00
do.ha Updates for Hare upstream changes 2024-04-19 11:24:02 +02:00
error.ha error: correct doc reference 2023-02-12 13:19:00 +01:00
header.ha Implement server-side HTTP support 2024-04-19 11:22:15 +02:00
README README: update to latest RFC 2023-02-15 09:53:03 +01:00
request.ha Add Host header into target uri 2024-05-27 22:49:41 +02:00
response.ha Implement server-side HTTP support 2024-04-19 11:22:15 +02:00
server.ha Implement server-side HTTP support 2024-04-19 11:22:15 +02:00
status.ha net::http: add status code utilities 2023-02-11 11:16:15 +01:00
transport.ha Updates for Hare upstream changes 2024-04-19 11:24:02 +02:00

net::http provides an implementation of an HTTP 1.1 client and server as defined
by RFC 9110 et al.

TODO: Flesh me out

Caveats:

- No attempt is made to validate that the input for client requests or responses
  are valid according to the HTTP grammar; such cases will fail when rejected by
  the other party.
- Details indicated by RFC 7230 et al as "obsolete" are not implemented
- Max header length including "name: value" is 4KiB

TODO:

- Server stuff
- TLS