update
Some checks failed
Build Gurty / Build Gurty (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 1m33s
Build GurtCA / Build GurtCA (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 11m20s
Build GDExtension / Build GDExtension (libgurt_godot.so, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 16m9s
Build Flumi / Build Flumi (Linux, 4.4.1, ubuntu-latest, linux) (push) Failing after 2h10m11s
Build Flumi / Build Flumi (Windows Desktop, 4.4.1, windows-latest, windows) (push) Has been cancelled
Build GDExtension / Build GDExtension (gurt_godot.dll, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build GurtCA / Build GurtCA (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build Gurty / Build Gurty (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Some checks failed
Build Gurty / Build Gurty (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 1m33s
Build GurtCA / Build GurtCA (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 11m20s
Build GDExtension / Build GDExtension (libgurt_godot.so, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 16m9s
Build Flumi / Build Flumi (Linux, 4.4.1, ubuntu-latest, linux) (push) Failing after 2h10m11s
Build Flumi / Build Flumi (Windows Desktop, 4.4.1, windows-latest, windows) (push) Has been cancelled
Build GDExtension / Build GDExtension (gurt_godot.dll, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build GurtCA / Build GurtCA (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build Gurty / Build Gurty (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
This commit is contained in:
@@ -79,7 +79,7 @@ static func get_current_domain() -> String:
|
||||
|
||||
static func sanitize_domain_for_filename(domain: String) -> String:
|
||||
# Remove protocol prefix
|
||||
if domain.begins_with("gurt://"):
|
||||
if domain.begins_with("lw://"):
|
||||
domain = domain.substr(7)
|
||||
elif domain.contains("://"):
|
||||
var parts = domain.split("://")
|
||||
|
||||
@@ -12,7 +12,7 @@ static func setup_network_api(vm: LuauVM):
|
||||
vm.lua_setglobal("fetch")
|
||||
|
||||
static func resolve_fetch_url(url: String) -> String:
|
||||
if url.begins_with("http://") or url.begins_with("https://") or url.begins_with("gurt://"):
|
||||
if url.begins_with("http://") or url.begins_with("https://") or url.begins_with("lw://"):
|
||||
return url
|
||||
|
||||
var main_node = Engine.get_main_loop().current_scene
|
||||
@@ -22,9 +22,9 @@ static func resolve_fetch_url(url: String) -> String:
|
||||
|
||||
if current_domain.is_empty():
|
||||
if url.begins_with("/"):
|
||||
return "gurt://" + url.substr(1)
|
||||
return "lw://" + url.substr(1)
|
||||
else:
|
||||
return "gurt://" + url
|
||||
return "lw://" + url
|
||||
|
||||
return URLUtils.resolve_url(current_domain, url)
|
||||
|
||||
@@ -35,7 +35,7 @@ static func _lua_fetch_handler(vm: LuauVM) -> int:
|
||||
if vm.lua_gettop() >= 2 and vm.lua_istable(2):
|
||||
options = vm.lua_todictionary(2)
|
||||
|
||||
# Resolve relative URLs and default to gurt:// protocol
|
||||
# Resolve relative URLs and default to lw:// protocol
|
||||
var url = resolve_fetch_url(original_url)
|
||||
|
||||
# Default options
|
||||
@@ -135,7 +135,7 @@ static func _response_ok_handler(vm: LuauVM) -> int:
|
||||
return 1
|
||||
|
||||
static func make_http_request(url: String, method: String, headers: PackedStringArray, body: String) -> Dictionary:
|
||||
if url.begins_with("gurt://"):
|
||||
if url.begins_with("lw://"):
|
||||
return make_gurt_request(url, method, headers, body)
|
||||
var http_client = HTTPClient.new()
|
||||
var response_data = {
|
||||
@@ -320,7 +320,7 @@ static func make_gurt_request(url: String, method: String, headers: PackedString
|
||||
"body": ""
|
||||
}
|
||||
|
||||
var domain_part = url.replace("gurt://", "")
|
||||
var domain_part = url.replace("lw://", "")
|
||||
if domain_part.contains("/"):
|
||||
domain_part = domain_part.split("/")[0]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ extends RefCounted
|
||||
|
||||
static func resolve_url(base_url: String, relative_url: String) -> String:
|
||||
# If relative_url is already absolute, return it as-is
|
||||
if relative_url.begins_with("http://") or relative_url.begins_with("https://") or relative_url.begins_with("gurt://") or relative_url.begins_with("file://"):
|
||||
if relative_url.begins_with("http://") or relative_url.begins_with("https://") or relative_url.begins_with("lw://") or relative_url.begins_with("file://"):
|
||||
return relative_url
|
||||
|
||||
# If empty, treat as relative to current domain
|
||||
@@ -94,7 +94,7 @@ static func extract_domain(url: String) -> String:
|
||||
return ""
|
||||
|
||||
var clean_url = url
|
||||
if clean_url.begins_with("gurt://"):
|
||||
if clean_url.begins_with("lw://"):
|
||||
clean_url = clean_url.substr(7)
|
||||
elif clean_url.begins_with("https://"):
|
||||
clean_url = clean_url.substr(8)
|
||||
|
||||
Reference in New Issue
Block a user