Add relay state to exception only if non-empty
authorscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 29 Nov 2012 01:55:48 +0000 (01:55 +0000)
committerscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 29 Nov 2012 01:55:48 +0000 (01:55 +0000)
git-svn-id: https://svn.shibboleth.net/cpp-sp/branches/REL_2@3823 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/handler/impl/AssertionConsumerService.cpp

index 901d826..881e887 100644 (file)
@@ -251,8 +251,10 @@ pair<bool,long> AssertionConsumerService::processMessage(
                 return make_pair(true, httpResponse.sendRedirect(relayState.c_str()));
             }
         }
-
-        ex.addProperty("RelayState", relayState.c_str());
+        
+        if (!relayState.empty()) {
+            ex.addProperty("RelayState", relayState.c_str());
+        }
 
         // Log the error.
         try {