mirror of
https://github.com/kenzok8/small.git
synced 2025-01-08 12:08:21 +08:00
21 lines
538 B
Diff
21 lines
538 B
Diff
--- a/lib/net/url.lua
|
|
+++ b/lib/net/url.lua
|
|
@@ -340,7 +340,7 @@ function M:setAuthority(authority)
|
|
self.password = v
|
|
return ''
|
|
end)
|
|
- if string.find(userinfo, "^[%w%+%.]+$") then
|
|
+ if string.find(userinfo, "^[%p%w%+%.]+$") then
|
|
self.user = userinfo
|
|
else
|
|
-- incorrect userinfo
|
|
@@ -369,7 +369,7 @@ function M.parse(url)
|
|
comp.fragment = v
|
|
return ''
|
|
end)
|
|
- url =url:gsub('^([%w][%w%+%-%.]*)%:', function(v)
|
|
+ url =url:gsub('^([%w][%w%+%-%_%.]*)%:', function(v)
|
|
comp.scheme = v:lower()
|
|
return ''
|
|
end)
|