RES-Reach and your web server automatically add HTTP header information to your document. If you wish to override their defaults, just insert all the required header information at the beginning of the template file. If you do not want any HTTP headers, enter "No-header" as the first token in your template file.
It is very important that your HTTP headers (or the "No-header" token) are not preceded by anything other than RES-Reach comments or whitespace, and that they are complete and correctly formatted. If you have problems creating your own headers, consult an HTTP reference for assistance.
Examples
Example 1: Redirection
Location: http://www.res.ca/
Content-type:text/html
bye-bye
Example 2: Authentication
<IF VARIABLE="{HTTP_AUTHORIZATION}" OPERATOR="NE" COMPARISON="Basic Z3Vlc3Q6x">
Status:401 Access Denied
WWW-Authenticate: Basic realm="RES-Reach"
Content-type:text/html
If you made it here, then your Web server allows anonymous access or<BR>
has already checked your userID and password.
You tried to log in as {REMOTE_USER}<BR>
Your Base64 encoded password is {HTTP_AUTHORIZATION}<BR>
Try "guest" and no password
</IF>
<IF VARIABLE="{HTTP_AUTHORIZATION}" OPERATOR="EQ" COMPARISON="Basic Z3Vlc3Q6x">
Content-type:text/html
Welcome, {REMOTE_USER}!
</IF>
Example 3: Cookies
<![cookie.nbt]>
<IF VARIABLE=";{HTTP_COOKIE};" OPERATOR="SS" COMPARISON=";{Unknown};;">
Set-cookie: type=ChocolateChip
Content-type:text/html
Expires: Mon, 01 Jul 1996 00:00:00 GMT
<H1>A cookie was sent</H1>
</IF>
<IF VARIABLE=";{HTTP_COOKIE};" OPERATOR="NS" COMPARISON=";{Unknown};;">
<IF VARIABLE="GingerSnap" OPERATOR="SS" COMPARISON="{HTTP_COOKIE}">
Set-cookie: type=vanilla
Content-type:text/html
Expires: Mon, 01 Jul 1996 00:00:00 GMT
</IF>
<IF VARIABLE="GingerSnap" OPERATOR="NS" COMPARISON="{HTTP_COOKIE}">
Set-cookie: type=GingerSnap
Content-type:text/html
Expires: Mon, 01 Jul 1996 00:00:00 GMT
</IF>
<H1>You already had a cookie</H1>
It said: <BR>
{HTTP_COOKIE}<BR>
</IF>
Example 4: Piping RES-Reach Results to an Output File.
SET REQUEST_METHOD=GET SET PATH_INFO=testsuites/res-reach/normal/try
bazar.exe \\res12\pipe\resreach >file1where res12 is the name of the server.