-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
34 lines (30 loc) · 963 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
hhttppss, Homebuilt HTTP polling server skeleton
================================================
Author: Berke Durak
License: Placed in the public domain. No copyright.
Platform: Linux
History
=======
I once wrote this in two days for a job interview. I didn't take the job, but
I feel this might be a good start for someone. As it was sitting on my disk,
picking up dust, I decided to release it.
Advantages
==========
* Event-driven, poll()-based
Limitations
===========
* Only GET method
* *NO ACCESS CONTROL*
* No keep-alive
* Files are all opened with mmap
* No URL decoding
* No content-negotiation
* 3 built-in mime-types (HTML, plain text, octet-stream) with a simple
heuristic for discriminating.
Compilation
===========
1) make
2) ./hhttppss -p port -D /path/to/webroot
3) URLs are of the form http://127.0.0.1:8000/file which will cause the file
/path/to/webroot/file to be served. Any slashes in "file" will be replaced
by underscores.