mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
- uri.c: Wayne Davison's patch fixing xmlBuildURI()
- Makefile.mingw: Wayne Davison's update adding hash.c Daniel
This commit is contained in:
parent
c4f4f0b76f
commit
bd20df7951
@ -1,3 +1,8 @@
|
||||
Sun Oct 29 18:51:46 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||
|
||||
* uri.c: Wayne Davison's patch fixing xmlBuildURI()
|
||||
* Makefile.mingw: Wayne Davison's update adding hash.c
|
||||
|
||||
Sun Oct 29 18:38:12 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||
|
||||
* xpath.c: fixed the root evaluation problems
|
||||
|
31
uri.c
31
uri.c
@ -1433,7 +1433,7 @@ xmlNormalizeURIPath(char *path) {
|
||||
xmlChar *
|
||||
xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
|
||||
xmlChar *val = NULL;
|
||||
int ret, ret2, len, index, cur, out;
|
||||
int ret, len, index, cur, out;
|
||||
xmlURIPtr ref = NULL;
|
||||
xmlURIPtr bas = NULL;
|
||||
xmlURIPtr res = NULL;
|
||||
@ -1449,25 +1449,31 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
|
||||
if (URI == NULL)
|
||||
ret = -1;
|
||||
else {
|
||||
ref = xmlCreateURI();
|
||||
if (ref == NULL)
|
||||
goto done;
|
||||
if (*URI)
|
||||
if (*URI) {
|
||||
ref = xmlCreateURI();
|
||||
if (ref == NULL)
|
||||
goto done;
|
||||
ret = xmlParseURIReference(ref, (const char *) URI);
|
||||
}
|
||||
else
|
||||
ret = -1;
|
||||
ret = 0;
|
||||
}
|
||||
if (ret != 0)
|
||||
goto done;
|
||||
if (base == NULL)
|
||||
ret2 = -1;
|
||||
ret = -1;
|
||||
else {
|
||||
bas = xmlCreateURI();
|
||||
if (bas == NULL)
|
||||
goto done;
|
||||
ret2 = xmlParseURIReference(bas, (const char *) base);
|
||||
ret = xmlParseURIReference(bas, (const char *) base);
|
||||
}
|
||||
if ((ret != 0) && (ret2 != 0))
|
||||
goto done;
|
||||
if (ret != 0) {
|
||||
if (ref)
|
||||
val = xmlSaveUri(ref);
|
||||
goto done;
|
||||
}
|
||||
if (ref == NULL) {
|
||||
/*
|
||||
* the base fragment must be ignored
|
||||
*/
|
||||
@ -1478,11 +1484,6 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
|
||||
val = xmlSaveUri(bas);
|
||||
goto done;
|
||||
}
|
||||
if (ret2 != 0) {
|
||||
val = xmlSaveUri(ref);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 2) If the path component is empty and the scheme, authority, and
|
||||
|
@ -34,6 +34,7 @@ LIBSRCS=HTMLparser.c \
|
||||
xmlmemory.c \
|
||||
xpath.c \
|
||||
xpointer.c \
|
||||
hash.c \
|
||||
uri.c
|
||||
|
||||
LIBOBJS=$(LIBSRCS:.c=.o)
|
||||
|
Loading…
x
Reference in New Issue
Block a user