Skip to content

Commit 1bd86c8

Browse files
authored
Fix
1 parent 9653e5e commit 1bd86c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/forge.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ function assert_check_endpoint_url(url::AbstractString)
174174
end
175175

176176
# Roundtrip the URL through `URIs.resolvereference()`, and make sure it is unchanged
177-
if url != URIs.resolvereference("https://example.invalid/", url).path
177+
new_path = URIs.resolvereference("https://example.invalid/", url).path
178+
url_leading_slash = "/" * url
179+
if (new_path != url) && (new_path != url_leading_slash)
178180
throw(ArgumentError("URLs cannot contain path navigation: $(url)"))
179181
end
180182

0 commit comments

Comments
 (0)