diff options
author | bptato <nincsnevem662@gmail.com> | 2023-10-01 00:34:17 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-10-01 00:34:17 +0200 |
commit | f1814211abadd994cdf20e50a9e50fcf122acf85 (patch) | |
tree | 7f578cdaa0d853f68107a10f3f5869c0b63601e7 /src/types | |
parent | c8a0af47b7fd8a38ba92554a9f342b03c66b2daa (diff) | |
download | chawan-f1814211abadd994cdf20e50a9e50fcf122acf85.tar.gz |
Get rid of unicode.toLower
It was used by mistake in a hundred percent of the cases we were using it.
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/cookie.nim | 4 | ||||
-rw-r--r-- | src/types/url.nim | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/types/cookie.nim b/src/types/cookie.nim index 6d7ab79a..627975ab 100644 --- a/src/types/cookie.nim +++ b/src/types/cookie.nim @@ -75,7 +75,7 @@ proc parseCookieDate(val: string): Option[DateTime] = if not foundMonth: block monthBlock: # test for month if dateToken.len < 3: break monthBlock - case dateToken.substr(0, 2).toLower() + case dateToken.substr(0, 2).toLowerAscii() of "jan": month = 1 of "feb": month = 2 of "mar": month = 3 @@ -229,7 +229,7 @@ proc newCookie*(str: string, url: URL = nil): JSResult[Cookie] continue let key = part.substr(0, n - 1) let val = part.substr(n + 1) - case key.toLower() + case key.toLowerAscii() of "expires": let date = parseCookieDate(val) if date.issome: diff --git a/src/types/url.nim b/src/types/url.nim index ac83538e..1e05f016 100644 --- a/src/types/url.nim +++ b/src/types/url.nim @@ -271,7 +271,7 @@ func domainToAscii*(domain: string, bestrict = false): Option[string] = return none(string) return result else: - return domain.tolower().some + return some(domain.toLowerAscii()) func parseHost(input: string, special: bool): Option[Host] = if input.len == 0: return |