projects
/
shibboleth
/
cpp-xmltooling.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1ba7b3
)
Relax content type check.
author
Scott Cantor
<cantor.2@osu.edu>
Mon, 22 Jan 2007 17:00:51 +0000
(17:00 +0000)
committer
Scott Cantor
<cantor.2@osu.edu>
Mon, 22 Jan 2007 17:00:51 +0000
(17:00 +0000)
xmltooling/soap/impl/SOAPClient.cpp
patch
|
blob
|
history
diff --git
a/xmltooling/soap/impl/SOAPClient.cpp
b/xmltooling/soap/impl/SOAPClient.cpp
index
d785b63
..
ec0d781
100644
(file)
--- a/
xmltooling/soap/impl/SOAPClient.cpp
+++ b/
xmltooling/soap/impl/SOAPClient.cpp
@@
-74,6
+74,11
@@
Envelope* SOAPClient::receive()
if (!out)
return NULL; // nothing yet
+ // Check content type.
+ string s = m_transport->getContentType();
+ if (s.find("text/xml") == string::npos)
+ throw IOException("Incorrect content type ($1) for SOAP response.", params(1,s.c_str() ? s.c_str() : "none"));
+
// Parse and bind the document into an XMLObject.
DOMDocument* doc = (m_validate ? XMLToolingConfig::getConfig().getValidatingParser()
: XMLToolingConfig::getConfig().getParser()).parse(out);