mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Fixed rendering of some tiles for certain sizes of tilesets, more rubocopping
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#############################
|
||||
#
|
||||
#===============================================================================
|
||||
# HTTP utility functions
|
||||
#
|
||||
#############################
|
||||
#===============================================================================
|
||||
def pbPostData(url, postdata, filename = nil, depth = 0)
|
||||
if url[/^http:\/\/([^\/]+)(.*)$/]
|
||||
host = $1
|
||||
@@ -21,11 +19,11 @@ def pbPostData(url, postdata, filename = nil, depth = 0)
|
||||
body,
|
||||
"application/x-www-form-urlencoded",
|
||||
{
|
||||
"Host" => host, # might not be necessary
|
||||
"Host" => host, # might not be necessary
|
||||
"Proxy-Connection" => "Close",
|
||||
"Content-Length" => body.bytesize.to_s,
|
||||
"Pragma" => "no-cache",
|
||||
"User-Agent" => userAgent
|
||||
"Content-Length" => body.bytesize.to_s,
|
||||
"Pragma" => "no-cache",
|
||||
"User-Agent" => userAgent
|
||||
}
|
||||
) rescue ""
|
||||
return ret if !ret.is_a?(Hash)
|
||||
@@ -40,8 +38,8 @@ end
|
||||
def pbDownloadData(url, filename = nil, authorization = nil, depth = 0, &block)
|
||||
headers = {
|
||||
"Proxy-Connection" => "Close",
|
||||
"Pragma" => "no-cache",
|
||||
"User-Agent" => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
|
||||
"Pragma" => "no-cache",
|
||||
"User-Agent" => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
|
||||
}
|
||||
headers["authorization"] = authorization if authorization
|
||||
ret = HTTPLite.get(url, headers) rescue ""
|
||||
|
||||
Reference in New Issue
Block a user