Server algorithm

The main routine for the HTTP server configures itself according to the command line arguments, reads the rules file into memory, and starts a thread that listens for TCP/IP connections to the specified port. When a connection is received, the listener thread creates a new thread with a start routine that performs the following actions:

  1. Reads the HTTP request from WWW client and parses out method, URL, and protocol. Any header lines included with the request are read at this time as well.
  2. Executes request (function http_execute()):

    1. Parse URL into scheme, host, ident, and search arg (if any).

    2. Apply rules file rules to ident portion of URL. Send error message and return if 'fail' rule triggered.

    3. If translated URL matched on an exec rule:
      Punt to DECnet task (WWWEXEC) with subfunction "HTBIN"

      else if requested method is "GET" or "HEAD":
      If search argument present:
      Punt to DECnet task with subfunction "SEARCH"
      else:
      Retrieve file/directory and send to client.

      else if requested method is "POST":
      Punt to DECnet task with subfunction "POST"
  3. Close connection and exit thread.

Note the repeated use of the operation "punt to DECnet task", in which the server makes a DECnet connection to object WWWEXEC and lets the object control the processing of the request.


WWEXEC algorithm

The WWWEXEC procedure first opens SYS$NET, making it a PPF (Process Permanent File). It then reads the basic request parameters from the server (sub-function, method, ident, protocol) and continues processing based upon the sub-function:

For a more detailed description of the protocol used between the server and WWWEXEC, see the comments at the bottom of WWWEXEC.COM.
David Jones, Ohio State University