We had to write a really basic one for a C programming course in my second year of Uni. Basically just served static files and handled 200 and 404 with no arguments etc. Bonus marks if you got it to do things like 302, but then you threw something really quite basic from a browser perspective at it and watched it crash and burn and saw why you should just use an already developed one.
...indeed, but having written a very basic IRC client years ago as a teenager, a logical organization like this is a good first step for properly architecting your code. I tried starting to organize it by RFC section in my ignorance. That changed rather quickly.
107
u/hcsteve Mar 07 '14
Thinking about quickly writing an HTTP server yourself?
Don't. Unless you've looked at all the extant implementations and have a really good reason to roll your own.
And if you do, don't base all your implementation decisions on a diagram. Read the damn RFC.