Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 878 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 878 Bytes

Http request parser

Rust

This is rudimentary.

The high level idea is:

  1. Create a new Request object.
  2. Receive streaming HTTP request data from some external source.
  3. As the data comes in, call request.update, passing in streamed data.

Eventually all of the data (D) will be fed into request.update(D) then:

  1. request.body_complete() will return true.
  2. request.body() will return the body captured based on the content-length header.

rather random notes

https://en.wikipedia.org/wiki/HTTP_persistent_connection
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect
https://sookocheff.com/post/networking/how-do-websockets-work/