You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2002/12/18 09:09:46 UTC

cvs commit: tcl-rivet/tests get.rvt get.test post.rvt post.test

davidw      2002/12/18 00:09:46

  Modified:    .        ChangeLog
               doc      rivet.xml
               doc/html commands.html directives.html examples.html
                        help.html index.html installation.html
                        internals.html upgrading.html
               src      TclWebapache.c
               tests    get.rvt get.test post.rvt post.test
  Log:
  * doc/rivet.xml: Noted the var_qs/var_post changes in the
    documentation.
  
  * tests/post.test:
  * tests/post.rvt:
  * tests/get.test:
  * tests/get.rvt: Added tests for David Brancato's var_qs and var_post
    improvements.
  
  * src/TclWebapache.c: Made "ugly" for loops into while loops.  Created
    macro to set up loop parameters correctly.
  
  Revision  Changes    Path
  1.91      +16 -0     tcl-rivet/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/ChangeLog,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- ChangeLog	14 Dec 2002 19:08:25 -0000	1.90
  +++ ChangeLog	18 Dec 2002 08:09:45 -0000	1.91
  @@ -1,3 +1,19 @@
  +2002-12-18  David N. Welton  <da...@dedasys.com>
  +
  +	* doc/rivet.xml: Noted the var_qs/var_post changes in the
  +	documentation.
  +
  +2002-12-17  David N. Welton  <da...@dedasys.com>
  +
  +	* tests/post.test:
  +	* tests/post.rvt:
  +	* tests/get.test:
  +	* tests/get.rvt: Added tests for David Brancato's var_qs and
  +	var_post improvements.
  +
  +	* src/TclWebapache.c: Made "ugly" for loops into while loops.
  +	Created macro to set up loop parameters correctly.
  +
   2002-12-14  David N. Welton  <da...@dedasys.com>
   
   	* src/TclWebapache.c: Redid indendation.
  
  
  
  1.16      +8 -3      tcl-rivet/doc/rivet.xml
  
  Index: rivet.xml
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/rivet.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- rivet.xml	10 Nov 2002 01:14:02 -0000	1.15
  +++ rivet.xml	18 Dec 2002 08:09:45 -0000	1.16
  @@ -495,7 +495,12 @@
   	    The <command>var</command> command retrieves information
   	    about GET or POST variables sent to the script via client
   	    request.  It treats both GET and POST variables the same,
  -	    regardless of their origin.
  +	    regardless of their origin.  Note that there are two
  +	    additional forms of <command>var</command>:
  +	    <command>var_qs</command> and <command>var_post</command>.
  +	    These two restrict the retrieval of information to
  +	    parameters arriving very the querystring
  +	    (?foo=bar&amp;bee=bop) or POSTing, respectively.
   	  </para>
   	  <variablelist>
   	    <varlistentry>
  @@ -580,7 +585,7 @@
   	  </variablelist>
   
   	  <para>
  -	    See the example.
  +	    See the example: <xref linkend="variable_access"/>
   	  </para>
   	</listitem>
         </varlistentry>
  @@ -968,7 +973,7 @@
   
       </example>
   
  -    <example>
  +    <example id="variable_access">
         <title>Variable Access</title>
         <para>
   	Here, we demonstrate how to access variables set by GET or
  
  
  
  1.9       +8 -3      tcl-rivet/doc/html/commands.html
  
  Index: commands.html
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/html/commands.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- commands.html	20 Nov 2002 01:51:52 -0000	1.8
  +++ commands.html	18 Dec 2002 08:09:45 -0000	1.9
  @@ -1,11 +1,16 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  -<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Rivet Tcl Commands and Variables</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="directives.html" title="Rivet Apache Directives"><link rel="next" href="examples.html" title="Examples and Usage"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Tcl Commands and Variables</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="directives.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="examples.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="commands"></a>Rivet Tcl Commands and Variables</h2></div></div><div class="variablelist"><dl><dt><span class="term">
  +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Rivet Tcl Commands and Variables</title><meta name="generator" content="DocBook XSL Stylesheets V1.56.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="directives.html" title="Rivet Apache Directives"><link rel="next" href="examples.html" title="Examples and Usage"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Tcl Commands and Variables</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="directives.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="examples.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="commands"></a>Rivet Tcl Commands and Variables</h2></div></div><div class="variablelist"><dl><dt><span class="term">
   	  <div class="cmdsynopsis" style="width:80%"><span style="background:#bbbbff ; margin:1ex ; padding:.4ex ;  word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var</span>  (<span style="font-family:monospace; text-decoration:underline">get</span> | <span style="font-family:monospace; text-decoration:underline">list</span> | <span style="font-family:monospace; text-decoration:underline">exists</span> | <span style="font-family:monospace; text-decoration:underline">number</span> | <span style="font-family:monospace; text-decoration:underline">all</span>)</span></div>
   	</span></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style=" margin:1ex ; margin-bottom:1.5ex ; padding .5ex">
   	    The <span style="font-family:monospace"><b>var</b></span> command retrieves information
   	    about GET or POST variables sent to the script via client
   	    request.  It treats both GET and POST variables the same,
  -	    regardless of their origin.
  +	    regardless of their origin.  Note that there are two
  +	    additional forms of <span style="font-family:monospace"><b>var</b></span>,
  +	    <span style="font-family:monospace"><b>var_qs</b></span> and <span style="font-family:monospace"><b>var_post</b></span>.
  +	    These two restrict the retrieval of information to
  +	    parameters arriving very the querystring
  +	    (?foo=bar&amp;bee=bop) or POSTing, respectively.
   	  </div><div class="variablelist"><dl><dt><span class="term">
   		<div class="cmdsynopsis" style="width:80%"><span style="background:#bbbbff ; margin:1ex ; padding:.4ex ;  word-spacing:1ex "><span style="font-family:monospace; text-decoration:underline">get</span> <span style="font-family:monospace; text-decoration:underline"><i><tt>varname</tt></i></span> <span style="font-family:monospace; text-decoration:underline"><i><tt>?default?</tt></i></span></span></div>
   	      </span></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style=" margin:1ex ; margin-bottom:1.5ex ; padding .5ex">
  @@ -38,7 +43,7 @@
   	      </span></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style=" margin:1ex ; margin-bottom:1.5ex ; padding .5ex">
   		  Return a list of variable names and values.
   		</div></div></dd></dl></div><div style=" margin:1ex ; margin-bottom:1.5ex ; padding .5ex">
  -	    See the example.
  +	    See the example: <a href="examples.html#variable_access" title="Example�3.�Variable Access">Example�3</a>
   	  </div></div></dd></dl></div><div class="variablelist"><dl><dt><span class="term">
   	  <div class="cmdsynopsis" style="width:80%"><span style="background:#bbbbff ; margin:1ex ; padding:.4ex ;  word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">upload</span>  (<span style="font-family:monospace; text-decoration:underline">channel</span> | <span style="font-family:monospace; text-decoration:underline">save</span> | <span style="font-family:monospace; text-decoration:underline">data</span> | <span style="font-family:monospace; text-decoration:underline">exists</span> | <span style="font-family:monospace; text-decoration:underline">size</span> | <span style="font-family:monospace; text-decoration:underline">type</span> | <span style="font-family:monospace; text-decoration:underline">filename</span>)</span></div>
   	</span></dt><dd><div style="padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style=" margin:1ex ; margin-bottom:1.5ex ; padding .5ex">The upload command is for file upload manipulation.
  
  
  
  1.9       +1 -1      tcl-rivet/doc/html/directives.html
  
  Index: directives.html
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/html/directives.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- directives.html	23 Oct 2002 18:42:28 -0000	1.8
  +++ directives.html	18 Dec 2002 08:09:45 -0000	1.9
  @@ -1,5 +1,5 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  -<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Rivet Apache Directives</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="installation.html" title="Apache Rivet Installation"><link rel="next" href="commands.html" title="Rivet Tcl Commands and Variables"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Apache Directives</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="installation.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="commands.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="directives"></a>Rivet Apache Directives</h2></div></div><p style="width:90%">
  +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Rivet Apache Directives</title><meta name="generator" content="DocBook XSL Stylesheets V1.56.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="installation.html" title="Apache Rivet Installation"><link rel="next" href="commands.html" title="Rivet Tcl Commands and Variables"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Apache Directives</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="installation.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="commands.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="directives"></a>Rivet Apache Directives</h2></div></div><p style="width:90%">
         These directives are used within the Apache httpd server
         configuration files to modify Apache Rivet's behaviour.
       </p><div class="variablelist"><dl><dt><span class="term">
  
  
  
  1.8       +5 -5      tcl-rivet/doc/html/examples.html
  
  Index: examples.html
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/html/examples.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- examples.html	20 Nov 2002 01:51:52 -0000	1.7
  +++ examples.html	18 Dec 2002 08:09:45 -0000	1.8
  @@ -1,10 +1,10 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  -<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Examples and Usage</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="next" href="help.html" title="Resources - How to Get Help"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Examples and Usage</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="commands.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="help.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="examples"></a>Examples and Usage</h2></div></div><p style="width:90%">
  +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Examples and Usage</title><meta name="generator" content="DocBook XSL Stylesheets V1.56.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="next" href="help.html" title="Resources - How to Get Help"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Examples and Usage</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="commands.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="help.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="examples"></a>Examples and Usage</h2></div></div><p style="width:90%">
         Some examples of Rivet usage follow.  Some prior Tcl knowledge
         is assumed.  If you don't know much Tcl, don't worry, it's easy,
         and there are some good resources available on the web that will
         get you up to speed quickly.  Go to the <a href="help.html#websites" title="Web Sites">web sites</a> section and have a look.
  -    </p><div class="example"><a name="hello world"></a><p class="title"><b>Example 1. Hello World</b></p><p style="width:90%">
  +    </p><div class="example"><a name="hello world"></a><p class="title"><b>Example�1.�Hello World</b></p><p style="width:90%">
   	As with any tool, it's always nice to see something work, so
   	let's create a small &quot;Hello World&quot; page.</p><p style="width:90%">
   	Assuming you have Apache configured correctly, create a file
  @@ -17,7 +17,7 @@
   	If you then access it with your browser, you should see a
   	blank page with the text &quot;Hello World&quot; (without the quotes) on
   	it.
  -      </p></div><div class="example"><a name="table"></a><p class="title"><b>Example 2. Generate a Table</b></p><p style="width:90%">
  +      </p></div><div class="example"><a name="table"></a><p class="title"><b>Example�2.�Generate a Table</b></p><p style="width:90%">
   	In another simple example, we dynamically generate a table:
         </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ;      padding: 1ex; border: solid black 1px ; white-space: pre;      font-family:monospace ; " class="programlisting">&lt;? puts &quot;&lt;table&gt;\n&quot;
   for {set i 1} { $i &lt;= 8 } {incr i} {
  @@ -36,7 +36,7 @@
   	would generate the same HTML!
         </p><p style="width:90%">
   	The result should look something like this:
  -      </p><p><img src="table.png"></p></div><div class="example"><p class="title"><b>Example 3. Variable Access</b></p><p style="width:90%">
  +      </p><div><img src="table.png"></div></div><div class="example"><a name="variable_access"></a><p class="title"><b>Example�3.�Variable Access</b></p><p style="width:90%">
   	Here, we demonstrate how to access variables set by GET or
   	POST operations.
         </p><p style="width:90%">
  @@ -115,7 +115,7 @@
   	The script then checks to make sure that
   	<tt>errlist</tt> is empty (printing an error if it
   	is) and outputting a thankyou message.
  -      </p></div><div class="example"><a name="upload"></a><p class="title"><b>Example 4. File Upload</b></p><p style="width:90%">
  +      </p></div><div class="example"><a name="upload"></a><p class="title"><b>Example�4.�File Upload</b></p><p style="width:90%">
   	The following HTML in one file, say,
   	<tt>upload.html</tt>
         </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ;      padding: 1ex; border: solid black 1px ; white-space: pre;      font-family:monospace ; " class="programlisting">&lt;form action=&quot;foo.ttml&quot; enctype=&quot;multipart/form-data&quot;
  
  
  
  1.9       +2 -2      tcl-rivet/doc/html/help.html
  
  Index: help.html
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/html/help.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- help.html	20 Nov 2002 01:51:52 -0000	1.8
  +++ help.html	18 Dec 2002 08:09:45 -0000	1.9
  @@ -1,5 +1,5 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  -<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Resources - How to Get Help</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="examples.html" title="Examples and Usage"><link rel="next" href="internals.html" title="Rivet Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Resources - How to Get Help</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="examples.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="help"></a>Resources - How to Get Help</h2></div></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5347754"></a>Mailing Lists</h3></div></div><p style="width:90%">
  +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Resources - How to Get Help</title><meta name="generator" content="DocBook XSL Stylesheets V1.56.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="examples.html" title="Examples and Usage"><link rel="next" href="internals.html" title="Rivet Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Resources - How to Get Help</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="examples.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="help"></a>Resources - How to Get Help</h2></div></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5381098"></a>Mailing Lists</h3></div></div><p style="width:90%">
   	The Rivet mailing list is the first place you should turn for
   	help, if you haven't found the solution to your problem in the
   	documentation.  Send email to
  @@ -27,7 +27,7 @@
   	  </div></li><li><div style=" margin:1ex ; margin-bottom:1.5ex ; padding .5ex">
   	    <a href="http://wiki.tcl.tk" target="_top">http://wiki.tcl.tk</a> is the Tcl'ers Wiki, a
   	    free-form place to search for answers and ask for help.
  -	  </div></li></ul></div></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5347906"></a>Bug Tracking System</h3></div></div><p style="width:90%">
  +	  </div></li></ul></div></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5380991"></a>Bug Tracking System</h3></div></div><p style="width:90%">
   	Apache Rivet uses the Apache Bug Tracking system at <a href="http://nagoya.apache.org/bugzilla/" target="_top">http://nagoya.apache.org/bugzilla/</a>.  Here,
   	you can report problems, or check and see if existing issues
   	are already known and being dealt with.
  
  
  
  1.9       +5 -5      tcl-rivet/doc/html/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/html/index.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- index.html	20 Nov 2002 01:51:52 -0000	1.8
  +++ index.html	18 Dec 2002 08:09:45 -0000	1.9
  @@ -1,9 +1,9 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  -<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Apache Rivet</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="next" href="installation.html" title="Apache Rivet Installation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Apache Rivet</th></tr><tr><td width="20%" align="left">�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="installation.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h1 class="title"><a name="id5343357"></a>Apache Rivet</h1></div><div><div class="author"><h3 class="author">David Welton</h3><div class="affiliation"><div class="address"><p>
  -	  <tt>&lt;<a href="mailto:davidw@apache.org">davidw@apache.org</a>&gt;</tt>
  -	</p></div></div></div></div><div><div class="author"><h3 class="author">Damon Courtney</h3><div class="affiliation"><div class="address"><p>
  -	  <tt>&lt;<a href="mailto:damonc@apache.org">damonc@apache.org</a>&gt;</tt>
  -	</p></div></div></div></div><div><p class="copyright">Copyright � 2002 Apache Software Foundation</p></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="index.html#id5342961">Introduction to Apache Rivet</a></dt><dt><a href="installation.html">Apache Rivet Installation</a></dt><dt><a href="directives.html">Rivet Apache Directives</a></dt><dt><a href="commands.html">Rivet Tcl Commands and Variables</a></dt><dt><a href="examples.html">Examples and Usage</a></dt><dt><a href="help.html">Resources - How to Get Help</a></dt><dd><dl><dt><a href="help.html#id5347754">Mailing Lists</a></dt><dt><a href="help.html#websites">Web Sites</a></dt><dt><a href="help.html#id5347906">Bug Tracking System</a></dt></dl></dd><dt><a href="internals.html">Rivet Internals</a></dt><dd><dl><dt><a href="internals.html#id5347956">Initialization</a></dt><dt><a href="internals.html#id5347992">RivetChan</a></dt><dt><a href="internals.html#id5348021">Page Parsing, Execution and Cacheing</a></dt></dl></dd><dt><a href="upgrading.html">Upgrading from mod_dtcl or NeoWebScript</a></dt><dd><dl><dt><a href="upgrading.html#id5348093">mod_dtcl</a></dt><dt><a href="upgrading.html#id5347507">NeoWebScript</a></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="id5342961"></a>Introduction to Apache Rivet</h2></div></div><p style="width:90%">
  +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Apache Rivet</title><meta name="generator" content="DocBook XSL Stylesheets V1.56.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="next" href="installation.html" title="Apache Rivet Installation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Apache Rivet</th></tr><tr><td width="20%" align="left">�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="installation.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h1 class="title"><a name="id5375470"></a>Apache Rivet</h1></div><div><div class="author"><h3 class="author">David Welton</h3><div class="affiliation"><div class="address"><p><br>
  +	��<tt>&lt;<a href="mailto:davidw@apache.org">davidw@apache.org</a>&gt;</tt><br>
  +	</p></div></div></div></div><div><div class="author"><h3 class="author">Damon Courtney</h3><div class="affiliation"><div class="address"><p><br>
  +	��<tt>&lt;<a href="mailto:damonc@apache.org">damonc@apache.org</a>&gt;</tt><br>
  +	</p></div></div></div></div><div><p class="copyright">Copyright � 2002 Apache Software Foundation</p></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="index.html#id5375538">Introduction to Apache Rivet</a></dt><dt><a href="installation.html">Apache Rivet Installation</a></dt><dt><a href="directives.html">Rivet Apache Directives</a></dt><dt><a href="commands.html">Rivet Tcl Commands and Variables</a></dt><dt><a href="examples.html">Examples and Usage</a></dt><dt><a href="help.html">Resources - How to Get Help</a></dt><dd><dl><dt><a href="help.html#id5381098">Mailing Lists</a></dt><dt><a href="help.html#websites">Web Sites</a></dt><dt><a href="help.html#id5380991">Bug Tracking System</a></dt></dl></dd><dt><a href="internals.html">Rivet Internals</a></dt><dd><dl><dt><a href="internals.html#id5381032">Initialization</a></dt><dt><a href="internals.html#id5381068">RivetChan</a></dt><dt><a href="internals.html#id5380037">Page Parsing, Execution and Cacheing</a></dt></dl></dd><dt><a href="upgrading.html">Upgrading from mod_dtcl or NeoWebScript</a></dt><dd><dl><dt><a href="upgrading.html#id5380114">mod_dtcl</a></dt><dt><a href="upgrading.html#id5380130">NeoWebScript</a></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="id5375538"></a>Introduction to Apache Rivet</h2></div></div><p style="width:90%">
         Apache Rivet is a system for creating dynamic web content via a
         programming language integrated with Apache Web Server.  It is
         designed to be fast, powerful and extensible, consume few system
  
  
  
  1.8       +4 -4      tcl-rivet/doc/html/installation.html
  
  Index: installation.html
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/html/installation.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- installation.html	23 Oct 2002 18:42:28 -0000	1.7
  +++ installation.html	18 Dec 2002 08:09:45 -0000	1.8
  @@ -1,5 +1,5 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  -<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Apache Rivet Installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="index.html" title="Apache Rivet"><link rel="next" href="directives.html" title="Rivet Apache Directives"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Apache Rivet Installation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="directives.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="installation"></a>Apache Rivet Installation</h2></div></div><div class="procedure"><ol type="1"><li><p class="title"><b>Check Dependencies</b></p><p style="width:90%">
  +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Apache Rivet Installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.56.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="index.html" title="Apache Rivet"><link rel="next" href="directives.html" title="Rivet Apache Directives"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Apache Rivet Installation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="directives.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="installation"></a>Apache Rivet Installation</h2></div></div><div class="procedure"><ol type="1"><li><p class="title"><b>Check Dependencies</b></p><p style="width:90%">
   	  To install Rivet, you will need Tcl 8.2 or greater and
   	  Apache 1.3.xx.  It is known to run on Linux, FreeBSD,
   	  OpenBSD, and Solaris and HPUX.  Windows NT is also possible
  @@ -21,8 +21,8 @@
   	  You must uncompress the Rivet sources in the directory where you
   	  wish to compile them.
   
  -	  <pre style="background:#bbffbb ; width:90ex ; margin: 2ex ;      padding: 1ex; border: solid black 1px ; white-space: pre;      font-family:monospace ; " class="programlisting">gunzip tcl-rivet-X.X.X.tar.gz
  -tar -xvf tcl-rivet-X.X.X.tar.gz</pre>
  +	  </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ;      padding: 1ex; border: solid black 1px ; white-space: pre;      font-family:monospace ; " class="programlisting">gunzip tcl-rivet-X.X.X.tar.gz
  +tar -xvf tcl-rivet-X.X.X.tar.gz</pre><p style="width:90%">
   
   	</p></li><li><p class="title"><b>Building Rivet</b></p><p style="width:90%">
   	  Rivet uses a unique build system which we created especially
  @@ -63,5 +63,5 @@
   	  extensions as Rivet files.
   	</p><p style="width:90%">
   	  For other directives that Rivet provides for Apache
  -	  configuration, please see <a href="directives.html#directives" title="Rivet Apache Directives">the section called &#8220;Rivet Apache Directives&#8221;</a>.
  +	  configuration, please see <a href="directives.html" title="Rivet Apache Directives">the section called &#8220;Rivet Apache Directives&#8221;</a>.
   	</p></li></ol></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="directives.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Apache Rivet�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Rivet Apache Directives</td></tr></table></div></body></html>
  
  
  
  1.9       +4 -4      tcl-rivet/doc/html/internals.html
  
  Index: internals.html
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/html/internals.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- internals.html	20 Nov 2002 01:51:52 -0000	1.8
  +++ internals.html	18 Dec 2002 08:09:45 -0000	1.9
  @@ -1,10 +1,10 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  -<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Rivet Internals</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="help.html" title="Resources - How to Get Help"><link rel="next" href="upgrading.html" title="Upgrading from mod_dtcl or NeoWebScript"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="help.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="upgrading.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="internals"></a>Rivet Internals</h2></div></div><p style="width:90%">
  +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Rivet Internals</title><meta name="generator" content="DocBook XSL Stylesheets V1.56.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="help.html" title="Resources - How to Get Help"><link rel="next" href="upgrading.html" title="Upgrading from mod_dtcl or NeoWebScript"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="help.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="upgrading.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="internals"></a>Rivet Internals</h2></div></div><p style="width:90%">
         This section easily falls out of date, as new code is added, old
         code is removed, and changes are made.  The best place to look
         is the source code itself.  If you are interested in the changes
         themselves FIXME.
  -    </p><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5347956"></a>Initialization</h3></div></div><p style="width:90%">
  +    </p><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5381032"></a>Initialization</h3></div></div><p style="width:90%">
   	When Apache is started, (or when child Apache processes are
   	started if a threaded Tcl is used),
   	<tt>Rivet_InitTclStuff</tt> is called, which
  @@ -15,7 +15,7 @@
   	executes Rivet's <tt>init.tcl</tt>.  The caching
   	system is also set up, and if there is a
   	<span style="font-family:monospace"><b>GlobalInitScript</b></span>, it is run.
  -      </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5347992"></a>RivetChan</h3></div></div><p style="width:90%">
  +      </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5381068"></a>RivetChan</h3></div></div><p style="width:90%">
   	The RivetChan system was created in
   	order to have an actual Tcl channel that we could redirect
   	standard output to.  This lets us use, for instance, the
  @@ -25,7 +25,7 @@
   	Tcl's regular standard output is replaced with an instance of
   	this channel type, so that, by default, output will go to the
   	web page.
  -      </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5348021"></a>Page Parsing, Execution and Cacheing</h3></div></div><p style="width:90%">
  +      </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5380037"></a>Page Parsing, Execution and Cacheing</h3></div></div><p style="width:90%">
   	When a Rivet page is requested, it is transformed into an
   	ordinary Tcl script by parsing the file for the &lt;? ?&gt;
   	processing instruction tags.  Everything outside these tags
  
  
  
  1.9       +3 -3      tcl-rivet/doc/html/upgrading.html
  
  Index: upgrading.html
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/doc/html/upgrading.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- upgrading.html	20 Nov 2002 01:51:52 -0000	1.8
  +++ upgrading.html	18 Dec 2002 08:09:45 -0000	1.9
  @@ -1,13 +1,13 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  -<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Upgrading from mod_dtcl or NeoWebScript</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="internals.html" title="Rivet Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Upgrading from mod_dtcl or NeoWebScript</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�</td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="upgrading"></a>Upgrading from mod_dtcl or NeoWebScript</h2></div></div><p style="width:90%">
  +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Upgrading from mod_dtcl or NeoWebScript</title><meta name="generator" content="DocBook XSL Stylesheets V1.56.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="internals.html" title="Rivet Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Upgrading from mod_dtcl or NeoWebScript</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�</td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="upgrading"></a>Upgrading from mod_dtcl or NeoWebScript</h2></div></div><p style="width:90%">
         Rivet is a break from the past, in that we, the authors, have
         attempted to take what we like best about our past efforts, and
         leave out or change things we no longer care for.  Backwards
         compatibility was not a primary goal when creating Rivet, but we
         do provide this information which may be of use to those wishing
         to upgrade from mod_dtcl or NWS installations.
  -    </p><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5348093"></a>mod_dtcl</h3></div></div><p style="width:90%">
  +    </p><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5380114"></a>mod_dtcl</h3></div></div><p style="width:90%">
   	Rivet was originally based on the dtcl code, but it has
   	changed (improved!) quite a bit.  The concepts remain the
   	same, but many of the commands have changed.
  -      </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5347507"></a>NeoWebScript</h3></div></div><p style="width:90%">TODO</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">�</td></tr><tr><td width="40%" align="left" valign="top">Rivet Internals�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�</td></tr></table></div></body></html>
  +      </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5380130"></a>NeoWebScript</h3></div></div><p style="width:90%">TODO</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">�</td></tr><tr><td width="40%" align="left" valign="top">Rivet Internals�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�</td></tr></table></div></body></html>
  
  
  
  1.40      +23 -48    tcl-rivet/src/TclWebapache.c
  
  Index: TclWebapache.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/TclWebapache.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- TclWebapache.c	14 Dec 2002 19:08:25 -0000	1.39
  +++ TclWebapache.c	18 Dec 2002 08:09:45 -0000	1.40
  @@ -22,6 +22,12 @@
   
   #define BUFSZ 4096
   
  +/* This is used below to determine what part of the parmsarray to
  + * parse. */
  +#define PARMSARRAY_COORDINATES i = 0; j = parmsarray->nelts; \
  +if (source == VAR_SRC_QUERYSTRING) { j = req->apachereq->nargs; } \
  +else if (source == VAR_SRC_POST) { i = req->apachereq->nargs; }
  +
   int
   TclWeb_InitRequest(TclWebRequest *req, Tcl_Interp *interp, void *arg)
   {
  @@ -141,18 +147,10 @@
       table_entry *parms = (table_entry *)parmsarray->elts;
       int flag = 0;
   
  -    /* determine which part of table to traverse */
  -    if (source == VAR_SRC_QUERYSTRING) {
  -	i = 0; j = req->apachereq->nargs;
  -    } else if (source == VAR_SRC_POST) {
  -	i = req->apachereq->nargs; j = parmsarray->nelts;
  -    } else {
  -	i = 0; j = parmsarray->nelts;
  -    }
  +    PARMSARRAY_COORDINATES;
   
  -    /* This isn't real efficient - move to hash table later
  -       on... */
  -    for (; i < j; ++i)
  +    /* This isn't real efficient - move to hash table later on... */
  +    while (i < j)
       {
   	char *parmkey = TclWeb_StringToUtf(parms[i].key, req);
   	if (!strncmp(varname, parmkey,
  @@ -175,6 +173,7 @@
   		Tcl_SetStringObj(result, Tcl_GetString(tmpobj), -1);
   	    }
   	}
  +	i++;
       }
   
       if (result->length == 0)
  @@ -192,17 +191,10 @@
       array_header *parmsarray = ap_table_elts(req->apachereq->parms);
       table_entry *parms = (table_entry *)parmsarray->elts;
   
  -    /* determine which part of table to traverse */
  -    if (source == VAR_SRC_QUERYSTRING) {
  -	i = 0; j = req->apachereq->nargs;
  -    } else if (source == VAR_SRC_POST) {
  -	i = req->apachereq->nargs; j = parmsarray->nelts;
  -    } else {
  -	i = 0; j = parmsarray->nelts;
  -    }
  +    PARMSARRAY_COORDINATES;
   
       /* This isn't real efficient - move to hash table later on. */
  -    for (; i < j; ++i)
  +    while (i < j)
       {
   
   	if (!strncmp(varname, TclWeb_StringToUtf(parms[i].key, req),
  @@ -212,6 +204,7 @@
   	    Tcl_ListObjAppendElement(req->interp, result,
   				     TclWeb_StringToUtfToObj(parms[i].val, req));
   	}
  +	i++;
       }
   
       if (result == NULL)
  @@ -228,21 +221,15 @@
       array_header *parmsarray = ap_table_elts(req->apachereq->parms);
       table_entry *parms = (table_entry *)parmsarray->elts;
   
  -    /* determine which part of table to traverse */
  -    if (source == VAR_SRC_QUERYSTRING) {
  -	i = 0; j = req->apachereq->nargs;
  -    } else if (source == VAR_SRC_POST) {
  -	i = req->apachereq->nargs; j = parmsarray->nelts;
  -    } else {
  -	i = 0; j = parmsarray->nelts;
  -    }
  +    PARMSARRAY_COORDINATES;
   
  -    for (; i < j; ++i)
  +    while (i < j)
       {
   	Tcl_ListObjAppendElement(req->interp, result,
   				 TclWeb_StringToUtfToObj(parms[i].key, req));
   	Tcl_ListObjAppendElement(req->interp, result,
   				 TclWeb_StringToUtfToObj(parms[i].val, req));
  +	i++;
       }
   
       if (result == NULL)
  @@ -259,19 +246,13 @@
       array_header *parmsarray = ap_table_elts(req->apachereq->parms);
       table_entry *parms = (table_entry *)parmsarray->elts;
   
  -    /* determine which part of table to traverse */
  -    if (source == VAR_SRC_QUERYSTRING) {
  -	i = 0; j = req->apachereq->nargs;
  -    } else if (source == VAR_SRC_POST) {
  -	i = req->apachereq->nargs; j = parmsarray->nelts;
  -    } else {
  -	i = 0; j = parmsarray->nelts;
  -    }
  +    PARMSARRAY_COORDINATES;
   
  -    for (; i < j; ++i)
  +    while (i < j)
       {
   	Tcl_ListObjAppendElement(req->interp, result,
   				 TclWeb_StringToUtfToObj(parms[i].key, req));
  +	i++;
       }
   
       if (result == NULL)
  @@ -289,17 +270,10 @@
       array_header *parmsarray = ap_table_elts(req->apachereq->parms);
       table_entry *parms = (table_entry *)parmsarray->elts;
   
  -    /* determine which part of table to traverse */
  -    if (source == VAR_SRC_QUERYSTRING) {
  -	i = 0; j = req->apachereq->nargs;
  -    } else if (source == VAR_SRC_POST) {
  -	i = req->apachereq->nargs; j = parmsarray->nelts;
  -    } else {
  -	i = 0; j = parmsarray->nelts;
  -    }
  +    PARMSARRAY_COORDINATES;
   
       /* This isn't real efficient - move to hash table later on. */
  -    for (; i < j; ++i)
  +    while (i < j)
       {
   	if (!strncmp(varname, TclWeb_StringToUtf(parms[i].key, req),
   		     strlen(varname) < strlen(parms[i].key) ?
  @@ -308,6 +282,7 @@
   	    Tcl_SetIntObj(result, 1);
   	    return TCL_OK;
   	}
  +	i++;
       }
       Tcl_SetIntObj(result, 0);
       return TCL_OK;
  
  
  
  1.5       +2 -0      tcl-rivet/tests/get.rvt
  
  Index: get.rvt
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/tests/get.rvt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- get.rvt	5 Nov 2002 01:13:24 -0000	1.4
  +++ get.rvt	18 Dec 2002 08:09:45 -0000	1.5
  @@ -3,9 +3,11 @@
   if { [var number] > 0 } {
       if { [var exists foobar] } {
   	puts "\[var get foobar\] = [var get foobar]\n"
  +	puts "\[var_qs get foobar\] = [var_qs get foobar]\n"
       }
       if { [var exists xst] } {
   	puts "\[var exists xst\]\[var exists noxst\] = [var exists xst] [var exists noxst]\n"
  +	puts "\[var_qs exists xst\]\[var_qs exists noxst\] = [var_qs exists xst] [var_qs exists noxst]\n"
       }
       if { [var exists M�s] } {
   	puts "\[var get M�s\] = [var get M�s]\n"
  
  
  
  1.6       +14 -2     tcl-rivet/tests/get.test
  
  Index: get.test
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/tests/get.test,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- get.test	5 Nov 2002 01:13:24 -0000	1.5
  +++ get.test	18 Dec 2002 08:09:45 -0000	1.6
  @@ -18,12 +18,18 @@
       set match
   } {[var get xst] = }
   
  -::tcltest::test getvariables-1.3 {GET variables - default value} {
  +::tcltest::test getvariables-1.4 {GET variables - default value} {
       set page [ ::http::geturl "${urlbase}get.rvt?defaulttest=1" ]
       regexp {^\[var get xst foo\] = foo} [ ::http::data $page ] match
       set match
   } {[var get xst foo] = foo}
   
  +::tcltest::test getvariables-1.5 {GET variables - var_qs exists} {
  +    set page [ ::http::geturl "${urlbase}get.rvt?xst=1" ]
  +    regexp -line {\[var_qs exists xst\]\[var_qs exists noxst\] = 1 0$} [ ::http::data $page ] match
  +    set match
  +} {[var_qs exists xst][var_qs exists noxst] = 1 0}
  +
   ::tcltest::test getvariables-2.1 {GET variables + I18N} {
       set page [ ::http::geturl "${urlbase}get.rvt?M�s=T�" ]
       regexp -line {^\[var get M�s\] = T�$} [ ::http::data $page ] match
  @@ -47,3 +53,9 @@
       regexp -line {\[var list lstvar2\] = a b {c d}$} [ ::http::data $page ] match
       set match
   } {[var list lstvar2] = a b {c d}}
  +
  +::tcltest::test getvariables-4.1 {var_qs} {
  +    set page [ ::http::geturl "${urlbase}get.rvt?foobar=goober" ]
  +    regexp -line {\[var_qs get foobar\] = goober$} [ ::http::data $page ] match
  +    set match
  +} {[var_qs get foobar] = goober}
  
  
  
  1.3       +1 -0      tcl-rivet/tests/post.rvt
  
  Index: post.rvt
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/tests/post.rvt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- post.rvt	22 Jan 2002 20:58:48 -0000	1.2
  +++ post.rvt	18 Dec 2002 08:09:45 -0000	1.3
  @@ -4,6 +4,7 @@
       # get/post variables 1.1
       if { [ var exists foobar ] } {
   	puts "\[var get foobar\] = [var get foobar]\n"
  +	puts "\[var_post get foobar\] = [var_post get foobar]\n"
       }
       # get/post variables 1.{2,3}
       if { [ var exists M�s ] } {
  
  
  
  1.4       +7 -1      tcl-rivet/tests/post.test
  
  Index: post.test
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/tests/post.test,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- post.test	22 Jan 2002 20:58:48 -0000	1.3
  +++ post.test	18 Dec 2002 08:09:45 -0000	1.4
  @@ -31,3 +31,9 @@
       regexp -line {\[var list lstvar2\] = a b {c d}$} [ ::http::data $page ] match
       set match
   } {[var list lstvar2] = a b {c d}}
  +
  +::tcltest::test postvariables-4.1 {var_post} {
  +    set page [ ::http::geturl "${urlbase}$testfilename1" -query foobar=goober ]
  +    regexp -line {^\[var_post get foobar\] = goober$} [ ::http::data $page ] match
  +    set match
  +} {[var_post get foobar] = goober}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org