mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
libfetch: parse scheme://domain:/ correctly
This improves URL-parsing compability with cURL, and unbreaks parsing of similar kinds of URLs after commit8d9de5b10a
. Sponsored by: Juniper Networks, Inc. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44493 (cherry picked from commitfb860ed0c5
)
This commit is contained in:
parent
223077d0a8
commit
c89889b9c3
@ -427,7 +427,7 @@ fetchParseURL(const char *URL)
|
|||||||
goto ouch;
|
goto ouch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n < 1 || n > IPPORT_MAX)
|
if (p != q && (n < 1 || n > IPPORT_MAX))
|
||||||
goto ouch;
|
goto ouch;
|
||||||
u->port = n;
|
u->port = n;
|
||||||
p = q;
|
p = q;
|
||||||
|
Loading…
Reference in New Issue
Block a user