mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
urllib: put braces in << | expressions in urllib.v to make test pass
This commit is contained in:
parent
cb52dd85e7
commit
582ee9e643
@ -38,7 +38,6 @@ const (
|
||||
'vlib/net/http/http_test.v',
|
||||
'vlib/net/socket_test.v',
|
||||
'vlib/net/socket_udp_test.v',
|
||||
'vlib/net/urllib/urllib_test.v',
|
||||
'vlib/os/environment_test.v', // Linux only
|
||||
'vlib/rand/pcg32_test.v',
|
||||
'vlib/rand/splitmix64_test.v',
|
||||
|
@ -182,7 +182,7 @@ fn unescape(s_ string, mode EncodingMode) ?string {
|
||||
// That is, you can use escaping in the zone identifier but not
|
||||
// to introduce bytes you couldn't just write directly.
|
||||
// But Windows puts spaces here! Yay.
|
||||
v := (unhex(s[i + 1])<<byte(4) | unhex(s[i + 2]))
|
||||
v := ( (unhex(s[i + 1])<<byte(4)) | unhex(s[i + 2]))
|
||||
if s[i..i + 3] != '%25' && v != ` ` && should_escape(v, .encode_host) {
|
||||
error(error_msg(err_msg_escape, s[i..i + 3]))
|
||||
}
|
||||
@ -208,7 +208,7 @@ fn unescape(s_ string, mode EncodingMode) ?string {
|
||||
x := s[i]
|
||||
match x {
|
||||
`%` {
|
||||
t.write((unhex(s[i + 1])<<byte(4) | unhex(s[i + 2])).str())
|
||||
t.write( ((unhex(s[i + 1])<<byte(4)) | unhex(s[i + 2])).str() )
|
||||
i += 2
|
||||
}
|
||||
`+` {
|
||||
|
Loading…
Reference in New Issue
Block a user