From: cantor Date: Sat, 18 Oct 2008 02:10:52 +0000 (+0000) Subject: https://bugs.internet2.edu/jira/browse/SSPCPP-162 X-Git-Tag: 2.4~401 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=58b50443aa47030d790b11050c239b6cf043101c;p=shibboleth%2Fsp.git https://bugs.internet2.edu/jira/browse/SSPCPP-162 git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@2898 cb58f699-b61c-0410-a6fe-9272a202ed29 --- diff --git a/apache/mod_apache.cpp b/apache/mod_apache.cpp index ca2a99c..af2c2ea 100644 --- a/apache/mod_apache.cpp +++ b/apache/mod_apache.cpp @@ -499,6 +499,15 @@ public: } void setRemoteUser(const char* user) { SH_AP_USER(m_req) = user ? ap_pstrdup(m_req->pool, user) : NULL; + if (m_dc->bUseHeaders == 1) { + if (user) { + ap_table_set(m_req->headers_in, "REMOTE_USER", user); + } + else { + ap_table_unset(m_req->headers_in, "REMOTE_USER"); + ap_table_set(m_req->headers_in, "REMOTE_USER", g_unsetHeaderValue.c_str()); + } + } } string getRemoteUser() const { return string(SH_AP_USER(m_req) ? SH_AP_USER(m_req) : "");