doc: remove "everything everything" from ParseUrl doc (#704)

Closes: #702.
This commit is contained in:
Michael Ford 2023-02-24 01:34:48 +08:00 committed by GitHub
parent ad97d7b9db
commit ca88fc34c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 20 deletions

View file

@ -265,12 +265,12 @@ static void ParseFragment(struct UrlParser *u, struct UrlView *h) {
* since it's the most non-deterministically defined field of them all.
*
* Please note this is a URL parser, not a URI parser. Which means we
* support everything everything the URI spec says we should do except
* for the things we won't do, like tokenizing path segments into an
* array and then nesting another array beneath each of those for
* storing semicolon parameters. So this parser won't make SIP easy.
* What it can do is parse HTTP URLs and most URIs like s:opaque,
* better in fact than most things which claim to be URI parsers.
* support everything the URI spec says we should do except for the
* things we won't do, like tokenizing path segments into an array
* and then nesting another array beneath each of those for storing
* semicolon parameters. So this parser won't make SIP easy. What it
* can do is parse HTTP URLs and most URIs like s:opaque, better in
* fact than most things which claim to be URI parsers.
*
* @param s is value like `/hi?x=y&z` or `http://a.example/hi#x`
* @param n is byte length and -1 implies strlen

View file

@ -1431,13 +1431,13 @@ function ParseHttpDateTime(rfc1123) end
--- it's the most non-deterministically defined field of them all.
---
--- Please note this is a URL parser, not a URI parser. Which
--- means we support everything everything the URI spec says we
--- should do except for the things we won't do, like tokenizing
--- path segments into an array and then nesting another array
--- beneath each of those for storing semicolon parameters. So
--- this parser won't make SIP easy. What it can do is parse HTTP
--- URLs and most URIs like data:opaque, better in fact than most
--- things which claim to be URI parsers.
--- means we support everything the URI spec says we should do
--- except for the things we won't do, like tokenizing path
--- segments into an array and then nesting another array beneath
--- each of those for storing semicolon parameters. So this parser
--- won't make SIP easy. What it can do is parse HTTP URLs and most
--- URIs like data:opaque, better in fact than most things which
--- claim to be URI parsers.
---
---@nodiscard
function ParseUrl(url, flags) end

View file

@ -1374,13 +1374,12 @@ FUNCTIONS
it's the most non-deterministically defined field of them all.
Please note this is a URL parser, not a URI parser. Which
means we support everything everything the URI spec says we
should do except for the things we won't do, like tokenizing
path segments into an array and then nesting another array
beneath each of those for storing semicolon parameters. So
this parser won't make SIP easy. What it can do is parse HTTP
URLs and most URIs like data:opaque, better in fact than most
things which claim to be URI parsers.
means we support everything the URI spec says we should do except
for the things we won't do, like tokenizing path segments into
an array and then nesting another array beneath each of those for
storing semicolon parameters. So this parser won't make SIP easy.
What it can do is parse HTTP URLs and most URIs like data:opaque,
better in fact than most things which claim to be URI parsers.
IsAcceptablePath(str) → bool
Returns true if path doesn't contain ".", ".." or "//" segments