You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2013/02/11 17:39:18 UTC

svn commit: r1444856 - in /tcl/rivet/branches/2.1: ./ doc/ doc/xml/ rivet/packages/dio/ rivet/rivet-tcl/ src/ src/apache-2/

Author: mxmanghi
Date: Mon Feb 11 16:39:17 2013
New Revision: 1444856

URL: http://svn.apache.org/r1444856
Log:
committing latest merge from trunk

Modified:
    tcl/rivet/branches/2.1/   (props changed)
    tcl/rivet/branches/2.1/ChangeLog
    tcl/rivet/branches/2.1/Makefile.in
    tcl/rivet/branches/2.1/VERSION
    tcl/rivet/branches/2.1/doc/   (props changed)
    tcl/rivet/branches/2.1/doc/xml/commands.xml
    tcl/rivet/branches/2.1/rivet/packages/dio/dio.tcl
    tcl/rivet/branches/2.1/rivet/rivet-tcl/tclIndex
    tcl/rivet/branches/2.1/rivet/rivet-tcl/xml.tcl
    tcl/rivet/branches/2.1/src/Makefile.am
    tcl/rivet/branches/2.1/src/apache-2/Makefile.am
    tcl/rivet/branches/2.1/src/apache-2/apache_request.c
    tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c
    tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h
    tcl/rivet/branches/2.1/src/apache-2/rivetConf.c
    tcl/rivet/branches/2.1/src/apache-2/rivetCore.c

Propchange: tcl/rivet/branches/2.1/
------------------------------------------------------------------------------
  Merged /tcl/rivet/trunk:r1428561-1444822

