-
Notifications
You must be signed in to change notification settings - Fork 0
/
NOTES
32 lines (21 loc) · 1.15 KB
/
NOTES
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
TODO
- better error handling + logging
- url parsing
- concurrency (again)
- some sort of versioning / release system
- remove timeout from error codes
NOTES
- Ah, managing directory objects is annoying. maybe there's a better way
- the way uri are mapped to filenames works, but it feels pretty hacky
- we use lots of static buffer when string parsing, this gets kind of messy because
at any given moment there are a ton of static buffer lying around not being used,
wasting memory.... would be nice to have a single buffer where all string manipulation happens,
potentially make this its own library?
- learned a few things today:
- Unless you set the `Connection` header to `close`, HTTP clients will attempt to reuse TCP connections.
- see: RFC 2616 section 8.1 https://tools.ietf.org/html/rfc2616#section-8.1
- If `connection` IS set to close, clients will properly indicate an EOF (writing 0 bytes), and we haven't handled this yet
- TODO :)
- EOF is now handled (when read(2) returns 0)
- logs now follows logstalgia format: 1371769989|127.0.0.1|/index.html|200|1024
- see: http://logstalgia.io/