From: Scott Cantor Date: Thu, 7 Aug 2008 15:37:23 +0000 (+0000) Subject: https://issues.shibboleth.net/jira/browse/SSPCPP-129 X-Git-Tag: 2.1.0~9 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=a447a7093c6fe9cc1b3834facc57e8580323c0f9;p=shibboleth%2Fcpp-sp.git https://issues.shibboleth.net/jira/browse/SSPCPP-129 --- diff --git a/fastcgi/shibauthorizer.cpp b/fastcgi/shibauthorizer.cpp index 4661ee8..db51ad1 100644 --- a/fastcgi/shibauthorizer.cpp +++ b/fastcgi/shibauthorizer.cpp @@ -133,11 +133,20 @@ public: m_request_headers.erase(name); } virtual string getHeader(const char* name) const { + // Look in the local map first. map::const_iterator i = m_request_headers.find(name); if (i != m_request_headers.end()) return i->second; - else - return ""; + // Nothing set locally, so try the request. + string hdr("HTTP_"); + for (; *name; ++name) { + if (*name=='-') + hdr += '_'; + else + hdr += toupper(*name); + } + char* s = FCGX_GetParam(hdr.c_str(), m_req->envp); + return s ? s : ""; } void setRemoteUser(const char* user) { if (user)