diff options
Diffstat (limited to 'xmlIO.c')
-rw-r--r-- | xmlIO.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -844,18 +844,25 @@ xmlFileOpen_real (const char *filename) { return((void *) fd); } - if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) + if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) { #if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__) path = &filename[17]; #else path = &filename[16]; #endif - else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) { + } else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) { #if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__) path = &filename[8]; #else path = &filename[7]; #endif + } else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:/", 6)) { + /* lots of generators seems to lazy to read RFC 1738 */ +#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__) + path = &filename[6]; +#else + path = &filename[5]; +#endif } else path = filename; @@ -3638,7 +3645,7 @@ static int xmlNoNetExists(const char *URL) { * * Returns a new allocated URL, or NULL. */ -xmlChar * +static xmlChar * xmlResolveResourceFromCatalog(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) { xmlChar *resource = NULL; |