Minor fixes

This commit is contained in:
Maruno17
2021-01-30 17:26:27 +00:00
parent 400ad6e208
commit e70d89f457
3 changed files with 3 additions and 5 deletions

View File

@@ -570,7 +570,8 @@ end
def pbDownloadData(url, filename=nil, depth=0)
raise "Redirection level too deep" if depth>10
if url[/^http:\/\/([^\/]+)(.*)$/]
if url[/^(([^:\/?#]+):(?=\/\/))?(\/\/)?((([^:]+)(?::([^@]+)?)?@)?([^@\/?#:]*)(?::(\d+)?)?)?([^?#]*)(\?([^#]*))?(#(.*))?/]
# if url[/^http:\/\/([^\/]+)(.*)$/]
host = $1
path = $2
path = "/" if path.length==0