HTTP/1.1 Support #23

Open
opened 2024-01-12 00:36:50 +00:00 by jordan · 0 comments
Owner

The current HTTP/1.0 web server works, but it's hacky. We don't need full HTTP/1.1 support, just the following things might be nice:

  • Content-Length header to inform the server how many bytes to read from the client.
  • Keeping connections open for multiple requests (once a request is handled, it should be placed back in the queue to be handled again in the future. Repeat until the client closes the connection or it times out.)
    • Related: the server should not hang a thread waiting for the client to send data; if we get EAGAIN, put the request at the end of the queue and go on to other requests.
  • A way to get the source IP address of a connection, including proxy support using X-Forwarded-For. We must provide a facility for passing a list of trusted proxies to read X-Forwarded-For for, otherwise we will be vulnerable to client hijacking of X-Forwarded-For.

Less important but maybe useful would be:

  • Chunked encoding
The current HTTP/1.0 web server *works*, but it's hacky. We don't need full HTTP/1.1 support, just the following things might be nice: - [ ] `Content-Length` header to inform the server how many bytes to read from the client. - [ ] Keeping connections open for multiple requests (once a request is handled, it should be placed back in the queue to be handled again in the future. Repeat until the client closes the connection or it times out.) - **Related:** the server should not hang a thread waiting for the client to send data; if we get `EAGAIN`, put the request at the end of the queue and go on to other requests. - [ ] A way to get the source IP address of a connection, including proxy support using `X-Forwarded-For`. We must provide a facility for passing a list of trusted proxies to read `X-Forwarded-For` for, otherwise we will be vulnerable to client hijacking of `X-Forwarded-For`. Less important but maybe useful would be: - [ ] Chunked encoding
jordan added the
enhancement
label 2024-01-12 00:45:01 +00:00
jordan added this to the Cytoplasm v1.0.0 milestone 2024-01-13 17:35:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Telodendria/Cytoplasm#23
No description provided.