From 472f30e4ceb7ba2488f97c50b0802535e31f0764 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Mon, 22 Jan 2007 17:01:01 +0000 Subject: [PATCH] Relax content type check. --- saml/saml1/binding/impl/SAML1SOAPDecoder.cpp | 4 ++-- saml/saml2/binding/impl/SAML2SOAPDecoder.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp index 7d854a1..31a5f0d 100644 --- a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp @@ -60,8 +60,8 @@ XMLObject* SAML1SOAPDecoder::decode( log.debug("validating input"); string s = genericRequest.getContentType(); - if (s != "text/xml") { - log.warn("ignoring incorrect Content Type (%s)", s.c_str() ? s.c_str() : "none"); + if (s.find("text/xml") == string::npos) { + log.warn("ignoring incorrect content type (%s)", s.c_str() ? s.c_str() : "none"); return NULL; } diff --git a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp index 9c10638..9dba63a 100644 --- a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp @@ -60,8 +60,8 @@ XMLObject* SAML2SOAPDecoder::decode( log.debug("validating input"); string s = genericRequest.getContentType(); - if (s != "text/xml") { - log.warn("ignoring incorrect Content Type (%s)", s.c_str() ? s.c_str() : "none"); + if (s.find("text/xml") == string::npos) { + log.warn("ignoring incorrect content type (%s)", s.c_str() ? s.c_str() : "none"); return NULL; } -- 2.1.4