From 8e82a89a0a6bdf35cf1c84bed5e4630c94aa2c1f Mon Sep 17 00:00:00 2001 From: konn Date: Thu, 6 Jul 2006 20:52:11 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/trunk@1713 1a406e8e-add9-4483-a2c8-d8cac5b7c224 --- src/chxj_cookie.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/chxj_cookie.c b/src/chxj_cookie.c index 655e2455..f7385c32 100644 --- a/src/chxj_cookie.c +++ b/src/chxj_cookie.c @@ -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; -- 2.11.0