OSDN Git Service

* Fixed bug.
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Wed, 28 May 2008 18:18:24 +0000 (18:18 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Wed, 28 May 2008 18:18:24 +0000 (18:18 +0000)
    - Set-Cookie is not executed at CGI.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/trunk@2669 1a406e8e-add9-4483-a2c8-d8cac5b7c224

ChangeLog
configure
configure.ac
debian-sarge/changelog
debian/changelog
include/config.h
src/chxj_cookie.c

index 7827a87..2072843 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+libapache2-mod-chxj (0.12.1-1) unstable; urgency=low
+
+  * Fixed bug.
+    - Set-Cookie is not executed at CGI.
+      (Reported by R.Komoriya. thanks!)
+
+ -- Atsushi Konno <konn@users.sourceforge.jp>  Thu, 29 May 2008 03:11:16 +0900
+
 libapache2-mod-chxj (0.12.0-1) unstable; urgency=low
 
   * Fixed bug.
index 701f437..810b149 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for mod_chxj 0.13.0-1.
+# Generated by GNU Autoconf 2.61 for mod_chxj 0.12.1-1.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='mod_chxj'
 PACKAGE_TARNAME='mod_chxj'
-PACKAGE_VERSION='0.13.0-1'
-PACKAGE_STRING='mod_chxj 0.13.0-1'
+PACKAGE_VERSION='0.12.1-1'
+PACKAGE_STRING='mod_chxj 0.12.1-1'
 PACKAGE_BUGREPORT=''
 
 ac_unique_file="src/mod_chxj.c"
@@ -1405,7 +1405,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mod_chxj 0.13.0-1 to adapt to many kinds of systems.
+\`configure' configures mod_chxj 0.12.1-1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1476,7 +1476,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mod_chxj 0.13.0-1:";;
+     short | recursive ) echo "Configuration of mod_chxj 0.12.1-1:";;
    esac
   cat <<\_ACEOF
 
@@ -1592,7 +1592,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mod_chxj configure 0.13.0-1
+mod_chxj configure 0.12.1-1
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1606,7 +1606,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mod_chxj $as_me 0.13.0-1, which was
+It was created by mod_chxj $as_me 0.12.1-1, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2424,7 +2424,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=mod_chxj
- VERSION=0.13.0-1
+ VERSION=0.12.1-1
 
 
 cat >>confdefs.h <<_ACEOF
@@ -21835,7 +21835,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mod_chxj $as_me 0.13.0-1, which was
+This file was extended by mod_chxj $as_me 0.12.1-1, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21888,7 +21888,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-mod_chxj config.status 0.13.0-1
+mod_chxj config.status 0.12.1-1
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
index deb31ca..68e2a28 100644 (file)
@@ -1,6 +1,6 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
-AC_INIT([mod_chxj],[0.13.0-1])
+AC_INIT([mod_chxj],[0.12.1-1])
 AC_PREREQ(2.59)
 AC_CONFIG_SRCDIR([src/mod_chxj.c])
 AC_CANONICAL_TARGET
index 356fd7a..9f4554c 100644 (file)
@@ -1,3 +1,11 @@
+libapache2-mod-chxj (0.12.1-1) unstable; urgency=low
+
+  * Fixed bug.
+    - Set-Cookie is not executed at CGI.
+      (Reported by R.Komoriya. thanks!)
+
+ -- Atsushi Konno <konn@users.sourceforge.jp>  Thu, 29 May 2008 03:11:16 +0900
+
 libapache2-mod-chxj (0.12.0-1) unstable; urgency=low
 
   * Fixed bug.
index 356fd7a..feedf69 100644 (file)
@@ -1,3 +1,11 @@
+libapache2-mod-chxj (0.12.1-1) unstable; urgency=low
+
+  * Fixed bug. 
+    - Set-Cookie is not executed at CGI.
+      (Reported by R.Komoriya. thanks!)
+
+ -- Atsushi Konno <konn@users.sourceforge.jp>  Thu, 29 May 2008 03:11:16 +0900
+
 libapache2-mod-chxj (0.12.0-1) unstable; urgency=low
 
   * Fixed bug.
index e6bba9f..a1216f1 100644 (file)
 #define PACKAGE_NAME "mod_chxj"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "mod_chxj 0.13.0-1"
+#define PACKAGE_STRING "mod_chxj 0.12.1-1"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "mod_chxj"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.13.0-1"
+#define PACKAGE_VERSION "0.12.1-1"
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "0.13.0-1"
+#define VERSION "0.12.1-1"
 
 /* Define to empty if `const' does not conform to ANSI C. */
 /* #undef const */
index 7ffe72b..9319221 100644 (file)
@@ -99,6 +99,8 @@ chxj_save_cookie(request_rec *r)
   int                 ii;
   apr_array_header_t  *headers;
   apr_table_entry_t   *hentryp;
+  apr_array_header_t  *err_headers;
+  apr_table_entry_t   *err_hentryp;
   char                *old_cookie_id;
   char                *store_string;
   mod_chxj_config     *dconf;
@@ -135,6 +137,8 @@ chxj_save_cookie(request_rec *r)
 
   headers = (apr_array_header_t*)apr_table_elts(r->headers_out);
   hentryp = (apr_table_entry_t*)headers->elts;
+  err_headers = (apr_array_header_t*)apr_table_elts(r->err_headers_out);
+  err_hentryp = (apr_table_entry_t*)err_headers->elts;
 
 
   new_cookie_table = apr_table_make(r->pool, 0);
@@ -163,7 +167,32 @@ chxj_save_cookie(request_rec *r)
       DBG(r, "=====================================");
     }
   }
+  for (ii=0; ii<err_headers->nelts; ii++) {
+    if (strcasecmp(err_hentryp[ii].key, "Set-Cookie") == 0) {
+      DBG(r, "=====================================");
+      DBG(r, "cookie=[%s:%s]", err_hentryp[ii].key, err_hentryp[ii].val);
+
+      char* key;
+      char* val;
+      char* buff;
+
+
+      buff = apr_pstrdup(r->pool, err_hentryp[ii].val);
+      val = strchr(buff, '=');
+      if (val) {
+        key = buff;
+        *val++ = 0;
+        apr_table_add(new_cookie_table, key, val);
+        if (strcasecmp(REFERER_COOKIE_KEY, key) == 0) has_refer++;
+        
+      }
+
+      has_cookie = 1;
+      DBG(r, "=====================================");
+    }
+  }
   apr_table_unset(r->headers_out, "Set-Cookie");
+  apr_table_unset(r->err_headers_out, "Set-Cookie");
 
   if (! has_refer) {
     apr_uri_parse(r->pool,r->uri, &parsed_uri);