1What is Bitty HTTP
Bitty HTTP is a small light weight web server with the basic handling of common HTML methods.
It is designed to serve web pages directly from the same C code as the web server it's self.
2What Bitty HTTP isn't
Bitty HTTP isn't a general purpose web server. It doesn't support CGI, URL rewriting, URL redirection, virtual servers, load balancing, or any other feature you would expect in a web server.
3Project GoalsThe core goals of Bitty HTTP are:
- Written in 100% C
- No OS needed
- No threads needed
- Non blocking
- Works with non standard socket interfaces
- No file system needed
- No external dependencies (beyond C std libary)
- Easily embedded in to C applications
4Feature ListThe current feature list for Bitty HTTP is:
- Written in C
- Supports HTTP 1.1
- Handles GET
- Handles POST
- Handles reading cookies
- Handles setting cookies
- Handles caching (using ETAG)
- Handles sending custom http headers
- Suitable for embedded systems
- File upload (multipart/form-data)
- HTTP 2.0
Bitty HTTP was started when I was looking around for a web server to replace the Microchip supplied one that came with one of there PICs. After looking around I could not find one that did all the things I needed (runs with a non standard socket interface, no threads, static memory use, supports GET,POST, and Cookies).
I wanted to just write my own because "how hard could it be", but my manager insisted it was "too hard" and told me to stick with the Microchip one. After much hacking to force it to work with dynamic content (it was really designed for mostly static content) I got it working.
I was annoyed by the whole "too hard" vs "how hard could it be" discussion so I spent a bunch of time looking into all the details of how http/1.1 worked. Turns out it's not that hard (however finding the info isn't so easy).
A few years later I wanted a web server again. Again I looked around and nothing (that I could find anyway) that fit my needs. The "too hard" discussion was still bugging me so I decided to see how long it would take to write a web server from nothing. One day later I had a basic web server up and running with GET and Cookie support. The code was not all that clean but it was still only 1 day to write one.
I started embedding this web server into all kind of projects, and it turned out to be really handy. So I decided to clean it up by rewriting it and to release the rewrite as an open source project.
I kept the low memory foot print, threadless, non blocking, non standard sockets design and added support for POST. Bitty HTTP is the result of all that.