aboutsummaryrefslogtreecommitdiffstats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-07 14:23:43 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-07 14:23:43 +0200
commit10c7f7bac07398b1c7bb12731c240e77cbcd115e (patch)
tree96a6d8b2557462ce6a8e92436286467334d8f2a0 /src/types
parenta84193b0af85cc1e4c298d66a6fd951e0e46b480 (diff)
downloadchawan-10c7f7bac07398b1c7bb12731c240e77cbcd115e.tar.gz
url: fix empty hostnames being accepted
Diffstat (limited to 'src/types')
-rw-r--r--src/types/url.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/types/url.nim b/src/types/url.nim
index bfdc3eaa..f7cd550f 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -504,7 +504,7 @@ proc basicParseUrl*(input: string, base = none(URL), url: URL = URL(),
state = SPECIAL_AUTHORITY_IGNORE_SLASHES_STATE
dec pointer
of SPECIAL_AUTHORITY_IGNORE_SLASHES_STATE:
- if has and c notin {'/', '\\'}:
+ if not has or c notin {'/', '\\'}:
state = AUTHORITY_STATE
dec pointer
else: