X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fbinding%2Fimpl%2FSAML2SOAPDecoder.cpp;fp=saml%2Fsaml2%2Fbinding%2Fimpl%2FSAML2SOAPDecoder.cpp;h=2d9d22f370e234f3190b0d27b10971991cda9053;hb=1c199e2d851bf77015ce0b1d80ac2cc6ef60cda3;hp=375703994c60b89327e760b57c7c06edcee64106;hpb=b1a9d73e4cd13aa99f221b8e7a38dcb92931a1f1;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp index 3757039..2d9d22f 100644 --- a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp @@ -80,14 +80,12 @@ XMLObject* SAML2SOAPDecoder::decode( string s = genericRequest.getContentType(); if (s.find("text/xml") == string::npos) { log.warn("ignoring incorrect content type (%s)", s.c_str() ? s.c_str() : "none"); - return NULL; + throw BindingException("Invalid content type for SOAP message."); } const char* data = genericRequest.getRequestBody(); - if (!data) { - log.warn("empty request body"); - return NULL; - } + if (!data) + throw BindingException("SOAP message had an empty request body."); istringstream is(data); // Parse and bind the document into an XMLObject.