equal-l2 / http-server-from-scratch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP Server from scratch

Toy project to learn how to build server and learn about async ecosystem of Rust

Plans

  1. Build a single-threaded synchronous HTTP/1.1 server
    • Parse a request header
    • Parse path and read content (with caring about path traversal)
    • Parse body
    • Build response and send it (should be easy)
    • Consider keep-aliveing? (maybe)
  2. Build a single-threaded async runtime and turn the HTTP server into async
  3. Make the runtime multi-threaded
    • Steal idea from tokio/async-std/actix?

Problem

  • Can't handle keep-alive yet (Modern browsers assume all server supports it :( )

About


Languages

Language:Rust 100.0%