Introduction Introduction to SimpleHTTPd

The SimpleHTTPd (short-name/program name: shttpd) is a simple WWW server with a small use of ressources. "Why another WWW server, when there are a lot of WWW server still in business?" you may ask yourself. Let's explain: A lot of WWW servers are platform specific in that way, that the server runs only on one platform or one type of platform. WWW servers supported on two different kinds of platforms, lets say Unix and Microsoft Windows NT, are rare. Some of these, which were originally written for Unix, have problems on the second platform, because the authors have problems in porting the software. For testing purposes, WWW servers often are too complicated or too complex.

That's the point, where the SimpleHTTPd shall help. The sources were not written on one kind of platform in total, but have been developed on several operating systems, like IBM OS/2 Warp 3 & 4, Microsoft Windows 95, 98, NT & 2000, HP/UX 9.xx .. 11.xx, SunOS 4.1.4, Sun Solaris 2.4 .. 2.7, etc.. The WWW server itself runs as a single task, splitting incoming requests on sub-processes, when they come in. So there are no sleeping processing, consuming memory. Depending on the operating system, the sub-processes are implemented as tasks (Unix API) or threads (MS Win32 API, OS/2 API). To avoid a slow-down when processing rapidly incoming requests, a spooling area for data (shared memory) prevents memory fragmentation and allocation on creation of a sub-process. (When creating a new task, that uses write access to a data area, the operating system normally creates a new data area with a copy of the original data. But if the data area is marked as shared memory, creation of a new copy of this data area is prohibited.)

Another two points for me writing a WWW server were the remote administration, which should be independent from the operating system, and a fast interface for user-written routines. The modules concept is well known to the Apache WWW server and to the Microsoft Internet Informtion Server (and others), but within the shttpd the module handling is neutral to the operating system, i.e. a module written on one platform may be re-compiled on another platform without modification of the source code! Further, the modules have an optional destructor routine, so de-installation routines may be implemented.

Here is a short overview with the details of the shttpd. The word OS/2 stands for IBM OS/2 Warp 3 or 4, Win32 for Microsoft Windows 95, 98, NT or 2000 and Unix for a Unix-style operating system, like IBM AIX, *BSD, HP/UX, Linux, SunOS, Sun Solaris, etc..

AttributeOperating
System
Explanation
Availability OS/2OS/2 Warp 3.0, Warp 3.0 Connect, Warp 3.0 Server, Warp 4.0 with Internet Access Kit or TCP/IP >= 3.0
Win32Windows 95, 98, NT 3.51, NT 4.0, NT 5.0, 2000
Unixshould compile (with manual adaptions) to nearly all Unix-like OSs, tested under: HP/UX 9.01 & 10.20, SunOS 4.1.4, Sun Solaris 2.5.1 & 2.6
Sub-Processes OS/2... are implemented as threads.
Win32
Unix... are implemented as processes.
Data Spooling OS/2... is done in a common data area (threads use the same data segment).
Win32
Unix... is done in shared memory (common data area for the processes).
Remote Configuration OS/2... is done via a WWW browser with support for HTML 2.0 and HTML tables at least.
Win32
Unix
Modules OS/2... are implemented as dynamic link libraries (DLLs)
Win32
HP/UX 9.0x... are implemented as shared libraries with a file name extension *.sl
Unix (others)... are implemented as shared libraries with a file extension *.so
Key Features OS/2
  • available under various platforms (IBM OS/2 32bit, Microsoft Windows 32bit, Unix-style OSs)
  • remote administration per WWW bowser
  • small overhead on sub-processes
  • can handle multiple requests at one time (see Copyright notes for limits)
  • authorization by user name and password with different authorization schemes
  • support for various MIME types (customizable)
  • traditional interface for dynamically created output - CGI (common gateway interface)
  • high-performance interface for dynamically created output - loadable modules
  • loadable modules with initializer, destructor, break entry and handler routine
  • support for data encryption (SSL)
  • support for on-the-fly data compression (gzip)
  • ...
Win32
Unix

Note:
Due to restrictions on file systems - eh? Anyone saying "FAT"? Don't forget MINIX and its 14-characters-on-filenames-only restriction ... - the names of all files are 8.3 compliant. So the SimpleHTTPd server itself isn't called like that, but is named shttpd.

>> index

Table of Contents
Table of
Contents
Index
Index A-Z
Server Administration
Server Ad-
ministration
Copyright
Copyright
Notes
©. 1998-2000 by Dirk Ohme