[cpp-sp] branch master updated: Stop adding colon to header names.
Scott Cantor
cantor.2 at osu.edu
Wed May 23 16:41:21 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=f6b0644028cbe186ccc66bd818ad047cc7e0c714
The following commit(s) were added to refs/heads/master by this push:
new f6b0644 Stop adding colon to header names.
f6b0644 is described below
commit f6b0644028cbe186ccc66bd818ad047cc7e0c714
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed May 23 16:41:11 2018 -0400
Stop adding colon to header names.
---
iis7_shib/IIS7Request.cpp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/iis7_shib/IIS7Request.cpp b/iis7_shib/IIS7Request.cpp
index 13075dc..0344760 100644
--- a/iis7_shib/IIS7Request.cpp
+++ b/iis7_shib/IIS7Request.cpp
@@ -140,8 +140,7 @@ IIS7Request::IIS7Request(IHttpContext *pHttpContext, IHttpEventProvider *pEventP
void IIS7Request::setHeader(const char* name, const char* value)
{
if (m_useHeaders) {
- const string hdr = g_bSafeHeaderNames ? makeSafeHeader(name) : (string(name) + ':');
- const HRESULT hr (m_request->SetHeader(hdr.c_str(), value, static_cast<USHORT>(strlen(value)), TRUE));
+ const HRESULT hr (m_request->SetHeader(g_bSafeHeaderNames ? makeSafeHeader(name).c_str() : name, value, static_cast<USHORT>(strlen(value)), TRUE));
if (FAILED(hr)) {
throwError("setHeader (Header)", hr);
}
@@ -273,8 +272,7 @@ string IIS7Request::getRemoteAddr() const
string IIS7Request::getSecureHeader(const char* name) const
{
- string hdr = g_bSafeHeaderNames ? makeSafeHeader(name) : (string(name) + ':');
- PCSTR p = m_request->GetHeader(hdr.c_str());
+ PCSTR p = m_request->GetHeader(g_bSafeHeaderNames ? makeSafeHeader(name).c_str() : name);
return (nullptr == p) ? "" : p;
}
//
@@ -452,7 +450,7 @@ string IIS7Request::makeSafeHeader(const char* rawname) const
if (isalnum(*rawname))
hdr += *rawname;
}
- return (hdr + ':');
+ return hdr;
}
// TODO We need a strategy for what is logged, what is fatal and how.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list