1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

websocket: make compile with autofree (#8023)

This commit is contained in:
Tomas Hellström
2021-01-11 09:03:10 +01:00
committed by GitHub
parent 67d7b87d28
commit cc17f145c5
4 changed files with 19 additions and 7 deletions

View File

@ -451,6 +451,7 @@ fn parse_request_uri(rawurl string) ?URL {
// 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.
[manualfree]
fn parse_url(rawurl string, via_request bool) ?URL {
if string_contains_ctl_byte(rawurl) {
return error(error_msg('parse_url: invalid control character in URL', rawurl))