<html>
<head>
<title>Test of Parsed HTML -- No Includes</title>
</head>
<body>

<!--#config errmsg="parse1.shtml -- Unable to parse scripts"  -->

<h1 align=center>Parse1.shtml: Test of Parsed Documents -- no Includes</h1>
<h1 align=center> Server = <!--#echo var="SERVER_SOFTWARE" --> </h1>

<hr size=3 noshade>

<b>Beginning of <i>parse1.shtml</i> ....</b>

<!--#config errmsg="parse1.shtml -- Unable to parse scripts"  -->

<P><code>Parse1.shtml</code> checks SSI elements <code>flastmod</code>, 
<code> fsize</code>, and <code> echo</code>, as well as 
<code>exec cmd=</code> and <code>exec cgi=</code> executions. 
Server-side includes, and execution rules for regular CGI references
are tested elsewhere.
<P>For this test, the error message has been configured as:
"<b>parse1.shtml -- Unable to parse scripts</b>"
<!--#config errmsg="parse1.shtml -- Unable to parse scripts"  -->
<pre>
----------------------------------------------------------------------
<b>(a) Default Time and Size Formats </b>
parse1.shtml last modified (virtual): <!--#flastmod virtual="/vtest/dir1/parse1.shtml"-->
parse1.shtml last modified (file):    <!--#flastmod file="parse1.shtml"-->
Size of parse1.shtml is:              <!--#fsize file="parse1.shtml"  -->
<!--#config sizefmt="bytes" --> <!--#config timefmt="%d/%m/%y" -->
<b>(b) Sizefmt="bytes"; timefmt = %d/%m/%y </b>
parse1.shtml last modified (virtual): <!--#flastmod virtual="/vtest/dir1/parse1.shtml"-->
parse1.shtml last modified (file):    <!--#flastmod file="parse1.shtml"-->
Size of parse1.shtml is:              <!--#fsize file="parse1.shtml"  -->

<b>(c) Test for access <code>file=""</code> (current directory)</b>
"" last modified (file):    <!--#flastmod file=""-->
Size of "" is:              <!--#fsize file=""  -->

<b> ************************************************************************</b>
<b> * NOTE: test (d) and should fail, as SSI Specification disallows       *
 * using <code>..</code> to move up in the directory hierarchy.                      *</b>
<b> ************************************************************************</b>

<b>(d) Test for access <code>file="../tst_dummy.html"</code></b> (still in allowed dirs)
../tst_dummy.html last modified (file):   <!--#flastmod file="../tst_dummy.html"-->
Size of ../tst_dummy.html is:             <!--#fsize file="../tst_dummy.html"  -->


<b>(e) Parse1.shtml Environment Variables (hand-coded echos) </b>
DOCUMENT_NAME:           <!--#echo var="DOCUMENT_NAME"   -->
DOCUMENT_URI:            <!--#echo var="DOCUMENT_URI"   -->
DOCUMENT_PATH_INFO:      <!--#echo var="DOCUMENT_PATH_INFO" -->
DOCUMENT_ROOT:           <!--#echo var="DOCUMENT_ROOT" -->
SCRIPT_FILENAME:         <!--#echo var="SCRIPT_FILENAME" -->
SCRIPT_NAME:             <!--#echo var="SCRIPT_NAME" -->
QUERY_STRING:            <!--#echo var="QUERY_STRING"  -->
QUERY_STRING_UNESCAPED:  <!--#echo var="QUERY_STRING_UNESCAPED"  -->
PATH_INFO:               <!--#echo var="PATH_INFO"  -->
PATH_TRANSLATED:         <!--#echo var="PATH_TRANSLATED"  -->
PATH_LOCAL:              <!--#echo var="PATH_LOCAL" -->
DATE_LOCAL:              <!--#echo var="DATE_LOCAL"   -->
DATE_GMT:                <!--#echo var="DATE_GMT"   -->
LAST_MODIFIED:           <!--#echo var="LAST_MODIFIED" -->
-----
GATEWAY_INTERFACE:       <!--#echo var="GATEWAY_INTERFACE" -->
HTTP_ACCEPT:             <!--#echo var="HTTP_ACCEPT" -->
HTTP_ACCEPT:             <!--#echo var="HTTP_ACCEPT" -->
HTTP_CONNECTION:         <!--#echo var="HTTP_CONNECTION" -->
HTTP_HOST:               <!--#echo var="HTTP_HOST" -->
HTTP_PRAGMA:             <!--#echo var="HTTP_PRAGMA" -->
HTTP_USER_AGENT:         <!--#echo var="HTTP_USER_AGENT" -->
REMOTE_ADDR:             <!--#echo var="REMOTE_ADDR" -->
REMOTE_HOST:             <!--#echo var="REMOTE_HOST" -->
REQUEST_METHOD:          <!--#echo var="REQUEST_METHOD" -->
-----
SERVER_ADMIN:            <!--#echo var="SERVER_ADMIN" -->
SERVER_NAME:             <!--#echo var="SERVER_NAME" -->
SERVER_PORT:             <!--#echo var="SERVER_PORT" -->
SERVER_PROTOCOL:         <!--#echo var="SERVER_PROTOCOL" -->
SERVER_SOFTWARE:         <!--#echo var="SERVER_SOFTWARE" -->
PATH:                    <!--#echo var="PATH" -->
</pre>

<P><b>(f) Within parse1.shtml: Test of exec cmd shell commands </b>
<pre>
<b>(f.1) &lt;!--#exec cmd="echo XXXXX" --> </b> = <!--#exec cmd="echo XXXXX " -->
-------------------------------------------------------------------

<b>(f.2) &lt;!--#exec cmd="env" --> To Give Shell Environment (listed below)</b>

Local shell environment -------------------------------------------
<!--#exec cmd="env" -->
End of local shell environment ------------------------------------

<b>(f.3) &lt;!--#exec cmd="cat /etc/passwd" --> Print Out Dangerous Content
      You Want to Disable this if at all possible!</b>

<!--#exec cmd="cat /etc/passwd" -->
</pre>

<hr size=2 noshade>
<h3><tt> (g) EXEC: /Cgi-bin/ &lt;!--#exec cgi="/cgi-bin/test_script.cgi"> </tt>
</h3>
<!--#exec cgi="/cgi-bin/test_script.cgi" -->


<hr size=2 noshade>
<h3><tt> (h) EXEC Local: &lt;!--#exec cgi="./test_script.cgi"> </tt></h3>
<!--#exec cgi="./test_script.cgi" -->

<hr size=3 noshade>
<b>End of <i>parse1.shtml</i> ....</b>

</body>
</html>
