Fix bug when sending requests.
authorScott Cantor <cantor.2@osu.edu>
Sat, 26 May 2007 23:09:32 +0000 (23:09 +0000)
committerScott Cantor <cantor.2@osu.edu>
Sat, 26 May 2007 23:09:32 +0000 (23:09 +0000)
saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp

index a7d7500..49c424f 100644 (file)
@@ -121,10 +121,11 @@ long SAML2ArtifactEncoder::encode(
 
     StatusResponseType* response = NULL;
     RequestAbstractType* request = dynamic_cast<RequestAbstractType*>(xmlObject);
-    if (!request)
+    if (!request) {
         response = dynamic_cast<StatusResponseType*>(xmlObject);
-    if (!response)
-        throw BindingException("XML content for SAML 2.0 HTTP-Artifact Encoder must be a SAML 2.0 protocol message.");
+        if (!response)
+            throw BindingException("XML content for SAML 2.0 HTTP-Artifact Encoder must be a SAML 2.0 protocol message.");
+    }
     
     ArtifactMap* mapper = SAMLConfig::getConfig().getArtifactMap();
     if (!mapper)