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 mx...@apache.org on 2011/02/08 01:37:23 UTC

svn commit: r1068238 [1/2] - in /tcl/rivet/branches/rivet-namespace: ./ doc/ doc/xml/ rivet/ rivet/rivet-tcl/ src/ src/apache-2/

Author: mxmanghi
Date: Tue Feb  8 00:37:22 2011
New Revision: 1068238

URL: http://svn.apache.org/viewvc?rev=1068238&view=rev
Log:
2011-02-03 Massimo Manghi <mx...@apache.org>
    * branches/rivet-namespace: new branch to experiment with the Rivet namespace and Rivet package 
    * src/rivetPkgInit.c: Provides RivetLib package now when loaded by mod_rivet. Commands are now
    in the ::Rivet namespace
    * src/rivet.h: new macro RIVET_OBJ_CMD creates a command in the ::Rivet namespace
    and puts the command object on the namespace export list
    * src/apache-2/mod_rivet.h: the globals structure now holds a pointer to the Tcl_Namespace object
    representing ::Rivet namespace
    * src/apache-2/rivetCore.c: commands are now created with the RIVET_OBJ_CMD macro 
    * rivet/init.tcl: provides package RivetTcl 2.1. This makes possible to consistently peek the 
    init.tcl associated to the module. Command 'incr0' is now aliased by Tcl standard 'incr'
    * rivet/apache-2/mod_rivet.c: Rivet_PerInterpInit loads package RivetTcl 2.1 and package RivetLib 1.2.
    the latter ships the commands in rivetWWW.c rivetCrypt.c and rivetList.c
    * rivet/rivet-tcl/tclIndex: Command 'incr0' removed (see init.tcl)



Modified:
    tcl/rivet/branches/rivet-namespace/   (props changed)
    tcl/rivet/branches/rivet-namespace/ChangeLog
    tcl/rivet/branches/rivet-namespace/INSTALL
    tcl/rivet/branches/rivet-namespace/Makefile.in
    tcl/rivet/branches/rivet-namespace/VERSION
    tcl/rivet/branches/rivet-namespace/configure.ac
    tcl/rivet/branches/rivet-namespace/doc/rivet.xml
    tcl/rivet/branches/rivet-namespace/doc/xml/commands.xml
    tcl/rivet/branches/rivet-namespace/doc/xml/install.xml
    tcl/rivet/branches/rivet-namespace/doc/xml/intro.xml
    tcl/rivet/branches/rivet-namespace/rivet/init.tcl
    tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/tclIndex
    tcl/rivet/branches/rivet-namespace/src/Makefile.am
    tcl/rivet/branches/rivet-namespace/src/apache-2/apache_request.c
    tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c
    tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.h
    tcl/rivet/branches/rivet-namespace/src/apache-2/rivetCore.c
    tcl/rivet/branches/rivet-namespace/src/rivet.h   (contents, props changed)
    tcl/rivet/branches/rivet-namespace/src/rivetCrypt.c
    tcl/rivet/branches/rivet-namespace/src/rivetList.c
    tcl/rivet/branches/rivet-namespace/src/rivetPkgInit.c
    tcl/rivet/branches/rivet-namespace/src/rivetWWW.c

Propchange: tcl/rivet/branches/rivet-namespace/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  8 00:37:22 2011
@@ -1,2 +1,3 @@
 /tcl/rivet/branches/2_0:939332-1027850
 /tcl/rivet/branches/master-interp:1062190-1065801
+/tcl/rivet/trunk:1065843-1068235

Modified: tcl/rivet/branches/rivet-namespace/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/ChangeLog?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/ChangeLog (original)
+++ tcl/rivet/branches/rivet-namespace/ChangeLog Tue Feb  8 00:37:22 2011
@@ -1,3 +1,18 @@
+2011-02-03 Massimo Manghi <mx...@apache.org>
+    * branches/rivet-namespace: new branch to experiment with the Rivet namespace and Rivet package 
+    * src/rivetPkgInit.c: Provides RivetLib package now when loaded by mod_rivet. Commands are now
+    in the ::Rivet namespace
+    * src/rivet.h: new macro RIVET_OBJ_CMD creates a command in the ::Rivet namespace
+    and puts the command object on the namespace export list
+    * src/apache-2/mod_rivet.h: the globals structure now holds a pointer to the Tcl_Namespace object
+    representing ::Rivet namespace
+    * src/apache-2/rivetCore.c: commands are now created with the RIVET_OBJ_CMD macro 
+    * rivet/init.tcl: provides package RivetTcl 2.1. This makes possible to consistently peek the 
+    init.tcl associated to the module. Command 'incr0' is now aliased by Tcl standard 'incr'
+    * rivet/apache-2/mod_rivet.c: Rivet_PerInterpInit loads package RivetTcl 2.1 and package RivetLib 1.2.
+    the latter ships the commands in rivetWWW.c rivetCrypt.c and rivetList.c
+    * rivet/rivet-tcl/tclIndex: Command 'incr0' removed (see init.tcl)
+
 2011-01-31 Massimo Manghi <mx...@apache.org>
     * configure.ac: default value for directive SeparateVirtualInterps changed to 'yes'.
     * VERSION: version number set as 2.1.0r1 ('r' is for 'revision')

Modified: tcl/rivet/branches/rivet-namespace/INSTALL
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/INSTALL?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/INSTALL (original)
+++ tcl/rivet/branches/rivet-namespace/INSTALL Tue Feb  8 00:37:22 2011
@@ -1,4 +1,4 @@
-			  Rivet 2.0 Installation
+			  Rivet 2.1 Installation
 			  ======================
 
 For more detailed instructions, see the docs/html/ directory.
@@ -36,24 +36,24 @@ if your configuration doesn't require yo
 Along with the usual 'configure' variables Rivet's configure script 
 handles other specific options. 
 
---with-tcl=DIR			Directory where tclConfig.sh is
-				stored. This is a shell script that
-				defines all the relevant symbols needed
-				to build Tcl related applications.
---with-apache-version=VER	Values are 1 or 2 depending
-				on the apache server you're 
-				builing the module for.
---with-apache=DIR		Apache server's root directory.
---with-apxs=FILE		Path to the apxs program to
-				be used in the compilation
-				process.
---with-apache-include=DIR	Apache's include files path.
---with-apr-config=FILE		Apache Portable Runtime 
-				metainformation program
+--with-tcl=DIR              Directory where tclConfig.sh is
+                            stored. This is a shell script that
+				            defines all the relevant symbols needed
+				            to build Tcl related applications.
+--with-apache-version=VER   Values are 1 or 2 depending
+				            on the apache server you're 
+                            builing the module for.
+--with-apache=DIR           Apache server's root directory.
+--with-apxs=FILE            Path to the apxs program to
+                            be used in the compilation
+                            process.
+--with-apache-include=DIR   Apache's include files path.
+--with-apr-config=FILE      Apache Portable Runtime 
+                            metainformation program
 --with-rivet-target-dir=DIR	Rivet library installation directory.
