[cpp-sp] 01/03: Implement a random request ID.
Codeberg
noreply at shibboleth.net
Tue Jun 16 17:04:55 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository cpp-sp.
View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/77c695eacdc071797c6849171e818a5cf7932990
commit 77c695eacdc071797c6849171e818a5cf7932990
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jun 16 13:04:06 2026 -0400
Implement a random request ID.
---
iis/IIS7Request.cpp | 7 +++----
iis/headers/IIS7Request.hpp | 1 +
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/iis/IIS7Request.cpp b/iis/IIS7Request.cpp
index 1ee056ee..63f2dd9f 100644
--- a/iis/IIS7Request.cpp
+++ b/iis/IIS7Request.cpp
@@ -30,7 +30,8 @@ using namespace Config;
IIS7Request::IIS7Request(IHttpContext *pHttpContext, IHttpEventProvider *pEventProvider, bool checkUser, const PropertySet& site)
: AbstractSPRequest(SHIBSP_LOGCAT ".IIS"),
m_ctx(pHttpContext), m_request(pHttpContext->GetRequest()), m_response(pHttpContext->GetResponse()), m_site(site),
- m_firsttime(true), m_port(0), m_gotBody(false), m_event(pEventProvider)
+ m_firsttime(true), m_port(0), m_gotBody(false), m_event(pEventProvider),
+ m_traceID(AgentConfig::getConfig().generateRandom(8))
{
DWORD len;
PCSTR var;
@@ -157,9 +158,7 @@ IIS7Request::IIS7Request(IHttpContext *pHttpContext, IHttpEventProvider *pEventP
const char* IIS7Request::getRequestID() const
{
- // TODO: Use AgentConfig generateRandom if IIS has nothing to use, would store
- // off in string member and just return that here.
- return nullptr;
+ return m_traceID.c_str();
}
bool IIS7Request::isUseHeaders() const
diff --git a/iis/headers/IIS7Request.hpp b/iis/headers/IIS7Request.hpp
index 1cca01b7..60dbf14a 100644
--- a/iis/headers/IIS7Request.hpp
+++ b/iis/headers/IIS7Request.hpp
@@ -33,6 +33,7 @@ private:
mutable vector<string> m_certs;
mutable string m_body;
mutable bool m_gotBody;
+ mutable string m_traceID;
string m_allhttp;
set<string> m_roleAttributeNames;
set<wstring> m_roles;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list