@@ -2122,22 +2122,14 @@ xmlNoNetExternalEntityLoader(const char *URL, const char *ID,
21222122 if (resource != NULL ) {
21232123 if ((!xmlStrncasecmp (BAD_CAST resource , BAD_CAST "ftp://" , 6 )) ||
21242124 (!xmlStrncasecmp (BAD_CAST resource , BAD_CAST "http://" , 7 ))) {
2125- int res ;
2126-
2125+ xmlCtxtErrIO ( ctxt , XML_IO_NETWORK_ATTEMPT ,
2126+ ( const char * ) resource );
21272127 /*
2128- * Forward this error to the generic error handler, not to
2129- * the parser context for backward compatibility.
2130- * Several downstream test suites rely on this behavior.
2128+ * Also forward the error directly to the global error
2129+ * handler, which the XML::LibXML test suite expects.
21312130 */
2132- res = __xmlRaiseError (NULL , xmlGenericError ,
2133- xmlGenericErrorContext , NULL , NULL ,
2134- XML_FROM_IO , XML_IO_NETWORK_ATTEMPT ,
2135- XML_ERR_ERROR , NULL , 0 ,
2136- (const char * ) resource , NULL , NULL , 0 , 0 ,
2137- "Attempt to load network entity %s" ,
2138- resource );
2139- if (res < 0 )
2140- xmlCtxtErrMemory (ctxt );
2131+ __xmlIOErr (XML_FROM_IO , XML_IO_NETWORK_ATTEMPT ,
2132+ (const char * ) resource );
21412133 if (resource != (xmlChar * ) URL )
21422134 xmlFree (resource );
21432135 return (NULL );
0 commit comments