Once a colleague asked me how to peep what headers a browser sends to a server. I suggested to write a minimal server that would store a request to a file.
Then I realized that the task would be really interesting to implement. I can learn how to use SocketServer or BaseHTTPServer library. So I wrote it myself.
The results are here. To learn sockets and socket servers better I implemented 4 different servers:
You can download them at once: get_request.tar.bz2.
This is the page http://phd.pp.ru/Software/Python/socket-servers/get_request/. It was generated on Sun, 27 Sep 2009 11:48:57 GMT from CheetahTemplate index.tmpl. Some rights are reserved. Read more about technical aspects of the site.