- From: Xavier Beaudouin <kiwi AT cvs.caudiumforge.net>
- To: caudium-commits AT caudium.net
- Subject: CVS: caudium/src/cmods/_Caudium caudium.c,1.144.2.6,1.144.2.7
- Date: Fri, 24 Sep 2004 19:55:20 +0200
Update of /cvs/caudium/caudium/src/cmods/_Caudium
In directory cvs.caudiumforge.net:/tmp/cvs-serv55926
Modified Files:
Tag: stable_1_4
caudium.c
Log Message:
Keep in sync from 1.5 tree
Index: caudium.c
===================================================================
RCS file: /cvs/caudium/caudium/src/cmods/_Caudium/caudium.c,v
retrieving revision 1.144.2.6
retrieving revision 1.144.2.7
diff -u -r1.144.2.6 -r1.144.2.7
--- caudium.c 22 Sep 2004 13:20:14 -0000 1.144.2.6
+++ caudium.c 24 Sep 2004 17:55:18 -0000 1.144.2.7
@@ -18,11 +18,11 @@
*
*/
/*
- * $Id: caudium.c,v 1.144.2.6 2004/09/22 13:20:14 grendel Exp $
+ * $Id: caudium.c,v 1.144.2.7 2004/09/24 17:55:18 kiwi Exp $
*/
#include "global.h"
-RCSID("$Id: caudium.c,v 1.144.2.6 2004/09/22 13:20:14 grendel Exp $");
+RCSID("$Id: caudium.c,v 1.144.2.7 2004/09/24 17:55:18 kiwi Exp $");
#include "caudium_util.h"
#include "caudium_machine.h"
#include "entparse.h"
@@ -71,7 +71,7 @@
/*
**! file: Caudium/caudium.c
**! Caudium specific classes and functions.
-**! cvs_version: $Id: caudium.c,v 1.144.2.6 2004/09/22 13:20:14 grendel Exp $
+**! cvs_version: $Id: caudium.c,v 1.144.2.7 2004/09/24 17:55:18 kiwi Exp $
*/
/*
@@ -976,12 +976,16 @@
name = ptr = (unsigned char *)query->str;
equal = NULL;
for(; ptr <= end; ptr++) {
+ /* printf("ptr:%c\t(%d)\n", *ptr, ptr); */
switch(*ptr)
{
case '=':
/* Allow an unencoded '=' in the value. It's invalid but... */
if(equal == NULL)
+ {
equal=ptr;
+ /* printf("found '=', setting equal:%s\n", equal); */
+ }
break;
case '\0':
if(ptr != end)
@@ -989,12 +993,14 @@
case ';': /* It's recommended to support ';'
instead of '&' in query strings... */
case '&':
- if (name && (!*name || *name == '&')) {
- ptr++;
- break; /* &=, ignore */
- }
+ if (name && (!*name || *name == '&')) {
+ /* printf("ignoring &=\n"); */
+ ptr++;
+ break; /* &=, ignore */
+ }
if (equal == NULL) { /* valueless variable, these go to the */
+ /* printf("equal is NULL\n"); */
if (ptr == (unsigned char*)query->str) {
ptr++;
break;
@@ -1014,12 +1020,16 @@
if (name < (unsigned char*)query->str)
name++;
namelen = ptr - name;
+ /* printf("name:%s, namelen:%d\n", name, namelen); */
} else {
+ /* printf("equal:%s, name:%s\n", equal, name); */
namelen = equal - name;
valulen = ptr - ++equal;
+ /* printf("namelen:%d, valuelen: %d\n", namelen, valulen); */
}
skey.u.string = url_decode(name, namelen, 0, 0);
+ /* printf("skey.u.string: %s\n", skey.u.string); */
if (!skey.u.string) /* OOM. Bail out */
Pike_error("Out of memory.\n");
@@ -1615,7 +1625,10 @@
char date[sizeof "01/Dec/2002:16:22:43 +0100"];
struct pike_string *ret;
INT_TYPE timestamp;
-
+#if !defined(HAVE_STRFTIME) || !defined(STRFTIME_SUPPORTS_Z)
+ long diff;
+ int sign;
+#endif
switch(args) {
default:
Pike_error("Wrong number of arguments _Caudium.cern_http_date().
Expected at most 1 argument.\n");
@@ -1663,8 +1676,6 @@
}
#if !defined(HAVE_STRFTIME) || !defined(STRFTIME_SUPPORTS_Z)
- long diff;
- int sign;
#ifdef STRUCT_TM_TM_GMTOFF
diff = -(tm->tm_gmtoff) / 60L;
#elif defined(HAVE_SCALAR_TIMEZONE)
- CVS: caudium/src/cmods/_Caudium caudium.c,1.144.2.6,1.144.2.7, Xavier Beaudouin
Archive powered by MhonArc 2.6.10.