# Kinglet – an asynchronous HTTP server

**URL:** <https://users.rust-lang.org/t/kinglet-an-asynchronous-http-server/3855>\
**Category:** announcements\
**Created:** [December 3, 2015, 8:21pm UTC](https://users.rust-lang.org/t/kinglet-an-asynchronous-http-server/3855 "2015-12-03T20:21:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pyfisch](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/pyfisch/32/6142_2.png) [@pyfisch](https://users.rust-lang.org/u/pyfisch)\
**Post date:** [December 3, 2015, 8:21pm UTC](https://users.rust-lang.org/t/kinglet-an-asynchronous-http-server/3855/1 "2015-12-03T20:21:14Z")

</div>

[Kinglet](https://github.com/pyfisch/kinglet) is the beginning of a HTTP server based on mio. It manages connnections using state machines from [rotor](https://github.com/tailhook/rotor) by @tailhook. The most interesting part is the [request state machine](https://github.com/pyfisch/kinglet/blob/bb965b3bdddf5c2b84c04fd599575cdb0207efe8/src/http1.rs#L132-L222): with only a few lines of code it supports parsing requests with fixed size bodies, chunked bodies with optional trailers and even pipelining. Adding support for more states like `100-Expect-Continue` will be easy. Some parts of the code still need cleanup and the structures of requests and responses will change.

---

<div class="post-metadata">

**Author:** ![steffahn](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/steffahn/32/47569_2.png) [@steffahn](https://users.rust-lang.org/u/steffahn)\
**Post date:** [January 12, 2023, 8:38am UTC](https://users.rust-lang.org/t/kinglet-an-asynchronous-http-server/3855/2 "2023-01-12T08:38:30Z")

</div>

Closed on January 12, 2023, 8:38am UTC


