summaryrefslogtreecommitdiffstats
path: root/core/io/http_client.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-12-15 16:31:41 +0100
committerGitHub <noreply@github.com>2017-12-15 16:31:41 +0100
commit68cf66cb56f12594abbec36dabc93ceba6bba961 (patch)
tree70c95a1605a7d787b5b1fc2bbf5b45a972827ad4 /core/io/http_client.cpp
parentfa6f1522b17f4aeda44d6be7162c48bdc954089a (diff)
parent206275f3e70187252c4b80ec0ba33f390e47f2ec (diff)
downloadredot-engine-68cf66cb56f12594abbec36dabc93ceba6bba961.tar.gz
Merge pull request #14703 from Faless/fix_http_client
Fix javascript build error and improve #14604
Diffstat (limited to 'core/io/http_client.cpp')
-rw-r--r--core/io/http_client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index c865ce4669..e457a4ac1e 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -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);