I want to write an HTTP server from scratch

As the title says, I want to write an HTTP server from scratch. I want to write a full blown server, not just a toy. I don't think I'm necessarily wanting to write a competing product with what we already have in the community, but I feel like I could learn a whole lot about from doing this project and perhaps build a nice product that a few people may want to use along the way.

I was hoping the community could share some resources. Are there any other resources y'all would suggest?

I know about the RFC's already (RFC 7230, etc), and I've written the toy server that was introduced in the rust book.

1 Like

Why do you need to implement ftp?

I guess I don't. I was reading another post from someone with the same question, on another forum, and someone there alluded to them needing to implement the ftp protocol within the server as well. I'll edit my original post and take that out.

I've done work in

And some more work in

You can take a look at both and ask whatever you don't get , hope it helps

1 Like

Well it depends how far down the stack you want to build yourself.

To go from the very beginning you could:

You can also build on hyper, which is a low level http crate.

While it might be good idea to write server itself from a scratch, but HTTP parsing might a bit overkill.

There is already https://crates.io/crates/httparse which was made by hyper author.
It is only parser, no server component