To test the system:

	1) make
	2) then run:
	       bin/start_4999    (jungerl's bin directory must also be in your PATH)
	   or
	       erl -pa ebin -s pico_test start
	3) point your browser at http://localhost:4999/index.html
	   (N.B. unlike Apache there is no automatic redirection from a directory
	   path to index file).

	As specified in pico_test.erl, files are served from the 'htdocs'
	subdirectory.


Interface

	pico_http_server:start(Port, Max, Mod, [Arg1, Arg2]).

		Creates a process called pico_port_<Port>

		Parameters:
			Port - listening TCP/IP port
			Max - limits simultaneous connections
			Mod - name of handler module (e.g. ?MODULE if in caller's module)
			[...] - arguments to Mod:start()
        
	pico_http_server:stop(Port, Reason) 


Callbacks

	Mod:start_handler(Arg1, Arg2) -> State

	Mod:event_handler({get|post,Hostname,Uri,Args}, State) ->

			{ [header({ok,html}), Response], State' }
			Return a 200 OK status, with Response as content. 'html' indicates
			content type; 'text' and other types are also valid,
			see pico_utils:mime().

		or  { [header({error,Code,Response})], State' }
			Return error status, where Response is a plain text error message
			returned to web client. Code is the HTTP status: three digit code,
			followed by one line description
			(see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).

		or  { [header({redirect,Loc})], State' }
			issues a 302 temporary redirection to a new URL given by Loc.

		Note: Hostname, Uri & Args are parsed from the GET/POST request.
		e.g., if request is:
			http://localhost:8080/script/submit?name=Sally&colour=Blue
		Host: {ok,"localhost"}
		Uri:  "/script/submit"
		Args: [{"name","Sally"},{"colour","Blue"}]

	Mod:stop_handler(Reason, State) -> {Reason,State}


References

	Joe's Erlang tutorial #2 explains a similar web server design.
	http://www.sics.se/~joe/tutorials/web_server/web_server.html

	The Jungerl project 'wiki' is a moderately complex application built
	on the 'pico' server (see ../wiki).
