summaryrefslogtreecommitdiffstats
path: root/modules/mappers/mod_rewrite.h
diff options
context:
space:
mode:
authorIan Holsman <ianh@apache.org>2002-06-22 05:36:57 +0200
committerIan Holsman <ianh@apache.org>2002-06-22 05:36:57 +0200
commitdd2ac7d1c885674b41968605348083b53e9430fe (patch)
tree071615f6298cc5ae076d562fd3fc6623128e874a /modules/mappers/mod_rewrite.h
parentFixing up some copy commands in the NetWare make files during the install (diff)
downloadapache2-dd2ac7d1c885674b41968605348083b53e9430fe.tar.xz
apache2-dd2ac7d1c885674b41968605348083b53e9430fe.zip
new configuration option for mod_rewrite to set cookies.
configuration is like the following RewriteRule (.*) - [CO=<cookiename>:$1:<domain>:<expiry in minutes>] Submitted by: Brian Degenhardt <bmd@mp3.com> Reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95840 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/mappers/mod_rewrite.h')
-rw-r--r--modules/mappers/mod_rewrite.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/mappers/mod_rewrite.h b/modules/mappers/mod_rewrite.h
index 7d7661dea9..6e9a848e77 100644
--- a/modules/mappers/mod_rewrite.h
+++ b/modules/mappers/mod_rewrite.h
@@ -231,9 +231,14 @@
#endif
#define MAX_ENV_FLAGS 15
+#define MAX_COOKIE_FLAGS 15
+/*** max cookie size in rfc 2109 ***/
+#define MAX_COOKIE_LEN 4096
#define MAX_NMATCH 10
+
+
/*
**
** our private data structures we handle with
@@ -272,6 +277,7 @@ typedef struct {
char *forced_mimetype; /* forced MIME type of substitution */
int forced_responsecode; /* forced HTTP redirect response status */
char *env[MAX_ENV_FLAGS+1]; /* added environment variables */
+ char *cookie[MAX_COOKIE_FLAGS+1]; /* added cookies */
int skip; /* number of next rules to skip */
} rewriterule_entry;
@@ -414,6 +420,8 @@ static void do_expand(request_rec *r, char *input, char *buffer, int nbuf,
backrefinfo *briRR, backrefinfo *briRC);
static void do_expand_env(request_rec *r, char *env[],
backrefinfo *briRR, backrefinfo *briRC);
+static void do_expand_cookie(request_rec *r, char *cookie[],
+ backrefinfo *briRR, backrefinfo *briRC);
/* URI transformation function */
static void splitout_queryargs(request_rec *r, int qsappend);
@@ -481,6 +489,7 @@ static char *subst_prefix_path(request_rec *r, char *input, char *match,
static int parseargline(char *str, char **a1, char **a2, char **a3);
static int prefix_stat(const char *path, apr_finfo_t *sb);
static void add_env_variable(request_rec *r, char *s);
+static void add_cookie(request_rec *r, char *s);
static int subreq_ok(request_rec *r);
/* Lexicographic Comparison */