From 4925e34369d8915266aea490c689f9246cc3f408 Mon Sep 17 00:00:00 2001 From: olavmrk Date: Mon, 14 May 2012 10:14:33 +0000 Subject: Add support for double-quoted cookie values. JMeter may apparently use this. git-svn-id: https://modmellon.googlecode.com/svn/trunk@157 a716ebb1-153a-0410-b759-cfb97c6a1b53 --- auth_mellon_cookie.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/auth_mellon_cookie.c b/auth_mellon_cookie.c index 102e583..ae1cc63 100644 --- a/auth_mellon_cookie.c +++ b/auth_mellon_cookie.c @@ -113,7 +113,17 @@ const char *am_cookie_get(request_rec *r) */ value += strlen(name) + 1; + /* The cookie value may be double-quoted. */ + if(*value == '"') { + value += 1; + } + buffer = apr_pstrdup(r->pool, value); + end = strchr(buffer, '"'); + if(end) { + /* Double-quoted string. */ + *end = '\0'; + } end = strchr(buffer, ';'); if(end) { *end = '\0'; -- cgit