Short: zAMilo mini-http & rsh-over-http server v1.0rc2 (C src incld)
Author: Patrick Roberts <>
Version: 1.0rc2 BETA


zAMilo is a mini-http server. The compiled lite binary is less that 4k
and is very fast. It was inspired by zilo by Stefan Hellkvist which was
created by Ericsson to run on their mobile phones.

zAMilo serves simple http GET requests, which is enough for most sites.
It also has the ability to serve the stdout of any other tool as an html
document. In this way it emulates rsh via http.


Syntax: zAMilo {options} {home directory}


-port=[#] = Port number for server (optional, default=80)

-login=[user:pass]= Username and Password if you want Authentication

-realm=[realm] = HTTP Realm (default is zAMilo{PORT#} )

-epage=[filename] = File to send when file not found error occurs
(Error: 404). (optional, Default is internal)

-pmax=[#] = Maximum number of parallel processes to launch

-kill=[killreq] = Request password to shutdown server. (optional)

-ptool=[toolname] = Name of tool to bind to port in rsh mode. (optional)

-1cat = Forbid multiple commands being issued in
rsh mode with ';' (1 command at a time)

home_directory = WWW root directory.



To compile the full version simply type 'make'

To compile the lite version (no RSH, HTTP server only) type 'make lite'

There are options in the Makefile for including or excluding parallel
processing and statistics reporting.



To run as a simple http document server, type something like:

./zAMilo.00 kill=killpasswd /webroot

If you point your broswer to: "" you should
get the index page located at /webroot/index.html. If you
type "" zAMilo will shutdown.

To run as a tool/rsh server, type something like:

./zAMilo.00 -port=8080 -kill=killpasswd -ptool=ls

In your browser now try: http://host:8080/ You should see the
ls output from where zAMilo was launched. Arguments can be passed
to the tool on the URL line seperated by '?' characters. Try
http://host:8080/-1al?/lang/cc/include You should see the output
of 'ls -1al /lang/cc/include' in your browser window. Other fun
tools to try are ps and cat. If you use {ptool=;} you can issue
any shell command you like. Normally you can issue multiple shell
commands by using a ';' character. The option -1cat prohibits
this behavior.

To show stats on a running server, type zAMilo_pstat {port}

Known bugs and issues:

* Calling a shell command in RSH mode that requires stdin like 'help'
hangs the server


* Clean up code
* Possibly limited SSI and CGI Support.



0.92: Added basic authentication for username/password access
Added -1cat to prevent unathorized commands being run with ';'
Added correct HTTP headers.

0.95 Better HTTP headers (Content-legnth)
Grows to 4.8k :(
Correctly serves GIF and JPEG images now.
All HTTP server functions tested successfully with:
Ibrowse 2.2
Voyager 3.2.13
AWeb 3.3
Netscape Communicator 4.61
Netscape Communicator 4.04
Microsoft Internet Explorer 5.0
** Special thanks to Steve H and Dave Trollope for the help **
** with testing the Amiga Classic Web Browsers. **

0.96 #define to exclude rsh functions to make raw HTTP server smaller.
New 'lite' binary is back to under 3.5k :)
New Makefile options
Optimizations to make .00 smaller.

0.97 Parallel Processing.
Statistics reporting
zAMilo_pstats example program showing how to get stats. (see zAMiloNDA.h)

0.98 Fixed bug in Parallel serving tool when STATS not defined
Fixed bug in main app serving subroutine when STATS not defined
Verfied works under debug shell

0.98a Fixed bug when called without -kill option

0.99 Fixed socketops so you no longer need to wait for a timeout to
restart on the same port. (Thanks to Deryk Robosson)
Added support for 301 redirect if users asks for a file that
should be a directory name.

0.99a Fixed bug in parallel version when -addr not specified.
Wrote code to automatically get hostname so -addr no longer

1.0rc1 Fixed malformed "Server:" header tag entry
Changed redirect from 303 to 301 error as it should
be, but then changed it back when Netscape and
IBrowse didn't process 301 correctly.

1.0rc2 Got compiling under SDK 1.1 beta