[cpp-sp] branch main updated: Optimize remoted HTTP request content.

Codeberg noreply at shibboleth.net
Wed Jun 10 15:46:05 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/66150606ffdde7c700b3956b3eec5e3843667774

The following commit(s) were added to refs/heads/main by this push:
     new 66150606 Optimize remoted HTTP request content.
66150606 is described below

commit 66150606ffdde7c700b3956b3eec5e3843667774
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Wed Jun 10 11:45:42 2026 -0400

    Optimize remoted HTTP request content.
---
 shibsp/handler/impl/AbstractHandler.cpp | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/shibsp/handler/impl/AbstractHandler.cpp b/shibsp/handler/impl/AbstractHandler.cpp
index f4141352..4bea8e46 100644
--- a/shibsp/handler/impl/AbstractHandler.cpp
+++ b/shibsp/handler/impl/AbstractHandler.cpp
@@ -153,8 +153,16 @@ DDF AbstractHandler::wrapRequest(const SPRequest& request, const set<string>& he
     in.addmember("remote_addr").string(request.getRemoteAddr().c_str());
     in.addmember("local_addr").string(request.getLocalAddr().c_str());
     in.addmember("method").string(request.getMethod());
-    in.addmember("uri").unsafe_string(request.getRequestURI());
-    in.addmember("url").unsafe_string(request.getRequestURL());
+
+    const char* uri = request.getRequestURI();
+    const char* delim = strchr(uri, '?');
+    if (delim) {
+        string truncated(uri, delim - uri);
+        in.addmember("uri").unsafe_string(truncated.c_str());
+    }
+    else {
+        in.addmember("uri").unsafe_string(uri);
+    }
     in.addmember("query").string(request.getQueryString());
 
     if (!headers.empty()) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list