MUMPS Web Server
The MUMPS web server is distributed as part of the utilities.
Routines: %WWW Main Server Loop
%WWW1 Subroutines
%WWWU Utilities
To start the MUMPS Web Server, as super user, J ^%WWW
All documents accessed by the server are expected to be in ^%D as:
^%D(index,0) = name
^%D(index,version,line) = data
^%D(name) = index
If the part of the name after the last dot is:
jpg or JPG The file is a jpeg image
gif or GIF The file is a gif image
class or CLASS The file is a java class
anything else The file is text/html
Text files may be created and edited using ^%DED or the MCL
commands DCHANGE and DSCAN.
A Directory of current documents may be obtained using ^%DD or
the MCL command DDIRECT.
Also %WWWU may be used as a front end to the data in ^%D, providing:
1. Edit a document
2. List documents
3. Delete a document
4. Import a document
The server expects http commands like:
   GET /filename HTTP/1.0
and
   GET /?extrinsic&fld=data...
To get a trace dump of incoming data, S ^WWW=1 - the trace is
saved in ^WWW(n)=data.
To log connections set ^WWWLOG=1.
For the filename case, the default name is index.html.
Any directory specified is ignored (eg /dir/file -> file).
For the extrinsic case, two arguments are passed by reference.
The first is an array of the data exactly as received from the browser.
The second is an array of the form (field)=data where the %nn values
have been resolved.
If the return value is not null, it is displayed as an error message.
If the value of the top node of the first argument is not null,
it is treated as a document to transmit.
The extrinsic may write data directly to the browser as the channel (10)
is current when the extrinsic is accessed. There is no need for the
extrinsic to return in this case, it may just halt.
An extrinsic interface could be added to %M, for example:
  
< A HREF="?$$WWW^%25M&CMD=SHO%20SYS" > click here for SHO SYS < /A >
will give some system info - Note the 25 after the % is required as
% is used as an escape character by http.