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:
@@ -5,7 +5,7 @@ edition = "2021"
|
||||
authors = ["FaceDev"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/outpoot/gurted"
|
||||
description = "Official GURT:// protocol implementation"
|
||||
description = "Official lw:// protocol implementation"
|
||||
|
||||
[lib]
|
||||
name = "gurtlib"
|
||||
|
||||
@@ -12,7 +12,7 @@ async fn main() -> Result<()> {
|
||||
Ok(GurtResponse::ok().with_string_body("Test endpoint working!"))
|
||||
});
|
||||
|
||||
println!("Starting GURT server on gurt://127.0.0.1:4878");
|
||||
println!("Starting GURT server on lw://127.0.0.1:4878");
|
||||
|
||||
server.listen("127.0.0.1:4878").await
|
||||
}
|
||||
@@ -518,7 +518,7 @@ impl GurtClient {
|
||||
let parsed_url = Url::parse(url).map_err(|e| GurtError::invalid_message(format!("Invalid URL: {}", e)))?;
|
||||
|
||||
if parsed_url.scheme() != "gurt" {
|
||||
return Err(GurtError::invalid_message("URL must use gurt:// scheme"));
|
||||
return Err(GurtError::invalid_message("URL must use lw:// scheme"));
|
||||
}
|
||||
|
||||
let host = parsed_url.host_str().ok_or_else(|| GurtError::invalid_message("URL must have a host"))?.to_string();
|
||||
@@ -767,12 +767,12 @@ mod tests {
|
||||
async fn test_url_parsing() {
|
||||
let client = GurtClient::new();
|
||||
|
||||
let (host, port, path) = client.parse_gurt_url("gurt://example.com/test").unwrap();
|
||||
let (host, port, path) = client.parse_gurt_url("lw://example.com/test").unwrap();
|
||||
assert_eq!(host, "example.com");
|
||||
assert_eq!(port, DEFAULT_PORT);
|
||||
assert_eq!(path, "/test");
|
||||
|
||||
let (host, port, path) = client.parse_gurt_url("gurt://example.com:8080/api/v1").unwrap();
|
||||
let (host, port, path) = client.parse_gurt_url("lw://example.com:8080/api/v1").unwrap();
|
||||
assert_eq!(host, "example.com");
|
||||
assert_eq!(port, 8080);
|
||||
assert_eq!(path, "/api/v1");
|
||||
|
||||
Reference in New Issue
Block a user