OSDN Git Service

*** empty log message ***
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Thu, 6 Jul 2006 20:52:11 +0000 (20:52 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Thu, 6 Jul 2006 20:52:11 +0000 (20:52 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/trunk@1713 1a406e8e-add9-4483-a2c8-d8cac5b7c224

src/chxj_cookie.c

index 655e245..f7385c3 100644 (file)
@@ -26,6 +26,7 @@
 #include "apr_uuid.h"
 #include "apr_md5.h"
 #include "apr_base64.h"
+#include "apr_uri.h"
 
 static char* s_get_hostname_from_url(request_rec* r, char* value);
 static char* s_cut_until_end_hostname(request_rec*, char* value);
@@ -55,6 +56,7 @@ chxj_save_cookie(request_rec* r)
   int                 has_cookie = 0;
   cookie_t*           cookie;
   cookie_t*           old_cookie;
+  char*               refer_string;
 
 
   DBG(r, "start chxj_save_cookie()");
@@ -75,6 +77,13 @@ chxj_save_cookie(request_rec* r)
     return NULL;
   }
 
+  refer_string = apr_psprintf(r->pool, 
+                              "CHXJ_REFER=%s", 
+                              apr_uri_unparse(r->pool,
+                                              &r->parsed_uri,
+                                              APR_URI_UNP_OMITQUERY));
+  apr_table_setn(r->headers_out, "Set-Cookie", refer_string);
+
 
   headers = (apr_array_header_t*)apr_table_elts(r->headers_out);
   hentryp = (apr_table_entry_t*)headers->elts;