mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-01 14:14:56 +00:00
libfetch: parse scheme://domain:/ correctly
This improves URL-parsing compability with cURL, and unbreaks parsing of
similar kinds of URLs after commit 8d9de5b10a
.
Sponsored by: Juniper Networks, Inc.
Reviewed by: des
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44493
This commit is contained in:
parent
3bd637afbd
commit
fb860ed0c5
|
@ -426,7 +426,7 @@ fetchParseURL(const char *URL)
|
|||
goto ouch;
|
||||
}
|
||||
}
|
||||
if (n < 1 || n > IPPORT_MAX)
|
||||
if (p != q && (n < 1 || n > IPPORT_MAX))
|
||||
goto ouch;
|
||||
u->port = n;
|
||||
p = q;
|
||||
|
|
Loading…
Reference in a new issue