You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Parse fragment from URL
This commit is contained in:
@@ -77,8 +77,8 @@ Error EditorDebuggerServerWebSocket::start(const String &p_uri) {
|
||||
|
||||
// Optionally override
|
||||
if (!p_uri.is_empty() && p_uri != "ws://") {
|
||||
String scheme, path;
|
||||
Error err = p_uri.parse_url(scheme, bind_host, bind_port, path);
|
||||
String scheme, path, fragment;
|
||||
Error err = p_uri.parse_url(scheme, bind_host, bind_port, path, fragment);
|
||||
ERR_FAIL_COND_V(err != OK, ERR_INVALID_PARAMETER);
|
||||
ERR_FAIL_COND_V(!bind_host.is_valid_ip_address() && bind_host != "*", ERR_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -68,8 +68,9 @@ Error EMWSPeer::connect_to_url(const String &p_url, Ref<TLSOptions> p_tls_option
|
||||
String host;
|
||||
String path;
|
||||
String scheme;
|
||||
String fragment;
|
||||
int port = 0;
|
||||
Error err = p_url.parse_url(scheme, host, port, path);
|
||||
Error err = p_url.parse_url(scheme, host, port, path, fragment);
|
||||
ERR_FAIL_COND_V_MSG(err != OK, err, "Invalid URL: " + p_url);
|
||||
|
||||
if (scheme.is_empty()) {
|
||||
|
||||
@@ -482,8 +482,9 @@ Error WSLPeer::connect_to_url(const String &p_url, Ref<TLSOptions> p_options) {
|
||||
String host;
|
||||
String path;
|
||||
String scheme;
|
||||
String fragment;
|
||||
int port = 0;
|
||||
Error err = p_url.parse_url(scheme, host, port, path);
|
||||
Error err = p_url.parse_url(scheme, host, port, path, fragment);
|
||||
ERR_FAIL_COND_V_MSG(err != OK, err, "Invalid URL: " + p_url);
|
||||
if (scheme.is_empty()) {
|
||||
scheme = "ws://";
|
||||
|
||||
Reference in New Issue
Block a user