• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 8ed40c621b33b44c26e90505b9de1c92080c4a8e Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Tue, 13 Dec 2022 00:51:33 +0100
4Subject: [PATCH] Revert "uri: Allow port without host"
5
6This reverts commit f30adb54f55e4e765d58195163f2a21f7ac759fb.
7
8Fixes #460.
9
10Reference:https://github.com/GNOME/libxml2/commit/8ed40c621b33b44c26e90505b9de1c92080c4a8e
11Conflict:NA
12---
13 uri.c | 2 ++
14 1 file changed, 2 insertions(+)
15
16diff --git a/uri.c b/uri.c
17index 79dc48b..ccc26aa 100644
18--- a/uri.c
19+++ b/uri.c
20@@ -768,6 +768,8 @@ xmlParse3986HierPart(xmlURIPtr uri, const char **str)
21         cur += 2;
22 	ret = xmlParse3986Authority(uri, &cur);
23 	if (ret != 0) return(ret);
24+	if (uri->server == NULL)
25+	    uri->port = -1;
26 	ret = xmlParse3986PathAbEmpty(uri, &cur);
27 	if (ret != 0) return(ret);
28 	*str = cur;
29--
302.27.0
31
32