Support multiple set-cookie calls.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sat, 2 Apr 2005 07:16:40 +0000 (07:16 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sat, 2 Apr 2005 07:16:40 +0000 (07:16 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1486 cb58f699-b61c-0410-a6fe-9272a202ed29

apache/mod_apache.cpp

index 0e947fa..4f628fd 100644 (file)
@@ -265,13 +265,13 @@ public:
                     APLOG_ERR)))|APLOG_NOERRNO, SH_AP_R(m_req),
                  msg.c_str());
   }
-  virtual string getCookies(void) {
+  virtual string getCookies(void) const {
     const char *c = ap_table_get(m_req->headers_in, "Cookie");
     return string(c ? c : "");
   }
   virtual void setCookie(const string &name, const string &value) {
     char* val = ap_psprintf(m_req->pool, "%s=%s", name.c_str(), value.c_str());
-    ap_table_setn(m_req->err_headers_out, "Set-Cookie", val);
+    ap_table_addn(m_req->err_headers_out, "Set-Cookie", val);
   }
   virtual string getArgs(void) { return string(m_req->args ? m_req->args : ""); }
   virtual string getPostData(void) {