Revert "uri: Allow port without host"

This reverts commit f30adb54f55e4e765d58195163f2a21f7ac759fb.

Fixes #460.
This commit is contained in:
Nick Wellnhofer 2022-12-13 00:51:33 +01:00
parent a77e32736c
commit 8ed40c621b

2
uri.c
View File

@ -770,6 +770,8 @@ xmlParse3986HierPart(xmlURIPtr uri, const char **str)
cur += 2;
ret = xmlParse3986Authority(uri, &cur);
if (ret != 0) return(ret);
if (uri->server == NULL)
uri->port = -1;
ret = xmlParse3986PathAbEmpty(uri, &cur);
if (ret != 0) return(ret);
*str = cur;