https://issues.shibboleth.net/jira/browse/SSPCPP-162
authorScott Cantor <cantor.2@osu.edu>
Sat, 18 Oct 2008 02:10:52 +0000 (02:10 +0000)
committerScott Cantor <cantor.2@osu.edu>
Sat, 18 Oct 2008 02:10:52 +0000 (02:10 +0000)
apache/mod_apache.cpp

index ca2a99c..af2c2ea 100644 (file)
@@ -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) : "");