mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
Problem resolving relative URIs
Raised by Matthias Pigulla <mp@webfactory.de> In a nutshell we had that bug on URI composition after some fixes in the area of localhost empty shortcuts : ./testURI --base file:///some/where file Without patch: file:/some/file With patch: file:///some/file
This commit is contained in:
parent
f19385a589
commit
3daee3f159
10
uri.c
10
uri.c
@ -1961,8 +1961,9 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
|
||||
res->scheme = xmlMemStrdup(bas->scheme);
|
||||
if (bas->authority != NULL)
|
||||
res->authority = xmlMemStrdup(bas->authority);
|
||||
else if (bas->server != NULL) {
|
||||
res->server = xmlMemStrdup(bas->server);
|
||||
else if ((bas->server != NULL) || (bas->port == -1)) {
|
||||
if (bas->server != NULL)
|
||||
res->server = xmlMemStrdup(bas->server);
|
||||
if (bas->user != NULL)
|
||||
res->user = xmlMemStrdup(bas->user);
|
||||
res->port = bas->port;
|
||||
@ -2024,8 +2025,9 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
|
||||
}
|
||||
if (bas->authority != NULL)
|
||||
res->authority = xmlMemStrdup(bas->authority);
|
||||
else if (bas->server != NULL) {
|
||||
res->server = xmlMemStrdup(bas->server);
|
||||
else if ((bas->server != NULL) || (bas->port == -1)) {
|
||||
if (bas->server != NULL)
|
||||
res->server = xmlMemStrdup(bas->server);
|
||||
if (bas->user != NULL)
|
||||
res->user = xmlMemStrdup(bas->user);
|
||||
res->port = bas->port;
|
||||
|
Loading…
x
Reference in New Issue
Block a user