|
|||||||||||
|
DO NOT REPLY [Bug 12172] New: - Path specification when setting a cookie with mod_rewrite
From: <bugzilla(at)apache.org>
Date: Thu Aug 29 2002 - 13:54:27 EDT
Path specification when setting a cookie with mod_rewrite
Summary: Path specification when setting a cookie with
mod_rewrite
Product: Apache httpd-2.0
Version: 2.0.40
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Other
Component: mod_rewrite
AssignedTo: bugs@httpd.apache.org
ReportedBy: apachebugs@robcromwell.com
CC: slive@apache.org
Currently, when setting a cookie using the cookie|CO RewriteRule flag there is no ability to specify the path of the cookie. 'cookie|CO=NAME:VAL:domain[:lifetime]' (set cocookie) I suggest adding a second optional parameter to specify the path of the cookie. By adding it as an optional parameter, there won't be any conflicts with existing cookie RewriteRules. 'cookie|CO=NAME:VAL:domain[:lifetime][:path]' (set cocookie) I've modified the add_cookie function below to work with the new path field. static void add_cookie(request_rec *r, char *s) {
char *var;
char *val;
char *domain;
char *expires;
char *path;
char *tok_cntx;
if (s) {
var = apr_strtok(s, ":", &tok_cntx);
val = apr_strtok(NULL, ":", &tok_cntx);
domain = apr_strtok(NULL, ":", &tok_cntx);
expires = apr_strtok(NULL, ":", &tok_cntx);
path = apr_strtok(NULL, ":", &tok_cntx);
if (var && val && domain) {
/* FIX: use cached time similar to how logging does it */
cookie = apr_pstrcat( r->pool,
var,
"=",
val,
"; path=",
} } To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org Received on Thu Aug 29 17:58:18 2002 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 16:43:50 EDT |
||||||||||
|
|||||||||||