home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
SREFV12J
/
ADV_OPTS.DOC
< prev
next >
Wrap
Text File
|
1997-05-06
|
7KB
|
192 lines
5 May 1997.
Description of SRE-Filter's SEL-specific "advanced options"
1) Introduction
The SEL-specific advanced-options provide a set of less-frequently needed,
"advanced-options" to the ambitious webmaster.
These advanced-options include:
* execution of "mid-filter" procedures,
* customization of response headers
* suppression of specific server side includes.
* in the future, additional features may be added.
2) Specifying an advanced-options file.
To use these advanced-options, you need to specify a SEL-specfic
"advanced-options file". As with other SEL-specific controls, this is
done by modifying ALL_FILE.CTL (the ACCESS_CONTROL_FILE) -- either by
hand, or with the intermediate-mode configurator.
Note:there is NO global (default) advanced-options file.
Advanced-options files should be located in, or under, the DATA\
subdirectory of your GoServe working directory (actually, it will be in
or under the SRE-Filter WORKDATA_DIR directory). Thus, when specifying
(in ALL_FILE.CTL) an advanced-options file, you should NOT use a fully
qualified name.
For example, assuming that your SRE-FIlter "WORKDATA_DIR" directory is
D:\GOSERVE\DATA, the following entry in ALL_FILE.CTL:
/SAMPLES/* * , , MYREALM , , ADV_OPT.CTL
tells SRE-Filter to use D:\GOSERVE\DATA\ADV_OPT.CTL
3) The advanced options
Currently, there are three sets of options that may be set in the
advanced options file:
1) EXEC commands -- execute an external REXX procedure.
2) HEADER and RESPONSE directives -- specify a custom response header
3) SSI_suppression directives -- suppress specific SSI actions.
Note that each of these entries should appear on a single line (lines
beginning with a ; are comments). The following documents how to
use these options. We also recommend perusing the ADV_OPTS.CTL and
ADV_OPTS.CMD sample files.
3a) EXEC Commands
EXEC entries are used to execute external REXX procedures. This execution
occurs just before the "verb is processed", and after all "selector
modifications/redirections" and "access control checks."
In a sense, the EXEC commands can be thought of as "mid-filter" hook,
in between SRE-Filter's (optional) pre- and post- filters.
Example:
EXEC ADV_OPTS.CMD Hello from job 1.
In this example, ADV_OPTS.CMD should be in the GoServe working directory.
Note that ADV_OPTS will be sent a set of variables:
ARGUMENT:
The "argument" following the procedure-file name. This may contain
commas (a comma containing ARGUMENT does NOT result in multiple
arguments being sent to the called procedure).
In the above example, ARGUMENT would be "Hello from job 1." (without
the quotes).
SOURCE:
The GoServe "source" line
REQUEST:
The GoServe request line
SEL:
The (SRE-Filter) modified selector
VERBOSE:
The SRE-Filter VERBOSE parameter
SERVERNAME:
The name of the server processing this request (might be an alias)
HOST_NICKNAME:
SRE-Filter "host nickname" for the server processing this request
DATA_DIRECTORY:
The default data directory (might be servername dependent)
HOME_DIRECTORY:
The ~ replacement directory (the "home" directory).
TEMP_DIRECTORY:
The SRE-Filter TEMPDATA_DIR "temporary files" directory
These external procedures MAY issue GoServe completion codes. If they do,
they should return
status_code bytes_sent
(i.e.; 200 15122)
If they do not, they should return a 0.
All other returns are ignored.
Note that ADV_OPTS.CMD contains a simple example of such an external
procedure.
3b) HEADER and RESPONSE directives.
You can include HEADER and RESPONSE entries -- they will be sent almost
verbatim to GoServe
This response header customization is only available for GET and HEAD
requests that invoke a file transferal (including HTML documents
with server side includes).
That is, for "server side processing" requests (such as CGI-BIN
scripts, SRE-Filter add-ons, PUT and DELETE requests, and imagemaps)
HEADER and RESPONSE entries will NOT be used.
As a convenience, SRE-Filter will perform a few substitutions on HEADER
and RESPONSE entries:
$GMT : The current GMT day, date and time.
$SERVERNAME: The "server name" of the server processing this request
$SIZE: The number of bytes to be sent
$CODE: The status code (almost always 200)
Examples:
header add X-Webmaster-Name: Daniel Platypus
header add X-comment: X- headers are created by SRE-Filter
header add X-Our-server: $servername
header add X-Size-1: this is $size size
header add X-Code-1: this is $code code
Notes
* This customization is akin to ICS's "meta information".
* See GOSERVE.DOC for a description of the HEADER and RESPONSE GoServe
directives.
3c) Server Side Include Suppression
Although you can suppress all server side includes (either for all documents,
or on a SEL-specific basis), you may wish to only suppress a select set of
these includes. In particular, you may wish to supress HEADERS and FOOTERS
for a portion of your HTML documents. This can be easily done with
the various server side include suppression options.
The available options are:
ssi_no_cache : suppress caching (similar to a <!-- CACHE NO -->
keyphrase)
ssi_no_header : Do NOT include HEADERS lines
ssi_no_footer : Do NOT include FOOTERS lines
ssi_no_replace : Do NOT process <!-- REPLACE varname --> keyphrases
ssi_no_include : Do NOT process <!-- INCLUDE filename --> keyphrases
ssi_no_option : Do NOT process <!-- OPTION n --> keyphrases
ssi_no_interpret : Do NOT process <!-- INTERPRET FILE filename --> or
<!-- INTERPRET CODE xxx ;yyy --> keyphrases.
ssi_no_select : Do NOT process <!-- SELECT xxx --> ... <!-- SELECT END -->
keyphrases
ssi_no_#filestat : Do NOT process <!-- #FLASTMOD ... --> or <!-- #FSIZE ... -->
keyphrases
ssi_no_#config : Do NOT process <!-- #CONFIG ... --> keyphrases
ssi_no_#echo : Do NOT process <!-- #ECHO ... --> keyphrases
ssi_no_#include : Do NOT process <!-- #INCLUDE ... --> keyphrases
ssi_no_#exec : Do NOT process <!-- #EXEC ... --> keyphrases
Note that these options should appear one-per-line.
Examples:
ssi_no_cache
ssi_no_header
ssi_no_footer
ssi_no_select
ssi_no_#echo
ssi_no_#exec
4) A sample "advanced options file"
The following is a sample of an advanced options file. You might also want
to examine ADV_OPTS.CTL.
;------------- Begin Example ------------
; call the sample external procedure
exec adv_opts.cmd This is an argument , with commas embedded.
;
; add a custom response header
header add X-Webmaster-Name: Timothy Platypus
;
; Suppress headers, footers, and server side "excludes"
ssi_no_header
ssi_no_footer
ssi_no_select
;------------- End Example ------------
---- End of document