HTTP/1.1 Support #12

Closed
opened 2023-09-05 16:39:21 -04:00 by jordan · 2 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 2023-09-05 16:39:21 -04:00
jordan added this to the Telodendria v1.7.0-alpha5 project 2023-09-05 16:39:22 -04:00
Author
Owner

This issue should be moved to Cytoplasm.

This issue should be moved to Cytoplasm.
Author
Owner
Moved to Telodendria/Cytoplasm#23.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
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/Telodendria#12
No description provided.