mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fix javascript build error and improve #14604
This commit is contained in:
@@ -56,11 +56,11 @@ Error HTTPClient::connect_to_host(const String &p_host, int p_port, bool p_ssl,
|
||||
String host_lower = conn_host.to_lower();
|
||||
if (host_lower.begins_with("http://")) {
|
||||
|
||||
conn_host = conn_host.replace_first("http://", "");
|
||||
conn_host = conn_host.substr(7, conn_host.length() - 7);
|
||||
} else if (host_lower.begins_with("https://")) {
|
||||
|
||||
ssl = true;
|
||||
conn_host = conn_host.replace_first("https://", "");
|
||||
conn_host = conn_host.substr(8, conn_host.length() - 8);
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V(conn_host.length() < HOST_MIN_LEN, ERR_INVALID_PARAMETER);
|
||||
|
||||
Reference in New Issue
Block a user