tags:

views:

517

answers:

6
+2  Q: 

A Small Web Server

Can someone suggest a small webserver implementation that will illustrate the concepts of what a webserver does? It should be in a language that is easily read, and understood, and should implement security and cgi, maybe javascript?

+2  A: 

lighttpd

Paul Tomblin
+1  A: 

Cassini

FlySwat
+2  A: 

Github Mongrel source repository

  • Well documented
  • Fully tested
  • Mostly Ruby so it's quite easy to read
  • You can pull down the repo and play around with the code quite easily
mwilliams
+4  A: 

thttpd, a tiny/turbo/throttling http server.

It is written in C. If by "a language that is easily read" you meant "not C," then nevermind.

DGentry
+1  A: 

http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=webserver.r

A web server written in a few lines - easily understood.

or, this one, with CGI

http://www.rebol.org/view-script.r?script=webserv.r

What do you mean by security? Javascript is normally just page content.

+1  A: 

http://www.rebol.net/cookbook/recipes/0057.html

one of the former REBOL ones with explanations