[interchange-cvs] interchange - kwalsh modified 3 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Mon Jan 13 12:43:00 2003


User:      kwalsh
Date:      2003-01-13 17:42:55 GMT
Modified:  dist/src/mod_interchange README mod_interchange.html
Modified:           mod_interchange.c
Log:
	* Fixed a bug reported by Jeff Dafoe.  The request information
	  enabled Interchange to show the correct page but prevented it
	  from storing the request in the session's history.  The problem
	  only showed itself when Interchange's [history-scan] tag was used.
	  As almost no page history was saved, [history-scan] sent the user
	  to the default page (usually index) most of the time.  This bug
	  seems to have originated in version 1.28.

Revision  Changes    Path
2.7       +1 -1      interchange/dist/src/mod_interchange/README


rev 2.7, prev_rev 2.6
Index: README
===================================================================
RCS file: /var/cvs/interchange/dist/src/mod_interchange/README,v
retrieving revision 2.6
retrieving revision 2.7
diff -u -r2.6 -r2.7
--- README	9 Jan 2003 04:54:26 -0000	2.6
+++ README	13 Jan 2003 17:42:51 -0000	2.7
@@ -1,9 +1,9 @@
 mod_interchange
 ===============
 
-$Id: README,v 2.6 2003/01/09 04:54:26 kwalsh Exp $
+$Id: README,v 2.7 2003/01/13 17:42:51 kwalsh Exp $
 
-Version: 1.28
+Version: 1.29
 
 Description
 -----------



2.8       +23 -4     interchange/dist/src/mod_interchange/mod_interchange.html


rev 2.8, prev_rev 2.7
Index: mod_interchange.html
===================================================================
RCS file: /var/cvs/interchange/dist/src/mod_interchange/mod_interchange.html,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- mod_interchange.html	9 Jan 2003 04:54:26 -0000	2.7
+++ mod_interchange.html	13 Jan 2003 17:42:51 -0000	2.8
@@ -1,17 +1,17 @@
-<!-- $Id: mod_interchange.html,v 2.7 2003/01/09 04:54:26 kwalsh Exp $ -->
+<!-- $Id: mod_interchange.html,v 2.8 2003/01/13 17:42:51 kwalsh Exp $ -->
 <html>
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-   <title>Apache module: mod_interchange (version 1.28)</title>
+   <title>Apache module: mod_interchange (version 1.29)</title>
 </head>
 <body bgcolor="#FFFFFF" text="#000000">
-    <h1>Apache module: mod_interchange (version 1.28)</h1>
+    <h1>Apache module: mod_interchange (version 1.29)</h1>
     <h2>Apache link module for Interchange</h2>
     <p>
 	This module replaces the <i>tlink</i> and <i>vlink</i> programs
 	that come with <a href="http://www.icdevgroup.org/">Interchange</a>.&nbsp;
 	It has been tested with all Interchange versions up to and
-	including 4.9.5 (development).&nbsp;
+	including 4.9.6 (development).&nbsp;
 	Although this module is known to have worked with MiniVend versions 3
 	and 4, its current compatibility has not been tested.
     </p>
@@ -195,12 +195,31 @@
     <h2><a name="changelog">Change Log</a></h2>
     <ul>
 	<li>
+	    1.29
+	    (Thu 09 Jan 2003)
+	    Kevin Walsh &lt;kevin@cursor.biz&gt;<br>
+	    <ul>
+		<li>
+		    Fixed a bug reported by Jeff Dafoe.&nbsp;
+		    The request information enabled Interchange to show the
+		    correct page but prevented it from storing the request in
+		    the session's history.&nbsp;
+		    The problem only showed itself when Interchange's
+		    [history-scan] tag was used.&nbsp;
+		    As almost no page history was saved, [history-scan] sent
+		    the user to the default page (usually index) most of the
+		    time.&nbsp;
+		    This bug seems to have originated in version 1.28.
+		</li>
+	    </ul>
+	    <br>
+	</li><li>
 	    1.28
 	    (Thu 09 Jan 2003)
 	    Kevin Walsh &lt;kevin@cursor.biz&gt;<br>
 	    <ul>
 		<li>
-		    Fixed a weird bug where null HTTP variables were being
+		    Fixed a weird bug where empty HTTP variables were being
 		    passed under certain circumstances.
 		</li>
 	    </ul>



2.8       +9 -13     interchange/dist/src/mod_interchange/mod_interchange.c


rev 2.8, prev_rev 2.7
Index: mod_interchange.c
===================================================================
RCS file: /var/cvs/interchange/dist/src/mod_interchange/mod_interchange.c,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- mod_interchange.c	9 Jan 2003 04:54:26 -0000	2.7
+++ mod_interchange.c	13 Jan 2003 17:42:51 -0000	2.8
@@ -1,11 +1,10 @@
+#define	MODULE_VERSION	"mod_interchange/1.29"
 /*
- *	$Id: mod_interchange.c,v 2.7 2003/01/09 04:54:26 kwalsh Exp $
+ *	$Id: mod_interchange.c,v 2.8 2003/01/13 17:42:51 kwalsh Exp $
  *
  *	Apache Module implementation of the Interchange application server
  *	link programs.
  *
- *	Version: 1.28
- *
  *	Author: Kevin Walsh <kevin@cursor.biz>
  *	Based on original code by Francis J. Lacoste <francis.lacoste@iNsu.COM>
  *
@@ -42,8 +41,6 @@
 #include <sys/un.h>
 #include <unistd.h>
 
-#define	MODULE_VERSION	"mod_interchange/1.28"
-
 #ifdef	OSX
 typedef long socklen_t;
 #endif
@@ -491,6 +488,7 @@
 	redirect_url[0] = '\0';
 	for (e = env; *e != NULL; e++){
 		int len;
+
 		if (strncmp(*e,"PATH_INFO=",10) == 0)
 			continue;
 		if (strncmp(*e,"REDIRECT_URL=",13) == 0){
@@ -505,11 +503,10 @@
 			if (*(*e + 12 + conf_rec->loclen) == '/')
 				*(*e + 12 + conf_rec->loclen) = '\0';
 		}
-		if (len = strlen(*e)){
-			if (ap_bprintf(ic_buff,"%d %s\n",len,*e) < 0){
-				ap_log_reason("error writing to Interchange",r->uri,r);
-				return HTTP_INTERNAL_SERVER_ERROR;
-			}
+		len = strlen(*e);
+		if (len && ap_bprintf(ic_buff,"%d %s\n",len,*e) < 0){
+			ap_log_reason("error writing to Interchange",r->uri,r);
+			return HTTP_INTERNAL_SERVER_ERROR;
 		}
 		ap_reset_timeout(r);
 	}
@@ -519,7 +516,7 @@
 		rp++;
 
 	if (strncmp(rp,conf_rec->location,conf_rec->loclen) == 0)
-		rp += conf_rec->loclen;
+		rp += (conf_rec->loclen - 1);
 
 	strcpy(request_uri,rp);
 	for (rp = request_uri; *rp != '\0'; rp++){
@@ -552,9 +549,8 @@
 		while (*rp == '/')
 			rp++;
 
-		if (strncmp(rp,conf_rec->location,conf_rec->loclen) == 0){
-			rp += conf_rec->loclen;
-		}
+		if (strncmp(rp,conf_rec->location,conf_rec->loclen) == 0)
+			rp += (conf_rec->loclen - 1);
 
 		strcpy(redirect_url,rp);
 		for (rp = redirect_url; *rp != '\0'; rp++){