X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fopensaml2.git;a=blobdiff_plain;f=saml%2Fsaml1%2Fbinding%2Fimpl%2FSAML1SOAPDecoder.cpp;h=f928f8b51ce20da274ff00b289da98e40343db5b;hp=eff4034e1bf9971db2a2071409f6f1e61197f77f;hb=98b9be4dacac1d9a8729906473e35fc904676d12;hpb=51425e46e07cbee4c4536635daf3b807d3336f11 diff --git a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp index eff4034..f928f8b 100644 --- a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp @@ -78,14 +78,12 @@ XMLObject* SAML1SOAPDecoder::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.