Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shenfeng/tiny-web-server
a tiny web server in C, for daily use.
https://github.com/shenfeng/tiny-web-server
Last synced: about 2 months ago
JSON representation
a tiny web server in C, for daily use.
- Host: GitHub
- URL: https://github.com/shenfeng/tiny-web-server
- Owner: shenfeng
- Created: 2011-11-24T15:41:29.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2020-04-27T16:36:52.000Z (over 4 years ago)
- Last Synced: 2024-08-01T03:13:42.199Z (4 months ago)
- Language: C
- Homepage:
- Size: 117 KB
- Stars: 376
- Watchers: 33
- Forks: 125
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- stars - shenfeng/tiny-web-server
- awesomecode - Tiny Web Server - A tiny web server in C. (Uncategorized / Uncategorized)
README
A tiny web server in C
======================I am reading
[Computer Systems: A Programmer's Perspective](http://csapp.cs.cmu.edu/).
It teachers me how to write a tiny web server in C.I have written another
[tiny web server](https://github.com/shenfeng/nio-httpserver) in JAVA.And another one [http-kit](https://github.com/http-kit/http-kit), http-kit is full featured, with websocket and async support
And few others on my github page.
Features
--------1. Basic MIME mapping
2. Very basic directory listing
3. Low resource usage
4. [sendfile(2)](http://kernel.org/doc/man-pages/online/pages/man2/sendfile.2.html)
5. Support Accept-Ranges: bytes (for in browser MP4 playing)
6. Concurrency by pre-forkNon-features
------------1. No security check
Usage
-----`tiny `, opens a server in the current directory, port
default to 9999, just like `python -m SimpleHTTPServer`I use it as a lightweight File Browser.
TODO
----1. Write a epoll version
License
-------The code is free to use under the terms of the MIT license.