diff options
| author | Fabio Alessandrelli | 2018-03-30 14:31:18 +0200 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-04-28 20:01:35 +0200 |
| commit | 5e70e4469a87faa5b8ce738c14a17d4caf4119d9 (patch) | |
| tree | 63c61ecd746c55dd64fdbdd00dfb14ac9d3dacf9 /platform/javascript/http_client_javascript.cpp | |
| parent | 287f169f2a068a8bee9ce522a23765450bcc7b99 (diff) | |
| download | godot-5e70e4469a87faa5b8ce738c14a17d4caf4119d9.tar.gz godot-5e70e4469a87faa5b8ce738c14a17d4caf4119d9.tar.zst godot-5e70e4469a87faa5b8ce738c14a17d4caf4119d9.zip | |
Fix bug in HTML5 HTTPClient.
The URL parameter already has a slash, adding an extra one results in
an invalid resource path
(cherry picked from commit b8c73b195fe2a5df407a5ef3423b182a6c19a93c)
Diffstat (limited to 'platform/javascript/http_client_javascript.cpp')
| -rw-r--r-- | platform/javascript/http_client_javascript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp index 118a77835..8d90e01ae 100644 --- a/platform/javascript/http_client_javascript.cpp +++ b/platform/javascript/http_client_javascript.cpp @@ -88,7 +88,7 @@ Error HTTPClient::prepare_request(Method p_method, const String &p_url, const Ve ERR_FAIL_COND_V(port < 0, ERR_UNCONFIGURED); ERR_FAIL_COND_V(!p_url.begins_with("/"), ERR_INVALID_PARAMETER); - String url = (use_tls ? "https://" : "http://") + host + ":" + itos(port) + "/" + p_url; + String url = (use_tls ? "https://" : "http://") + host + ":" + itos(port) + p_url; godot_xhr_reset(xhr_id); godot_xhr_open(xhr_id, _methods[p_method], url.utf8().get_data(), username.empty() ? NULL : username.utf8().get_data(), |