---enable-version-display	Apache signature shows Rivet 
-				version number in the form Rivet/2.0.x. 
-				Default=no
+--enable-version-display    Apache signature shows Rivet 
+                            version number in the form Rivet/2.0.x. 
+                            Default=no
 
 These are the basic Apache configuration directives that are needed:
 
@@ -74,7 +74,7 @@ located. E.g.: on a Debian system apxs f
 
 ./configure --with-apache-include=/usr/include/apr-1.0 		\
 	    --with-apache-version=2 --with-apxs=/usr/bin/apxs2 	\
-	    --with-tcl=/usr/lib/tcl8.4 --with-apache=/usr
+	    --with-tcl=/usr/lib/tcl8.6 --with-apache=/usr
 
 Here is another example reported by a user who successfully built 
 Rivet on Slackware 12.1

Modified: tcl/rivet/branches/rivet-namespace/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/Makefile.in?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/Makefile.in (original)
+++ tcl/rivet/branches/rivet-namespace/Makefile.in Tue Feb  8 00:37:22 2011
@@ -187,6 +187,7 @@ MAKE_STUB_LIB = @MAKE_STUB_LIB@
 MATH_LIBS = @MATH_LIBS@
 MAX_POST = @MAX_POST@
 MKDIR_P = @MKDIR_P@
+MOD_RIVET_INCLUDES = @MOD_RIVET_INCLUDES@
 NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@

Modified: tcl/rivet/branches/rivet-namespace/VERSION
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/VERSION?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/VERSION (original)
+++ tcl/rivet/branches/rivet-namespace/VERSION Tue Feb  8 00:37:22 2011
@@ -1 +1 @@
-2.1.0r1
+2.1.0r1-ns

Modified: tcl/rivet/branches/rivet-namespace/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/configure.ac?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/configure.ac (original)
+++ tcl/rivet/branches/rivet-namespace/configure.ac Tue Feb  8 00:37:22 2011
@@ -22,7 +22,7 @@ dnl
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([Rivet],[2.1.0r1])
+AC_INIT([Rivet],[2.1.0r1-ns])
 TEA_INIT([3.9])
 
 AC_CONFIG_AUX_DIR(tclconfig)