Modified: tcl/rivet/branches/2.1/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/ChangeLog?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/ChangeLog (original)
+++ tcl/rivet/branches/2.1/ChangeLog Mon Feb 11 16:39:17 2013
@@ -1,3 +1,30 @@
+2013-02-11 Massimo Manghi <mx...@apache.org>
+    * rivet/packages/dio/dio.tcl: fixing nasty bug introduced with Rivet 2.1. When
+    method 'store' is updating the call to method update needs a flat list as
+    last argument, not just a sigle valued list argument
+    * doc/xml/commands.xml: Improved explanation for command abort_page
+    * src/apache-2/rivetConf.c: corrected typo in header
+    * src/apache-2/apache_request.c: new handling of apache requests largely
+    relaxes checks on the 'Content-Type' header (Bug #53661)
+
+2013-02-02 Massimo Manghi <mx...@apache.org>
+    * src/apache-2/apache_request.c,src/apache-2/mod_rivet.c: extending request
+    handling also for PUT and DELETE. Applied patch provided by Jeff Lawson in
+    bug report #53892 
+
+2013-02-01 Massimo Manghi <mx...@apache.org>
+    * src/apache-2/Makefile.am, src/Makefile.am: removed -v flag from rm command
+    in install-data-hook: target to avoid incompatibility with same command's
+    implementation in Solaris (Bug: #54181)
+
+2013-01-28 Massimo Manghi <mx...@apache.org>
+    * src/apache-2/mod_rivet.[c|h],rivetCore.c: removed hardcoded error code 
+    generated by abort_page and defined in the preprocessor symbol ABORTCODE.
+    
+2013-01-25 Massimo Manghi <mx...@apache.org>
+    * rivet/rivet-tcl/xml.tcl,rivet/rivet-tcl/tclIndex: New command for XML fragments
+    composition
+
 2013-01-20 Massimo Manghi <mx...@apache.org>
     * Makefile.am: added removal of libool created .la files for librivetparser and
     librivet

Modified: tcl/rivet/branches/2.1/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/Makefile.in?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/Makefile.in (original)
+++ tcl/rivet/branches/2.1/Makefile.in Mon Feb 11 16:39:17 2013
@@ -18,12 +18,12 @@
 #
 # top-level Makefile.am for Apache Rivet: gets turned into a Makefile.in by automake
 #
-# $Id: Makefile.am 1024231 2010-10-19 13:39:17Z mxmanghi $
+# $Id: Makefile.am 1436690 2013-01-21 23:40:42Z mxmanghi $
 #
 # 2007/12/25: Added target uninistall-local that removes the tcl stuff (mxmanghi)
 # 2010/06/22: target instal-data-local searches for pkgIndex.tcl files and deletes them
 #             before invoking pkg_mkIndex.
-#
+# 2013/01/20: removing libtool created .la files
 VPATH = @srcdir@
 am__make_dryrun = \
   { \
@@ -854,6 +854,7 @@ install-data-local:
 	-(  cd  $(DESTDIR)$(RIVETLIB_DESTDIR); \
 	    echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \
 	    echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+	-( cd $(DESTDIR)$(RIVETLIB_DESTDIR); rm -f *.la)
 
 uninstall-local:
 	rm -fr $(DESTDIR)$(RIVETLIB_DESTDIR)

Modified: tcl/rivet/branches/2.1/VERSION
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/VERSION?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/VERSION (original)
+++ tcl/rivet/branches/2.1/VERSION Mon Feb 11 16:39:17 2013
@@ -1 +1 @@
-2.1.1rc0
+2.1.0

Propchange: tcl/rivet/branches/2.1/doc/
------------------------------------------------------------------------------
  Merged /tcl/rivet/trunk/doc:r1428561-1444822

Modified: tcl/rivet/branches/2.1/doc/xml/commands.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/doc/xml/commands.xml?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/doc/xml/commands.xml (original)
+++ tcl/rivet/branches/2.1/doc/xml/commands.xml Mon Feb 11 16:39:17 2013
@@ -72,7 +72,7 @@
 		<refsect1>
 			<title>Description</title> 
 			<para>
-				Usage of this command is meaningful only in code that runs as
+				Usage of this command is meaningful only in a script set as
 				AbortScript or AfterEveryScript. 
 				<command>abort_code</command> returns the value of the optional 
 				parameter passed to <command>abort_page</command> earlier in
@@ -118,11 +118,11 @@
 		    with the cause of the abort. 
 		</para>
 		<para>
-		    When passed the argument <option>-aborting</option> the
-		    command returns 1 if <option>abort_page</option>
-		    had been called earlier in the request processing, thus
-		    providing a tool for code in AfterEveryScript to tell
-		    if the an abort condition took place.
+		    The argument <option>-aborting</option> causes <option>abort_page</option>
+		    to return 1 when the current execution is the outcome of an abort condition.
+		    In other words this query is meaningful in code specified as 
+		    <link linkend="directives">AfterEveryScript</link> to understand
+		    if an abort condition took place beforehand.
 		</para>
 	  </refsect1>
 	</refentry>

Modified: tcl/rivet/branches/2.1/rivet/packages/dio/dio.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/rivet/packages/dio/dio.tcl?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/rivet/packages/dio/dio.tcl (original)
+++ tcl/rivet/branches/2.1/rivet/packages/dio/dio.tcl Mon Feb 11 16:39:17 2013
@@ -448,7 +448,7 @@ proc handle {interface args} {
 	$res destroy
 
 	if {$numrows} {
-            $this update $arrayName $args
+            $this update $arrayName {*}$args
 	} else {
             $this insert $myTable $arrayName
 	}

Modified: tcl/rivet/branches/2.1/rivet/rivet-tcl/tclIndex
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/rivet/rivet-tcl/tclIndex?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/rivet/rivet-tcl/tclIndex (original)
+++ tcl/rivet/branches/2.1/rivet/rivet-tcl/tclIndex Mon Feb 11 16:39:17 2013
@@ -26,3 +26,4 @@ set auto_index(::rivet::wrapline) [list 
 set auto_index(::rivet::parray_table) [list source [file join $dir parray_table.tcl]]
 set auto_index(::rivet::load_cookies) [list source [file join $dir load_cookies.tcl]]
 set auto_index(::rivet::http_accept) [list source [file join $dir http_accept.tcl]]
+set auto_index(::rivet::xml) [list source [file join $dir xml.tcl]]

Modified: tcl/rivet/branches/2.1/rivet/rivet-tcl/xml.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/rivet/rivet-tcl/xml.tcl?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/rivet/rivet-tcl/xml.tcl (original)
+++ tcl/rivet/branches/2.1/rivet/rivet-tcl/xml.tcl Mon Feb 11 16:39:17 2013
@@ -13,8 +13,8 @@
 #
 # Example 3
 #
-# ::rivet::xml "anything ..." div [list a href "http://..../" alt "alternate message"] 
-# <== <div><a href="http://..../" alt="alternate message">anything ...</a></div>
+# ::rivet::xml "anything ..." div [list a href "http://..../" title "info message"] 
+# <== <div><a href="http://..../" title="info message">anything ...</a></div>
 #
 # $Id: $
 #

Modified: tcl/rivet/branches/2.1/src/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/Makefile.am?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/Makefile.am (original)
+++ tcl/rivet/branches/2.1/src/Makefile.am Mon Feb 11 16:39:17 2013
@@ -20,5 +20,5 @@ SUBDIRS = librivet parser @apache_versio
 
 install-data-hook:
 	echo 'removing unwanted libtool .la files'
-	rm -fv $(DESTDIR)/$(lib_libexecdir)/*.la
+	rm -f $(DESTDIR)/$(lib_libexecdir)/*.la
 

Modified: tcl/rivet/branches/2.1/src/apache-2/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/Makefile.am?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/Makefile.am (original)
+++ tcl/rivet/branches/2.1/src/apache-2/Makefile.am Mon Feb 11 16:39:17 2013
@@ -53,6 +53,6 @@ mod_rivet_la_CPPFLAGS = @TCL_INCLUDES@ @
 
 install-data-hook:
 	echo 'removing unwanted libtool .la files'
-	rm -fv $(DESTDIR)/$(apxs_libexecdir)/*.la
+	rm -f $(DESTDIR)/$(apxs_libexecdir)/*.la
 
 

Modified: tcl/rivet/branches/2.1/src/apache-2/apache_request.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/apache_request.c?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/apache_request.c (original)
+++ tcl/rivet/branches/2.1/src/apache-2/apache_request.c Mon Feb 11 16:39:17 2013
@@ -378,21 +378,28 @@ int ApacheRequest___parse(ApacheRequest 
         req->nargs = ((apr_array_header_t *)req->parms)->nelts;
     }
 
-    if (r->method_number == M_POST) {
+    if (r->method_number == M_POST || r->method_number == M_PUT || r->method_number == M_DELETE) {
         const char *ct = apr_table_get(r->headers_in, "Content-type");
-        if (ct) ap_log_rerror(REQ_INFO, "content-type: `%s'", ct);
-        if (ct && strncaseEQ(ct, DEFAULT_ENCTYPE, DEFAULT_ENCTYPE_LENGTH)) {
-            result = ApacheRequest_parse_urlencoded(req);
-        } else if (ct && strncaseEQ(ct, TEXT_XML_ENCTYPE, TEXT_XML_ENCTYPE_LENGTH)) {
-            result = ApacheRequest_parse_urlencoded(req);
-        } else if (ct && strncaseEQ(ct, MULTIPART_ENCTYPE, MULTIPART_ENCTYPE_LENGTH)) {
-            result = ApacheRequest_parse_multipart(req,ct);
+        if (ct)
+        {
+            ap_log_rerror(REQ_INFO, "content-type: `%s'", ct);
+            if (strncaseEQ(ct, MULTIPART_ENCTYPE, MULTIPART_ENCTYPE_LENGTH))
+            {
+                result = ApacheRequest_parse_multipart(req,ct);
+            }
+            else
+            {
+                result = ApacheRequest_parse_urlencoded(req);
+            }
+
         } else {
-            ap_log_rerror(REQ_ERROR, "unknown content-type: `%s'", ct);
+            ap_log_rerror(REQ_ERROR, "unknown content-type");
             result = HTTP_INTERNAL_SERVER_ERROR;
         }
+
     }
-    else {
+    else
+    {
         result = ApacheRequest_parse_urlencoded(req);
     }
 
@@ -405,7 +412,7 @@ int ApacheRequest_parse_urlencoded(Apach
     request_rec *r = req->r;
     int rc = OK;
 
-    if (r->method_number == M_POST) {
+    if (r->method_number == M_POST || r->method_number == M_PUT || r->method_number == M_DELETE) {
     	const char *data = NULL, *type;
     
     	type = apr_table_get(r->headers_in, "Content-Type");

Modified: tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c (original)
+++ tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c Mon Feb 11 16:39:17 2013
@@ -370,7 +370,7 @@ Rivet_ExecuteAndCheck(Tcl_Interp *interp
             ap_assert (Tcl_ListObjIndex (interp, errorCodeListObj, 1, &errorCodeElementObj) == TCL_OK);
 
             errorCodeSubString = Tcl_GetString (errorCodeElementObj);
-            if (strcmp (errorCodeSubString, "ABORTPAGE") == 0) 
+            if (strcmp (errorCodeSubString, ABORTPAGE_CODE) == 0) 
             {
                 if (conf->rivet_abort_script) 
                 {
@@ -1252,7 +1252,7 @@ Rivet_InitHandler(apr_pool_t *pPool, apr
     rivet_panic_server_rec = s;
 
 #if RIVET_DISPLAY_VERSION
-    ap_add_version_component(pPool, RIVET_PACKAGE_NAME"/"RIVET_PACKAGE_VERSION);
+    ap_add_version_component(pPool, RIVET_PACKAGE_NAME"/"RIVET_VERSION);
 #else
     ap_add_version_component(pPool, RIVET_PACKAGE_NAME);
 #endif
@@ -1830,7 +1830,9 @@ Rivet_SendContent(request_rec *r)
 
     r->allowed |= (1 << M_GET);
     r->allowed |= (1 << M_POST);
-    if (r->method_number != M_GET && r->method_number != M_POST) {
+    r->allowed |= (1 << M_PUT);
+    r->allowed |= (1 << M_DELETE);
+    if (r->method_number != M_GET && r->method_number != M_POST && r->method_number != M_PUT && r->method_number != M_DELETE) {
         retval = DECLINED;
         goto sendcleanup;
     }
@@ -1850,9 +1852,6 @@ Rivet_SendContent(request_rec *r)
         goto sendcleanup;
     }
 
-//    apr_cpystrn(error, DEFAULT_ERROR_MSG, sizeof(error));
-//    apr_cpystrn(timefmt, DEFAULT_TIME_FORMAT, sizeof(timefmt));
-
     /* 
      * This one is the big catch when it comes to moving towards
      * Apache 2.0, or one of them, at least.

Modified: tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h (original)
+++ tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h Mon Feb 11 16:39:17 2013
@@ -140,5 +140,10 @@ Tcl_Obj* Rivet_ReadConfParameter (  Tcl_
 
 Tcl_Obj* Rivet_CurrentConfDict (    Tcl_Interp*           interp,
                                     rivet_server_conf*    rivet_conf);
+
+/* error code set by command 'abort_page' */
+
+#define ABORTPAGE_CODE "ABORTPAGE"
+
 #endif /* MOD_RIVET_H */
 

Modified: tcl/rivet/branches/2.1/src/apache-2/rivetConf.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/rivetConf.c?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/rivetConf.c (original)
+++ tcl/rivet/branches/2.1/src/apache-2/rivetConf.c Mon Feb 11 16:39:17 2013
@@ -74,7 +74,7 @@ enum confIndices {
                     separate_virtual_interps,
                     honor_header_only_requests,
                     conf_index_terminator 
-                };
+};
 
 /* 
  * -- Rivet_ReadConfParameter
@@ -203,13 +203,14 @@ Rivet_ReadConfParameter ( Tcl_Interp* in
  * Rivet_ReadConfTable: 
  * 
  * This procedure builds a key-value list from an apr table
- * It called from Rivet_BuildConfDictionary for Rivet configuration
- * tables but it could work for every apr table
+ * It's called by Rivet_BuildConfDictionary to read theRivet 
+ * configuration tables but it can work for every apr table
  *
  * Arguments:
  *
  *  - interp: Tcl_Interp pointer
  *  - table: an apr_table_t pointer
+ *
  */
 
 Tcl_Obj* Rivet_ReadConfTable (  Tcl_Interp*           interp,

Modified: tcl/rivet/branches/2.1/src/apache-2/rivetCore.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/rivetCore.c?rev=1444856&r1=1444855&r2=1444856&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/rivetCore.c (original)
+++ tcl/rivet/branches/2.1/src/apache-2/rivetCore.c Mon Feb 11 16:39:17 2013
@@ -1139,7 +1139,7 @@ TCL_CMD_HEADER( Rivet_AbortPageCmd )
     globals->page_aborting = 1;
 
     Tcl_AddErrorInfo (interp, errorMessage);
-    Tcl_SetErrorCode (interp, "RIVET", "ABORTPAGE", errorMessage, (char *)NULL);
+    Tcl_SetErrorCode (interp, "RIVET", ABORTPAGE_CODE, errorMessage, (char *)NULL);
     return TCL_ERROR;
 }
 



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