diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-07-04 22:37:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-04 22:37:47 +0200 |
commit | 293a96c22d9e7cd68dc18b7d1dec9448d9f28e0f (patch) | |
tree | 061ea51dd4d87ccc6c9fe74267342386f36f3930 /scene/main/http_request.cpp | |
parent | dacd9c51b139d1dce66405d3357669862d6250ff (diff) | |
parent | 8a4dccc4ce91e26ddeda7fcb1409cdd251b17779 (diff) |
Merge pull request #19947 from GagaPete/html5-http-fix
Fix CORS problems due to added headers on JS target
Diffstat (limited to 'scene/main/http_request.cpp')
-rw-r--r-- | scene/main/http_request.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index ae21775c55..4750e05633 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -30,8 +30,6 @@ #include "http_request.h" -#include "version.h" - void HTTPRequest::_redirect_request(const String &p_new_url) { } @@ -106,28 +104,10 @@ Error HTTPRequest::request(const String &p_url, const Vector<String> &p_custom_h validate_ssl = p_ssl_validate_domain; - bool has_user_agent = false; - bool has_accept = false; headers = p_custom_headers; request_data = p_request_data; - for (int i = 0; i < headers.size(); i++) { - - if (headers[i].findn("user-agent:") == 0) - has_user_agent = true; - if (headers[i].findn("Accept:") == 0) - has_accept = true; - } - - if (!has_user_agent) { - headers.push_back("User-Agent: GodotEngine/" + String(VERSION_FULL_BUILD) + " (" + OS::get_singleton()->get_name() + ")"); - } - - if (!has_accept) { - headers.push_back("Accept: */*"); - } - requesting = true; if (use_threads) { |