@@ -390,6 +390,7 @@ AC_DEFUN([APACHE_VERSION],[
         apache_version_dir="apache-2"
         AC_DEFINE(APACHE2,1,[APACHE2 definition in config.h])
     fi
+    MOD_RIVET_INCLUDES="-I ${apache_version_dir}"
 ])
 
 AC_DEFUN([HANDLE_TCL_PACKAGE_PATH],[
@@ -516,7 +517,7 @@ AC_DEFUN([VIRTUAL_INTERPS_SEPARATION],[
     [ separate_virtual_interps="yes"]
     )
 
-    AC_MSG_CHECKING(whether Rivet will crate an interpreter for each virtual host)
+    AC_MSG_CHECKING(whether Rivet will create an interpreter for each virtual host)
     if test "$separate_virtual_interps" = "yes"; then
         AC_MSG_RESULT([yes])
         AC_DEFINE(SEPARATE_VIRTUAL_INTERPS,1,[virtual hosts will have their own interp])
@@ -554,12 +555,12 @@ AC_DEFUN([POST_MAX_SIZE],[
 AC_DEFUN([UPLOAD_TO_VAR],[
     AC_ARG_ENABLE(
     upload-var,
-    [  --enable-upload-var to enable automatic upload to variables ],
+    [  --disable-upload-var to enable automatic upload to variables ],
     [ upload_var=$enable_upload_var ],
     [ upload_var="yes"]
     )
 
-    AC_MSG_CHECKING(if files are uploaded to Tcl variables)
+    AC_MSG_CHECKING(whether files are uploaded to Tcl variables)
     if test "$upload_var" = "yes"; then
         AC_MSG_RESULT([yes])
         AC_DEFINE(UPLOAD_FILES_TO_VAR,1,[Files are uploaded to Tcl variables])
@@ -583,6 +584,7 @@ VIRTUAL_INTERPS_SEPARATION
 POST_MAX_SIZE
 UPLOAD_TO_VAR
 AC_SUBST(apache_version_dir)
+AC_SUBST(MOD_RIVET_INCLUDES)
 
 AC_DEFINE_UNQUOTED(RIVETLIB_DESTDIR,"${RIVET_TCL_TARGET}",[The path to the rivet tcl library])
 AC_DEFINE_UNQUOTED(NAMEOFEXECUTABLE,"${TCLSH_PROG}",[The path to a working tclsh executable])

Modified: tcl/rivet/branches/rivet-namespace/doc/rivet.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/doc/rivet.xml?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/doc/rivet.xml (original)
+++ tcl/rivet/branches/rivet-namespace/doc/rivet.xml Tue Feb  8 00:37:22 2011
@@ -9,7 +9,7 @@
     <!ENTITY upload.html	   SYSTEM	"examples/upload.html" >
     <!ENTITY upload.rvt		   SYSTEM	"examples/upload.rvt" >
     <!ENTITY download.tcl	   SYSTEM	"examples/download.tcl" >
-    <!ENTITY rivet_web_service.tcl  SYSTEM  	"examples/rivet_web_service.tcl" >
+    <!ENTITY rivet_web_service.tcl  SYSTEM  "examples/rivet_web_service.tcl" >
     <!ENTITY intro.xml		    SYSTEM  	"xml/intro.xml" >
     <!ENTITY install.xml	    SYSTEM  	"xml/install.xml" >
     <!ENTITY directives.xml	    SYSTEM  	"xml/directives.xml" >
@@ -48,25 +48,26 @@
   <articleinfo>
     <title>Apache Rivet</title>
     <copyright>
-      <year>2002</year>
-      <year>2003</year>
-      <year>2004</year>
-      <year>2005</year>
-      <year>2006</year>
-      <year>2007</year>
-      <year>2008</year>
-      <year>2009</year>
-      <year>2010</year>
-      <holder>Apache Software Foundation</holder>
+        <year>2002</year>
+        <year>2003</year>
+        <year>2004</year>
+        <year>2005</year>
+        <year>2006</year>
+        <year>2007</year>
+        <year>2008</year>
+        <year>2009</year>
+        <year>2010</year>
+        <year>2011</year>
+        <holder>Apache Software Foundation</holder>
     </copyright>
     <author>
-      <firstname>The Rivet Team</firstname>
-      <affiliation>
-	<orgname>The Apache Software Foundation</orgname>
-	<address>
-	  <email>rivet-dev@tcl.apache.org</email>
-	</address>
-      </affiliation>
+        <firstname>The Rivet Team</firstname>
+        <affiliation>
+	        <orgname>The Apache Software Foundation</orgname>
+	        <address>
+	            <email>rivet-dev@tcl.apache.org</email>
+	        </address>
+        </affiliation>
     </author>
   </articleinfo>
 

Modified: tcl/rivet/branches/rivet-namespace/doc/xml/commands.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/doc/xml/commands.xml?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/doc/xml/commands.xml (original)
+++ tcl/rivet/branches/rivet-namespace/doc/xml/commands.xml Tue Feb  8 00:37:22 2011
@@ -750,7 +750,7 @@
     <refentry id="incr0">
       <refnamediv>
 	<refname>incr0</refname>
-	<refpurpose>increment a variable or set it to 1 if nonexistant.</refpurpose>
+	<refpurpose>increment a variable or set it to 1 if nonexistent.</refpurpose>
       </refnamediv>
 
       <refsynopsisdiv>
@@ -770,6 +770,12 @@
 	  variable doesn't exist, create it instead of returning an
 	  error.
 	</para>
+
+        <note> 
+            incr0 functionality is now provided by <command>incr</command>, 
+            therefore this command is obsolete and it's kept 
+            only for compatibility. It will be removed in future versions of Rivet
+        </note>
       </refsect1>
     </refentry>
 

Modified: tcl/rivet/branches/rivet-namespace/doc/xml/install.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/doc/xml/install.xml?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/doc/xml/install.xml (original)
+++ tcl/rivet/branches/rivet-namespace/doc/xml/install.xml Tue Feb  8 00:37:22 2011
@@ -2,251 +2,263 @@
     <title>Apache Rivet Installation</title>
     <procedure>
       <step>
-	<title>Check Dependencies</title>
-	<para>
-	  To install Rivet, you will need Tcl 8.4 or greater. Rivet can be compiled to work 
-	  with either Apache 1.3.xx or Apache 2.2.xx server.
-	  It is known to run on Linux, FreeBSD, OpenBSD, Solaris and HPUX. Windows NT is also possible
-	  - please see the directions in the distribution.  
-	</para>
+        <title>Check Dependencies</title>
+        <para>
+            To install Rivet 2.1.0, you will need Tcl 8.5 or greater and the Apache HTTP server version 2.2.x. 
+            It is known to run on Linux, FreeBSD, OpenBSD, Solaris and HPUX. Windows NT is also possible
+            - please see the directions in the distribution. 
+			</para>
+			<para>
+				<note>
+					Check your Apache installation for
+	         	Rivet requires Apache HTTP Webserver to run 
+	         	prefork as mpm.
+	         </note>
+			</para>
+         <para>
+            If you're building Apache yourself from sources be careful to specify 
+            <command>--with-mpm=prefork</command> when running ./configure. 
+            Rivet doesn't support the run time mpm specification available in the Apache 2.3
+            development version.
+        </para>
       </step>
       <step>
-	<title>Get Rivet</title>
-	<para>
-	  Download the sources at <ulink url="http://tcl.apache.org/rivet/download.html"/>.  Currently
-	  the only way to obtain Rivet.  In the future, we hope to have a FreeBSD port, Debian package, RPM's, and windows
-	  binaries.
-	</para>
+        <title>Get Rivet</title>
+        <para>
+          Download the sources at <ulink url="http://tcl.apache.org/rivet/download.html"/>.  Currently
+          the only way to obtain Rivet.  In the future, we hope to have a FreeBSD port, Debian package, RPM's, and windows
+          binaries.
+        </para>
       </step>
       <step performance="required">
-	<title>Install Tcl</title>
-	<para>
-	  If you don't have Tcl already, you need it!  If you already
-	  have it, you should just be able to use your system Tcl as
-	  long as it is recent.  You can tell Rivet build scripts where Tcl is via
-	  the <option>--with-tcl</option> option to <command>configure</command> (see below).
-	</para>
+        <title>Install Tcl</title>
+        <para>
+          If you don't have <ulink url="http://www.tcl.tk">Tcl</ulink> already, you need it!  
+          If you already have it, you should just be able to use your system Tcl as
+          long as it is recent.  You can tell Rivet build scripts where Tcl is via
+          the <option>--with-tcl</option> option to <command>configure</command> (see below).
+        </para>
       </step>
       <step performance="optional">
-	<title>Get and Install Apache Sources</title>
-	<para>
-          Rivet needs some Apache include (.h) files in order to build.  The easiest way 
-	  to get them is to download the source code of the Apache web server, although some systems
-	  (Debian GNU/Linux for example) make it possible to install only the headers and other 
-	  development files.  If you intend to build Rivet statically (compiled into the Apache web
-	  server instead of loaded dynamically), you definitely need the sources.  
-	    We recommend that you build Rivet as a loadable shared library, for maximum flexibility,
-	    meaning that you also build Apache to be able to load modules. Other than that, 
-	    the default Apache install is fine.  We will tell Rivet where it is located via the 
-	    <option>--with-apxs</option> option to <command>configure</command> (see below).
-	</para>
-	<para>
-          The source code for the Apache web server may be found by
-          following the links here: <ulink
-          url="http://httpd.apache.org/"/>.
-	</para>
-      </step>
-      <step>
-	<title>Uncompress Sources</title>
-	<para>
-	  We will assume that you have Apache installed at this point.
-	  You must uncompress the Rivet sources in the directory where you
-	  wish to compile them.
+        <title>Get and Install Apache Sources</title>
+        <para>
+              Rivet needs some Apache include (.h) files in order to build.  The easiest way 
+          to get them is to download the source code of the Apache web server, although some systems
+          (Debian GNU/Linux for example) make it possible to install only the headers and other 
+          development files.  If you intend to build Rivet statically (compiled into the Apache web
+          server instead of loaded dynamically), you definitely need the sources.  
+            We recommend that you build Rivet as a loadable shared library, for maximum flexibility,
+            meaning that you also build Apache to be able to load modules. Other than that, 
+            the default Apache install is fine.  We will tell Rivet where it is located via the 
+            <option>--with-apxs</option> option to <command>configure</command> (see below).
+        </para>
+        <para>
+              The source code for the Apache web server may be found by
+              following the links here: <ulink
+              url="http://httpd.apache.org/"/>.
+        </para>
+    </step>
+    <step>
+        <title>Uncompress Sources</title>
+        <para>
+          We will assume that you have Apache installed at this point.
+          You must uncompress the Rivet sources in the directory where you
+          wish to compile them.
 
-	  <programlisting>gunzip rivet-X.X.X.tar.gz
+          <programlisting>gunzip rivet-X.X.X.tar.gz
 tar -xvf rivet-X.X.X.tar.gz</programlisting>
 
-	</para>
-      </step>
-      <step>
-	<title>Building Rivet</title>
-	<substeps>
-	  <step>
-	    <para>
-	      On Linux or Unix systems, Rivet uses the standard <command>./configure ; make ; make install</command> technique.
-	    </para>
-	    <para>
-	      There are several rivet specific options to configure that might be useful (or needed):
-	      <variablelist>
-		<varlistentry>
-		  <term>--with-tcl</term>
-		  <listitem>
-		    <para>
-		      This points to the directory where the
-		      <filename>tclConfig.sh</filename> file is located.
-		    </para>
-		  </listitem>
-		</varlistentry>
-		<varlistentry>
-		  <term>--with-tclsh</term>
-		  <listitem>
-		    <para>This points to the location of the
-		      <filename>tclsh</filename> executable.</para>
-		  </listitem>
-		</varlistentry>
-		<varlistentry>
-		  <term>--with-apxs</term>
-		  <listitem>
-		    <para>The location of the <filename>apxs</filename>
-		      program that provides information about the
-		      configuration and compilation options of Apache modules.</para>
-		  </listitem>
-		</varlistentry>
-		<varlistentry>
-		  <term>--with-apache-version=[1|2]</term>
-		  <listitem>
-		    <para>
-			This option tells the build scripts whether you want to build Rivet for the
-			Apache 1.x or Apache 2.x server.
-		    </para>
-		  </listitem>
-		</varlistentry>
-		<varlistentry>
-		  <term>--with-apache-include[=DIR]</term>
-		  <listitem>
-		    <para>
-			    Locates the Apache include files on your computer, if they're not in standard directory. 
-		    </para>
-		  </listitem>
-		</varlistentry>
-		<varlistentry>
-		  <term>--enable-version-display=[yes|no] (default: no)</term>
-		  <listitem>
-		    <para>
-			This option enables Rivet to display its version in the logfiles when Apache is started. 
-			The default is to keep Rivet version hidden.
-		    </para>
-		  </listitem>
-		</varlistentry>
-		<varlistentry>
-			<term>--with-rivet-target-dir=DIR</term>
-		   <listitem>
-				<para>
-			   	This option tells the install script where Rivet's Tcl packages have to be copied. 
-				</para>
-		   </listitem>
-		</varlistentry>
-		<varlistentry>
-			<term>--with-rivet-target-dir=DIR</term>
-		   <listitem>
-				<para>
-			   	This option tells the install script where Rivet's Tcl packages have to be copied. 
-				</para>
-		   </listitem>
-		</varlistentry>
-		<varlistentry>
-			<term>--with-upload-dir=DIR (default: '/tmp')</term>
-			<listitem>
-				<para>
-					Sets the default directory where Rivet stores files in an upload 
-					operation. (Can be changed in the conf with the parameter 'UploadDirectory',
-					see )
-				</para>
-			</listitem>
-		</varlistentry>
-		<varlistentry>
-			<term>--enable-head-request (default: 'no') </term>
-			<listitem>
-				If enabled returns the real headers in response to a HEAD http request. (Can
-				be changed in the configuration with the 'HonorHeaderOnlyRequests' parameter)
-			</listitem>
-		</varlistentry>
-		<varlistentry>
-			<term>--enable-virtual-interps-separation (default: 'no')</term>
-			<listitem>
-				When enabled each virtual host will have its own interpreter. (Can be changed in the
-				configuration with the 'SeparateVirtualInterps' parameter)
-			</listitem>
-		</varlistentry>
-		<varlistentry>
-		    <term>--with-post-max=BYTES Maximum size of data in a POST (default: 0=unlimited)</term>
-		    <listitem>
-		       Form data are sent to the server in either a GET or a POST operation. Data in POST
-		       can be large and you can set the default maximumx size of data that can be accepted
-		       in a POST. (Can be changed in configuration with the 'UploadMaxSize' parameter)
-		    </listitem>
-		</varlistentry>
-		<varlistentry>
-		    <term>--enable-upload-var=[yes|no]</term>
-		    <listitem>
-            This sets the default for the configuration parameter 'UploadFilesToVar'. If set this 
-            option allow the upload of files into Tcl variables		    
-		    </listitem>
-		</varlistentry>
-	</variablelist>
-	    </para>
-	    <para>
-		Example: configuring the build system to compile Rivet for an apache 2.x server, using tcl8.5 and
-		specifying a custom name for the apxs program. 
-	    </para>
-	<programlisting>
-./configure --with-tcl=/usr/lib/tcl8.5/ --with-tclsh=/usr/bin/tclsh8.5 \
-	    --with-apxs=/usr/bin/apxs2 --with-apache=/usr --with-apache-version=2
-	</programlisting>
-	  </step>
-	  <step>
-	    <title>Run make</title>
-	    <para>
-	      At this point, you are ready to run make, which should
-	      run to completion without any errors (a warning or two
-	      is ok, generally).
-	    </para>
-	  </step>
-	  <step>
-	    <title>Install</title>
-	    <para>
-	      Now, you are ready to run the <command>make
-		install</command> to install the resulting files.
-		This should copy the shared object (like
-		<filename>mod_rivet.so</filename>, if one was
-		successfully created, into Apache's
-		<filename>libexec</filename> directory, as well as
-		install some support scripts and various code.
-	    </para>
-	  </step>
-	</substeps>
-      </step>
-      <step>
-	<title>Apache Configuration Files</title>
-	<para>
-	  Rivet is relatively easy to configure - we start off by
-	  adding the module itself:
-	</para>
-
-	<programlisting>LoadModule rivet_module	<replaceable>/usr/lib/apache2/modules/mod_rivet.so</replaceable>
-	</programlisting>
-
-	<para>
-	  This tells Apache to load the Rivet shared object, wherever
-	  it happens to reside on your file system.  Now we have to
-	  tell Apache what kind of files are "Rivet" files and how to
-	  process them:
-	</para>
+        </para>
+    </step>
+    <step>
+	    <title>Building Rivet</title>
+	    <substeps>
+	    <step>
+	        <para>
+              On Linux or Unix systems, Rivet uses the standard <command>./configure ; make ; make install</command> technique.
+            </para>
+            <para>
+              There are several rivet specific options to configure that might be useful (or needed):
+              <variablelist>
+            <varlistentry>
+              <term>--with-tcl</term>
+              <listitem>
+                <para>
+                  This points to the directory where the
+                  <filename>tclConfig.sh</filename> file is located.
+                </para>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>--with-tclsh</term>
+              <listitem>
+                <para>This points to the location of the
+                  <filename>tclsh</filename> executable.</para>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>--with-apxs</term>
+              <listitem>
+                <para>The location of the <filename>apxs</filename>
+                  program that provides information about the
+                  configuration and compilation options of Apache modules.</para>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>--with-apache-version=[1|2]</term>
+              <listitem>
+                <para>
+                This option tells the build scripts whether you want to build Rivet for the
+                Apache 1.x or Apache 2.x server.
+                </para>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>--with-apache-include[=DIR]</term>
+              <listitem>
+                <para>
+                    Locates the Apache include files on your computer, if they're not in standard directory. 
+                </para>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+              <term>--enable-version-display=[yes|no] (default: no)</term>
+              <listitem>
+                <para>
+                This option enables Rivet to display its version in the logfiles when Apache is started. 
+                The default is to keep Rivet version hidden.
+                </para>
+              </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>--with-rivet-target-dir=DIR</term>
+               <listitem>
+                    <para>
+                    This option tells the install script where Rivet's Tcl packages have to be copied. 
+                    </para>
+               </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>--with-rivet-target-dir=DIR</term>
+               <listitem>
+                    <para>
+                    This option tells the install script where Rivet's Tcl packages have to be copied. 
+                    </para>
+               </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>--with-upload-dir=DIR (default: '/tmp')</term>
+                <listitem>
+                    <para>
+                        Sets the default directory where Rivet stores files in an upload 
+                        operation. (Can be changed in the conf with the parameter 'UploadDirectory',
+                        see )
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>--enable-head-request (default: 'no') </term>
+                <listitem>
+                    If enabled returns the real headers in response to a HEAD http request. (Can
+                    be changed in the configuration with the 'HonorHeaderOnlyRequests' parameter)
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>--enable-virtual-interps-separation (default: 'no')</term>
+                <listitem>
+                    When enabled each virtual host will have its own interpreter. (Can be changed in the
+                    configuration with the 'SeparateVirtualInterps' parameter)
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>--with-post-max=BYTES Maximum size of data in a POST (default: 0=unlimited)</term>
+                <listitem>
+                   Form data are sent to the server in either a GET or a POST operation. Data in POST
+                   can be large and you can set the default maximumx size of data that can be accepted
+                   in a POST. (Can be changed in configuration with the 'UploadMaxSize' parameter)
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>--disable-upload-var</term>
+                <listitem>
+                    By default uploads are stored in Tcl variables. This switch sets the default for the configuration 
+                    parameter 'UploadFilesToVar' to 0. (Can be changed in the configuration)
+                </listitem>
+            </varlistentry>
+        </variablelist>
+            </para>
+            <para>
+                Example: configuring the build system to compile Rivet for an apache 2.x server, using tcl8.5 and
+                specifying a custom name for the apxs program. 
+            </para>
+        <programlisting>
+    ./configure --with-tcl=/usr/lib/tcl8.5/ --with-tclsh=/usr/bin/tclsh8.5 \
+            --with-apxs=/usr/bin/apxs2 --with-apache=/usr --with-apache-version=2
+        </programlisting>
+          </step>
+          <step>
+            <title>Run make</title>
+            <para>
+              At this point, you are ready to run make, which should
+              run to completion without any errors (a warning or two
+              is ok, generally).
+            </para>
+          </step>
+          <step>
+            <title>Install</title>
+            <para>
+                Now, you are ready to run the <command>make
+                install</command> to install the resulting files.
+                This should copy the shared object (like
+                <filename>mod_rivet.so</filename>, if one was
+                successfully created, into Apache's
+                <filename>libexec</filename> directory, as well as
+                install some support scripts and various code.
+            </para>
+          </step>
+        </substeps>
+          </step>
+          <step>
+        <title>Apache Configuration Files</title>
+        <para>
+          Rivet is relatively easy to configure - we start off by
+          adding the module itself:
+        </para>
+
+        <programlisting>LoadModule rivet_module	<replaceable>/usr/lib/apache2/modules/mod_rivet.so</replaceable>
+        </programlisting>
+
+        <para>
+          This tells Apache to load the Rivet shared object, wherever
+          it happens to reside on your file system.  Now we have to
+          tell Apache what kind of files are "Rivet" files and how to
+          process them:
+        </para>
 
-	<programlisting>AddType application/x-httpd-rivet .rvt
+        <programlisting>AddType application/x-httpd-rivet .rvt
 AddType application/x-rivet-tcl .tcl</programlisting>
 
-	<para>
-	  These tell Apache to process files with the
-	  <filename>.rvt</filename> and <filename>.tcl</filename>
-	  extensions as Rivet files.
-	</para>
-	<para>
-	  The characters encoding can be changed using the <command>header type</command> command,
-	  but you can also change the default charset for the whole site:
-	</para>
-	<programlisting>AddType 'application/x-httpd-rivet;charset=utf-8' rvt</programlisting>
-	<para>
-	   All the pages generated by Rivet on this site will be sent with a 
-	    <command>Content-Type:'text/html;charset=utf-8'</command> header.
-	</para>
-	<para>You may also wish to use Rivet files as index files for
-	directories.  In that case, you would do the following:</para>
-	<programlisting>DirectoryIndex index.html index.htm index.shtml index.cgi index.tcl index.rvt</programlisting>
-	<para>
-	  For other directives that Rivet provides for Apache
-	  configuration, please see <xref linkend="directives"/>.
-	</para>
+        <para>
+          These tell Apache to process files with the
+          <filename>.rvt</filename> and <filename>.tcl</filename>
+          extensions as Rivet files.
+        </para>
+        <para>
+          The characters encoding can be changed using the <command>header type</command> command,
+          but you can also change the default charset for the whole site:
+        </para>
+        <programlisting>AddType 'application/x-httpd-rivet;charset=utf-8' rvt</programlisting>
+        <para>
+           All the pages generated by Rivet on this site will be sent with a 
+            <command>Content-Type:'text/html;charset=utf-8'</command> header.
+        </para>
+        <para>You may also wish to use Rivet files as index files for
+        directories.  In that case, you would do the following:</para>
+        <programlisting>DirectoryIndex index.html index.htm index.shtml index.cgi index.tcl index.rvt</programlisting>
+        <para>
+          For other directives that Rivet provides for Apache
+          configuration, please see <xref linkend="directives"/>.
+        </para>
       </step>
     </procedure>
 </section>

Modified: tcl/rivet/branches/rivet-namespace/doc/xml/intro.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/doc/xml/intro.xml?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/doc/xml/intro.xml (original)
+++ tcl/rivet/branches/rivet-namespace/doc/xml/intro.xml Tue Feb  8 00:37:22 2011
@@ -20,10 +20,11 @@
     </para>
 
     <para>
-      This documentation is a work in progress, and, like everything
-      else about Apache Rivet, it is Free Software.  If you see
-      something that needs improving, and have ideas or suggestions,
-      don't hesitate to let us know.  If you want to contribute
-      directly, better yet!
+        This documentation is focused on the current version of Rivet, but
+        still a work in progress, and, like everything
+        else about Apache Rivet, it is Free Software.  If you see
+        something that needs improving, and have ideas or suggestions,
+        don't hesitate to let us know.  If you want to contribute
+        directly, better yet!
     </para>
-</section>
\ No newline at end of file
+</section>

Modified: tcl/rivet/branches/rivet-namespace/rivet/init.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/rivet/init.tcl?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/rivet/init.tcl (original)
+++ tcl/rivet/branches/rivet-namespace/rivet/init.tcl Tue Feb  8 00:37:22 2011
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-package provide RivetTcl 1.1
+package provide RivetTcl 2.1
 
 namespace eval ::Rivet {
 
@@ -24,15 +24,15 @@ namespace eval ::Rivet {
     ## namespace.  So, everything gets deleted when the request is finished.
     ###
     proc initialize_request {} {
-	catch { namespace delete ::request }
+        catch { namespace delete ::request }
 
-	namespace eval ::request { }
+        namespace eval ::request { }
 
-	proc ::request::global {args} {
-	    foreach arg $args {
-		uplevel "::global ::request::$arg"
-	    }
-	}
+        proc ::request::global {args} {
+            foreach arg $args {
+                uplevel "::global ::request::$arg"
+            }
+        }
     }
 
     ###
@@ -41,14 +41,14 @@ namespace eval ::Rivet {
     ## If an ErrorScript has been specified, this routine will not be called.
     ###
     proc handle_error {} {
-	global errorInfo
-	global errorOutbuf
+        global errorInfo
+        global errorOutbuf
 
-	puts <PRE>
-	puts "<HR>$errorInfo<HR>"
-	puts "<P><B>OUTPUT BUFFER:</B></P>"
-	puts $errorOutbuf
-	puts </PRE>
+        puts <PRE>
+        puts "<HR>$errorInfo<HR>"
+        puts "<P><B>OUTPUT BUFFER:</B></P>"
+        puts $errorOutbuf
+        puts </PRE>
     }
 
     ###
@@ -62,42 +62,53 @@ namespace eval ::Rivet {
     ## The main initialization procedure for Rivet.
     ###
     proc init {} {
-	global auto_path
-	global server
+        global auto_path
+        global server
 
-	## Add the rivet-tcl directory to Tcl's auto search path.
-	## We insert it at the head of the list because we want any of
-	## our procs named the same as Tcl's procs to be overridden.
-	## Example: parray
-	set tclpath [file join [file dirname [info script]] rivet-tcl]
-	set auto_path [linsert $auto_path 0 $tclpath]
-
-	## Add the packages directory to the auto_path.
-	## If we have a packages$tcl_version directory
-	## (IE: packages8.3, packages8.4) append that as well.
-
-	## The packages directory come right after the rivet-tcl directory.
-	set pkgpath [file join [file dirname [info script]] packages]
-	set auto_path [linsert $auto_path 1 $pkgpath]
-	set auto_path [linsert $auto_path 2 ${pkgpath}-local]
-
-	if { [file exists ${pkgpath}$::tcl_version] } {
-	    lappend auto_path ${pkgpath}$::tcl_version
-	}
-
-	## Likewise we have also to add to auto_path the directory containing 
-	## this script since it holds the pkgIndex.tcl file for package Rivet. 
-
-#	set auto_path [linsert $auto_path 0 [file dirname [info script]]]
-
-	## This will allow users to create proc libraries and tclIndex files
-	## in the local directory that can be autoloaded.
-	## Perhaps this must go to the front of the list to allow the user
-	## to override even Rivet's procs.
-	lappend auto_path .
+        ## Add the rivet-tcl directory to Tcl's auto search path.
+        ## We insert it at the head of the list because we want any of
+        ## our procs named the same as Tcl's procs to be overridden.
+        ## Example: parray
+        set tclpath [file join [file dirname [info script]] rivet-tcl]
+        set auto_path [linsert $auto_path 0 $tclpath]
+
+        ## Add the packages directory to the auto_path.
+        ## If we have a packages$tcl_version directory
+        ## (IE: packages8.3, packages8.4) append that as well.
+
+        ## The packages directory come right after the rivet-tcl directory.
+        set pkgpath [file join [file dirname [info script]] packages]
+        set auto_path [linsert $auto_path 1 $pkgpath]
+        set auto_path [linsert $auto_path 2 ${pkgpath}-local]
+
+        if { [file exists ${pkgpath}$::tcl_version] } {
+            lappend auto_path ${pkgpath}$::tcl_version
+        }
+
+        ## Likewise we have also to add to auto_path the directory containing 
+        ## this script since it holds the pkgIndex.tcl file for package Rivet. 
+
+        # set auto_path [linsert $auto_path 0 [file dirname [info script]]]
+
+        ## This will allow users to create proc libraries and tclIndex files
+        ## in the local directory that can be autoloaded.
+        ## Perhaps this must go to the front of the list to allow the user
+        ## to override even Rivet's procs.
+        lappend auto_path .
     }
 
 } ;## namespace eval ::Rivet
 
+
+## Rivet 2.1.x supports Tcl >= 8.5, therefore there's no more need for
+## the command incr0, as the functionality of creating a not yet
+## existing variable is now provided by 'incr'. Being incr0 a command
+## in Rivet < 2.1.0, before the move into the ::Rivet namespace, 
+## we alias this command only in the global namespace
+
+interp alias {} incr0 {} incr
+
 ## Initialize Rivet.
 ::Rivet::init
+
+#package require RivetLib 1.2

Modified: tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/tclIndex
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/tclIndex?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/tclIndex (original)
+++ tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/tclIndex Tue Feb  8 00:37:22 2011
@@ -6,20 +6,21 @@
 # element name is the name of a command and the value is
 # a script that loads the command.
 
+set auto_index(lempty) [list source [file join $dir lempty.tcl]]
+set auto_index(load_response) [list source [file join $dir load_response.tcl]]
+set auto_index(random) [list source [file join $dir random.tcl]]
+set auto_index(import_switch_args) [list source [file join $dir import_switch_args.tcl]]
+set auto_index(rivet_command_document) [list source [file join $dir rivet_command_document.tcl]]
+set auto_index(html) [list source [file join $dir html.tcl]]
+set auto_index(load_cookies) [list source [file join $dir load_cookies.tcl]]
 set auto_index(debug) [list source [file join $dir debug.tcl]]
 set auto_index(lassign) [list source [file join $dir lassign.tcl]]
-set auto_index(html) [list source [file join $dir html.tcl]]
-set auto_index(incr0) [list source [file join $dir incr0.tcl]]
-set auto_index(load_response) [list source [file join $dir load_response.tcl]]
-set auto_index(parray) [list source [file join $dir parray.tcl]]
+set auto_index(import_keyvalue_pairs) [list source [file join $dir import_keyvalue_pairs.tcl]]
 set auto_index(read_file) [list source [file join $dir read_file.tcl]]
-set auto_index(wrap) [list source [file join $dir wrap.tcl]]
-set auto_index(wrapline) [list source [file join $dir wrap.tcl]]
-set auto_index(lempty) [list source [file join $dir lempty.tcl]]
-set auto_index(load_cookies) [list source [file join $dir load_cookies.tcl]]
+set auto_index(lmatch) [list source [file join $dir lmatch.tcl]]
 set auto_index(clock_to_rfc850_gmt) [list source [file join $dir cookie.tcl]]
 set auto_index(make_cookie_attributes) [list source [file join $dir cookie.tcl]]
 set auto_index(cookie) [list source [file join $dir cookie.tcl]]
-set auto_index(import_keyvalue_pairs) [list source [file join $dir import_keyvalue_pairs.tcl]]
-set auto_index(import_switch_args) [list source [file join $dir import_switch_args.tcl]]
-set auto_index(rivet_command_document) [list source [file join $dir rivet_command_document.tcl]]
+set auto_index(wrap) [list source [file join $dir wrap.tcl]]
+set auto_index(wrapline) [list source [file join $dir wrap.tcl]]
+set auto_index(parray) [list source [file join $dir parray.tcl]]

Modified: tcl/rivet/branches/rivet-namespace/src/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/Makefile.am?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/Makefile.am (original)
+++ tcl/rivet/branches/rivet-namespace/src/Makefile.am Tue Feb  8 00:37:22 2011
@@ -53,7 +53,7 @@ lib_libexec_LTLIBRARIES = librivet.la li
 librivet_la_SOURCES = rivetList.c rivetCrypt.c rivetWWW.c rivetPkgInit.c
 librivet_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version
 librivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@
-librivet_la_CPPFLAGS = @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"'
+librivet_la_CPPFLAGS = @MOD_RIVET_INCLUDES@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"'
 
 #
 # Rivet Parser Library

Modified: tcl/rivet/branches/rivet-namespace/src/apache-2/apache_request.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/apache-2/apache_request.c?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/apache-2/apache_request.c (original)
+++ tcl/rivet/branches/rivet-namespace/src/apache-2/apache_request.c Tue Feb  8 00:37:22 2011
@@ -46,11 +46,8 @@ util_read(ApacheRequest *req, const char
         long length = r->remaining;
 
         if (length > req->post_max && req->post_max > 0) {
-            //TODO: fix logging apr_log_rerror
-            //ap_log_error(REQ_ERROR, "[libapreq] entity too large (%d, max=%d)",
-            //        (int)length, req->post_max);
-            //apr_log_rerror(REQ_ERROR, "[libapreq] entity too large (%d, max=%d)",
-            //        (int)length, req->post_max);
+            ap_log_rerror(REQ_ERROR,"entity too large (%d, max=%d)",
+					(int)length, req->post_max);
             return HTTP_REQUEST_ENTITY_TOO_LARGE;
         }
 
@@ -391,7 +388,6 @@ int ApacheRequest___parse(ApacheRequest 
         } else if (ct && strncaseEQ(ct, MULTIPART_ENCTYPE, MULTIPART_ENCTYPE_LENGTH)) {
             result = ApacheRequest_parse_multipart(req,ct);
         } else {
-            //TODO: fix logging apr_log_rerror
             ap_log_rerror(REQ_ERROR, "unknown content-type: `%s'", ct);
             result = HTTP_INTERNAL_SERVER_ERROR;
         }
@@ -493,14 +489,14 @@ apr_file_t *ApacheRequest_tmpfile(Apache
 int
 ApacheRequest_parse_multipart(ApacheRequest *req,const char* ct)
 {
-    request_rec *r = req->r;
-    int rc = OK;
-    long length;
-    char *boundary;
-    multipart_buffer *mbuff;
-    ApacheUpload *upload = NULL;
-    apr_status_t  status;
-    char error[1024];
+    request_rec 	*r = req->r;
+    int 		rc = OK;
+    long 		length;
+    char 		*boundary;
+    multipart_buffer 	*mbuff;
+    ApacheUpload 	*upload = NULL;
+    apr_status_t  	status;
+    char 		error[1024];
 
     if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) {
         return rc;
@@ -511,9 +507,8 @@ ApacheRequest_parse_multipart(ApacheRequ
     }
 
     if ((length = r->remaining) > req->post_max && req->post_max > 0) {
-        //TODO: fix logging apr_log_rerror
-        //apr_log_rerror(REQ_ERROR, "entity too large (%d, max=%d)",
-        //        (int)length, req->post_max);
+        ap_log_rerror(REQ_ERROR,"entity too large (%d, max=%d)",
+				(int)length,req->post_max);
         return HTTP_REQUEST_ENTITY_TOO_LARGE;
     }
 
@@ -542,7 +537,7 @@ ApacheRequest_parse_multipart(ApacheRequ
 
         if (!header) {
 #ifdef DEBUG
-            apr_log_rerror(REQ_ERROR,"Silently dropping remaining '%ld' bytes", r->remaining);
+            ap_log_rerror(REQ_ERROR,"Silently dropping remaining '%ld' bytes", r->remaining);
 #endif
 	    do { } while ( ap_get_client_block(r, buff, sizeof(buff)) > 0 );
             	
@@ -576,8 +571,9 @@ ApacheRequest_parse_multipart(ApacheRequ
             if (!param) continue; /* shouldn't happen, but just in case. */
 
             if (req->disable_uploads) {
-                //TODO: fix logging apr_log_rerror
-                //apr_log_rerror(REQ_ERROR, "[libapreq] file upload forbidden");
+#if DEBUG
+                ap_log_rerror(REQ_ERROR, "[libapreq] file upload forbidden");
+#endif
                 return HTTP_FORBIDDEN;
             }
 

Modified: tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c (original)
+++ tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.c Tue Feb  8 00:37:22 2011
@@ -15,6 +15,7 @@
    limitations under the License.
 */
 
+/* $Id: $ */
 
 /* Rivet config */
 #ifdef HAVE_CONFIG_H
@@ -857,18 +858,14 @@ Rivet_PerInterpInit(server_rec *s, rivet
 
     Tcl_SetStdChannel(*(rsc->outchannel), TCL_STDOUT);
 
-    /* Initialize the interpreter with Rivet's Tcl commands. */
-    Rivet_InitCore( interp );
-
-    /* Create a global array with information about the server. */
-    Rivet_InitServerVariables( interp, p );
-    Rivet_PropagateServerConfArray( interp, rsc );
-
     /* Set up interpreter associated data */
+
     globals = apr_pcalloc(p, sizeof(rivet_interp_globals));
-    Tcl_SetAssocData(interp, "rivet", NULL, globals);
+    Tcl_SetAssocData(interp,"rivet",NULL,globals);
 
-    /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
+    /* Rivet commands namespace is created */
+    globals->rivet_ns = Tcl_CreateNamespace (interp,RIVET_NS,NULL,
+                                            (Tcl_NamespaceDeleteProc *)NULL);
 
     /* We put in front the auto_path list the path to the directory where
      * init.tcl is located (provides package RivetTcl)
@@ -878,14 +875,32 @@ Rivet_PerInterpInit(server_rec *s, rivet
 
     rivet_tcl = Tcl_NewStringObj(RIVET_DIR,-1);
     Tcl_IncrRefCount(rivet_tcl);
+
     if (Tcl_ListObjReplace(interp,auto_path,0,0,1,&rivet_tcl) == TCL_ERROR)
     {
         ap_log_error( APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, 
                     "error setting auto_path: %s",Tcl_GetStringFromObj(auto_path,NULL));
     } 
     Tcl_DecrRefCount(rivet_tcl);
-    
-    if (Tcl_PkgRequire(interp, "RivetTcl", "1.1", 1) == NULL)
+
+    /* Initialize the interpreter with Rivet's Tcl commands. */
+    Rivet_InitCore(interp);
+
+    /* Create a global array with information about the server. */
+    Rivet_InitServerVariables(interp, p );
+    Rivet_PropagateServerConfArray( interp, rsc );
+
+    /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
+
+    if (Tcl_PkgRequire(interp, "RivetTcl", "2.1", 1) == NULL)
+    {
+        ap_log_error( APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
+                "init.tcl must be installed correctly for Apache Rivet to function: %s",
+                Tcl_GetStringResult(interp) );
+        exit(1);
+    } 
+
+    if (Tcl_PkgRequire(interp, "RivetLib", "1.2", 1) == NULL)
     {
         ap_log_error( APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
                 "init.tcl must be installed correctly for Apache Rivet to function: %s",
@@ -897,6 +912,7 @@ Rivet_PerInterpInit(server_rec *s, rivet
      * won't send any result packets to the browser unless the Rivet
      * programmer does a "flush stdout" or the page is completed.
      */
+
 //  Tcl_SetChannelOption(interp, *(rsc->outchannel), "-buffersize", "1000000");
     Tcl_SetChannelBufferSize (*(rsc->outchannel), 1000000);
     Tcl_RegisterChannel(interp, *(rsc->outchannel));
@@ -993,6 +1009,7 @@ Rivet_SetScript (apr_pool_t *pool, rivet
  * Implements the RivetServerConf Apache Directive
  *
  * Command Arguments:
+ *
  *  RivetServerConf GlobalInitScript <script>
  *  RivetServerConf ChildInitScript <script>
  *  RivetServerConf ChildExitScript <script>
@@ -1501,7 +1518,6 @@ Rivet_CreateCache (server_rec *s, apr_po
     }
 }
 
-
 /*
  *-----------------------------------------------------------------------------
  *

Modified: tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.h
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.h?rev=1068238&r1=1068237&r2=1068238&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.h (original)
+++ tcl/rivet/branches/rivet-namespace/src/apache-2/mod_rivet.h Tue Feb  8 00:37:22 2011
@@ -1,3 +1,21 @@
+/* mod_rivet.h -- The apache module itself, for Apache 2.x. */
+
+/* Copyright 2000-2005 The Apache Software Foundation
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+   	http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
+/* $Id: $ */
 
 #ifndef MOD_RIVET_H
 #define MOD_RIVET_H 1
@@ -56,9 +74,9 @@ typedef struct _rivet_server_conf {
     Tcl_Obj *rivet_global_init_script;	/* run once when apache is started */
     Tcl_Obj *rivet_child_init_script;
     Tcl_Obj *rivet_child_exit_script;
-    Tcl_Obj *rivet_before_script;	/* script run before each page	*/
-    Tcl_Obj *rivet_after_script;	/*            after		*/
-    Tcl_Obj *rivet_error_script;	/*            for errors	*/
+    Tcl_Obj *rivet_before_script;	    /* script run before each page	*/
+    Tcl_Obj *rivet_after_script;	    /*            after             */
+    Tcl_Obj *rivet_error_script;	    /*            for errors        */
 
     /* This flag is used with the above directives.  If any of them
        have changed, it gets set. */
@@ -70,13 +88,13 @@ typedef struct _rivet_server_conf {
     int upload_max;
     int upload_files_to_var;
     int separate_virtual_interps;
-    int honor_header_only_reqs;		    /* default: 0 */
+    int honor_header_only_reqs;
     char *server_name;
     const char *upload_dir;
     apr_table_t *rivet_server_vars;
     apr_table_t *rivet_dir_vars;
     apr_table_t *rivet_user_vars;
-    char **objCacheList;		    /* Array of cached objects (for priority handling) */
+    char **objCacheList;		        /* Array of cached objects (for priority handling) */
     Tcl_HashTable *objCache;		    /* Objects cache - the key is the script name */
 
     Tcl_Channel *outchannel;		    /* stuff for buffering output */
@@ -86,8 +104,9 @@ typedef struct _rivet_server_conf {
    'de-globalize' them */
 
 typedef struct _rivet_interp_globals {
-    request_rec *r;			    /* request rec */
-    TclWebRequest *req;			    /* TclWeb API request */
+    request_rec     *r;			    /* request rec */
+    TclWebRequest   *req;			/* TclWeb API request */
+    Tcl_Namespace   *rivet_ns;      /* Rivet commands namespace */
 } rivet_interp_globals;
 
 int Rivet_ParseExecFile(TclWebRequest *req, char *filename, int toplevel);



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