+
+ // Check for a response code signal.
+ if (XMLHelper::isNodeNamed(doc->getDocumentElement(), xmlconstants::XMLTOOLING_NS, URLInputSource::utf16StatusCodeElementName)) {
+ int responseCode = XMLString::parseInt(doc->getDocumentElement()->getFirstChild()->getNodeValue());
+ doc->release();
+ if (responseCode == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) {
+ throw responseCode; // toss out as a "known" case to handle gracefully
+ }
+ else {
+ m_log.warn("remote resource fetch returned atypical status code (%d)", responseCode);
+ throw IOException("remote resource fetch failed, check log for status code of response");
+ }
+ }