Mimimal HTTP/1.1 Server
This project aims to create a simple, platform independent HTTP/1.1
The functionality of this server is extremly basic, just pure file serving.
On the other hand the thing I concentrated most on was the clarity of the
code. I used objects, exceptions and std:: streams wherever I thought it
could be used (no easy solutions, just the right stuff ;). I based my work on
the HTTP/1.1 (RFC2616) and URI (RFC2396) specyfications.
I tried to make the code portable, so you'll find only BSD sockets
(socket(...), accept(), read(...), etc.) and standard C++ functions and
objects - no additional libaries needed. I've tested the project on both
GNU/Linux (using gcc 3.2) and on MS Windows 2000 (using MS Visual Studion
.NET). The GNU/Linux version reads the parameters from the command line. The
Windows version has a dialog based interface as shown below:
Maybe the most interesting part of this project is it's iosokcetstream class which gives you the ability to
use all std::iostream methods and operators on a socket.
|The sources, both Windows (MFC) and GNU/Linux, can be
downloaded at SourceForge.
Copyright (C) 2003 Krzysztof Rzymkowski
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.