diff --git a/uri.c b/uri.c index 4901a117..2cf8d9f1 100644 --- a/uri.c +++ b/uri.c @@ -2236,25 +2236,8 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) * First we take care of the special case where either of the * two path components may be missing (bug 316224) */ - if (bas->path == NULL) { - if (ref->path != NULL) { - uptr = (xmlChar *) ref->path; - if (*uptr == '/') - uptr++; - /* exception characters from xmlSaveUri */ - val = xmlURIEscapeStr(uptr, BAD_CAST "/;&=+$,"); - } - goto done; - } bptr = (xmlChar *)bas->path; - if (ref->path == NULL) { - for (ix = 0; bptr[ix] != 0; ix++) { - if (bptr[ix] == '/') - nbslash++; - } - uptr = NULL; - len = 1; /* this is for a string terminator only */ - } else { + { xmlChar *rptr = (xmlChar *) ref->path; int pos = 0; @@ -2289,11 +2272,9 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) /* * In base, count the number of '/' from the differing point */ - if (bptr[pos] != rptr[pos]) {/* check for trivial URI == base */ - for (; bptr[ix] != 0; ix++) { - if (bptr[ix] == '/') - nbslash++; - } + for (; bptr[ix] != 0; ix++) { + if (bptr[ix] == '/') + nbslash++; } /*