Currently only two such cases will be supported:
Look in the corresponding .hh header files for comments on how to interface to each of these modules. Names starting with a capital letter are C++ classes. Others are function calls. Modules that have `util' in their names may contain a collection of related functions
- LogStream.hh
- A C++ iostream object which you can use like any other stream, except whatever you put on it goes into HTML formatted text and/or calls cfht_log().
- SignalCatcher.hh
- A general object that rpm initializes at startup to trap most of the trap-able signals. When one is caught, it logs the occurance as a potential problem, and attempts to exit gracefully.
- RpmShow.hh
- Stack-like class for dealing with {IF} tags
- http_*.hh
- Code for supporting HTTP protocol features live here.
- http_KeepAlive.hh -- Handles ``Connection: Keep-Alive'' used by the latest browsers.
- http_date_util.hh -- Handles "Date:", "Last-Modified:", and "If-Modified-Since:"
- http_messages.hh -- A few defines for http message response headers.
- dtd_*.hh
- Code for dealing with the DTD (the Hform DTD, in this case)
- dtd_intro.hh -- groks just the most supeficial info about the Hform. This amounts to reading everything up to the {/Window} (is it dynamic? what are the title? width? height?) It is just designed to get the stuff needed by hform out of the file.
- dtd_conditional.hh -- a class to handle {If}{/If} type tags
- dtd_global.hh -- groks tags that are valid in both the Head and the Body sections (just {Include ...} at the moment.)
- dtd_head.hh -- groks everything in the {Head}{/Head} section in order to
- Allocate variable tables and other data
- Validate client's posted values (if JavaScript didn't already do it for us)
- Merge client's posted values into the data structures
- dtd_body.hh -- groks everything in the {Body}{/Body} section and actually generates the HTML to send to the browser.
- rpm_syntax.hh
- Information on escape characters and delimiter characters used in rpm
- rpm_parser.hh
- the main parser loop
- rpm_logger.hh
- At startup, rpm forks this guy. Operation is pretty simple: It reads characters over standard input (which is hooked into the parent process's standard error) and prints them into one of two predefined (by the main process) log files, depending on whether strings are terminated with NUL+S or NUL+E (for Summary/Extended log.)
- rpm_config.hh
- Handles reading the rpm global configuration file (usually /etc/rpm.conf). The information in this file is read into three (string) arrays:
- secure_rpm[] -- the list of users which rpm can execute stuff as
- mime_type[] -- a list of MIME types by file extension
- config[] -- other general configuration parameters
- rpm_find_file.hh
- Code for looking up files (par files, html files, rpm files, whatever.)
- rpm_find_variable.hh
- Code for reading data files into (string) arrays. Right now, this just includes CFHT par files, but support to read in the headers from a fits file is also planned.
- rpm.cc
- Contains the main code of the server. It is linked with all of the above files to create the rpm `httpserver'
- hform.cc
- Contains Netscape "netscape-remote" program with a few changes for Hforms. It is linked with logstream, rpm_config, rpm_find_file, and dtd_intro.
Client says "GET /index.html HTTP/1.0\n\n"
Server says "Content-type: text/html\n"
Client says "POST /script.cgi HTTP/1.0\n\n"
1996 September 23 by Sidik Isani isani@cfht.hawaii.edu