src/SerifHTTPServer/IncomingHTTPConnection.cpp
// Return false if we encounter an error.

Return false if we encounter an error.
Return false if we encounter an error .
bool IncomingHTTPConnection::insertRemoteFileContents(DOMElement* targetElem, const std::string& file_contents) {
	assert(targetElem != 0);
	std::string url = transcodeToStdString(targetElem->getAttribute(X_href));
	if (XMLString::compareIString(targetElem->getTagName(), X_Document)==0)
		return insertRemoteDocTheory(targetElem, file_contents);
	else if (XMLString::compareIString(targetElem->getTagName(), X_OriginalText)==0)
		return insertRemoteOriginalText(targetElem, file_contents);
	else {
		reportError(400, "href on unexpected element type", 
			transcodeToStdString(targetElem->getTagName()));
		return false;
	}
}
bool IncomingHTTPConnection :: insertRemoteFileContents ( DOMElement * targetElem , const std :: string & file_contents ) { assert ( targetElem != 0 ) ; std :: string url = transcodeToStdString ( targetElem -> getAttribute ( X_href ) ) ; if ( XMLString :: compareIString ( targetElem -> getTagName ( ) , X_Document ) == 0 ) return insertRemoteDocTheory ( targetElem , file_contents ) ; else if ( XMLString :: compareIString ( targetElem -> getTagName ( ) , X_OriginalText ) == 0 ) return insertRemoteOriginalText ( targetElem , file_contents ) ; else { reportError ( 400 , " " , transcodeToStdString ( targetElem -> getTagName ( ) ) ) ; return false ; } }
Return false if we encounter an error.
Return false if we encounter an error .