From 7bf1c7f005979d93f1fa1bcafec2b1e5a2107d90 Mon Sep 17 00:00:00 2001 From: joe-conigliaro Date: Fri, 2 Aug 2019 16:52:37 +1000 Subject: [PATCH] net.urllib: change confusing name of internal method --- vlib/net/urllib/urllib.v | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/net/urllib/urllib.v b/vlib/net/urllib/urllib.v index d5b93eb5b0..b0be68ffcb 100644 --- a/vlib/net/urllib/urllib.v +++ b/vlib/net/urllib/urllib.v @@ -432,7 +432,7 @@ pub fn parse(rawurl string) ?URL { p := split(rawurl, '#', true) u := p[0] frag := p[1] - mut url := parse_request_url(u, false) or { + mut url := _parse(u, false) or { return error(error_msg(ParseError, u)) } if frag == '' { @@ -451,14 +451,14 @@ pub fn parse(rawurl string) ?URL { // The string rawurl is assumed not to have a #fragment suffix. // (Web browsers strip #fragment before sending the URL to a web server.) fn parse_request_uri(rawurl string) ?URL { - return parse_request_url(rawurl, true) + return _parse(rawurl, true) } -// parse parses a URL from a string in one of two contexts. If +// _parse parses a URL from a string in one of two contexts. If // via_request is true, the URL is assumed to have arrived via an HTTP request, // in which case only absolute URLs or path-absolute relative URLs are allowed. // If via_request is false, all forms of relative URLs are allowed. -fn parse_request_url(rawurl string, via_request bool) ?URL { +fn _parse(rawurl string, via_request bool) ?URL { if string_contains_ctl_byte(rawurl) { return error(error_msg('invalid control character in URL', rawurl)) }