[cpp-sp] branch main updated: Add remoting check to status handler.

Scott Cantor cantor.2 at osu.edu
Wed Oct 15 22:16:19 UTC 2025


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=c3ff6b80b6af0a846e9742b7d074a3e377530ab6

The following commit(s) were added to refs/heads/main by this push:
     new c3ff6b80 Add remoting check to status handler.
c3ff6b80 is described below

commit c3ff6b80b6af0a846e9742b7d074a3e377530ab6
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Oct 15 18:15:58 2025 -0400

    Add remoting check to status handler.
---
 shibsp/handler/impl/StatusHandler.cpp | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/shibsp/handler/impl/StatusHandler.cpp b/shibsp/handler/impl/StatusHandler.cpp
index 39232e34..af05699c 100644
--- a/shibsp/handler/impl/StatusHandler.cpp
+++ b/shibsp/handler/impl/StatusHandler.cpp
@@ -23,6 +23,8 @@
 #include "Agent.h"
 #include "SPRequest.h"
 #include "handler/SecuredHandler.h"
+#include "remoting/ddf.h"
+#include "remoting/RemotingService.h"
 #include "session/SessionCache.h"
 #include "util/CGIParser.h"
 #include "util/Date.h"
@@ -251,18 +253,30 @@ pair<bool,long> StatusHandler::run(SPRequest& request, bool isHandler) const
             s << "<SessionCache><None/></SessionCache>";
         }
 
+        const RemotingService* remoter = request.getAgent().getRemotingService(false);
+        if (remoter) {
+            DDF in("ping");
+            DDFJanitor jan(in);
+            DDF out = remoter->send(in);
+            out.destroy();
+            s << "<RemotingService><OK/></RemotingService>";
+        }
+        else {
+            s << "<RemotingService><None/></RemotingService>";
+        }
+
         s << "<Status>" << status << "</Status></StatusHandler>";
 
         request.setContentType("text/xml");
         return make_pair(true, request.sendResponse(s));
     }
-    catch (std::exception& ex) {
+    catch (const exception& ex) {
         request.error(string("error while processing request: ") + ex.what());
         request.setContentType("text/xml");
         stringstream msg;
         msg << "<StatusHandler time='" << timestamp << "'>"
             << "<Version Shibboleth='" << PACKAGE_VERSION << "'/>";
-        systemInfo(msg) << "<Status><Exception type='std::exception'>" << ex.what() << "</Exception></Status>"
+        systemInfo(msg) << "<Status><Exception typename='" << typeid(ex).name() << "'>" << ex.what() << "</Exception></Status>"
             << "</StatusHandler>";
         return make_pair(true, request.sendResponse(msg, HTTPResponse::SHIBSP_HTTP_STATUS_ERROR));
     }

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


More information about the commits mailing list