summaryrefslogtreecommitdiffstats
path: root/core/io/http_client_tcp.cpp
diff options
context:
space:
mode:
authorMax Hilbrunner <m.hilbrunner@gmail.com>2022-01-14 03:22:23 +0100
committerMax Hilbrunner <m.hilbrunner@gmail.com>2022-01-27 03:22:37 +0100
commit3ef5a975054834466107ed8598352e5315a3a191 (patch)
treef403038c3f16025e84e2613104eee96ff9b42528 /core/io/http_client_tcp.cpp
parent3a83872d261790ed20fdc626eb0de9f515f04f88 (diff)
downloadredot-engine-3ef5a975054834466107ed8598352e5315a3a191.tar.gz
Verify custom HTTP headers, fix off by one error
Diffstat (limited to 'core/io/http_client_tcp.cpp')
-rw-r--r--core/io/http_client_tcp.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/io/http_client_tcp.cpp b/core/io/http_client_tcp.cpp
index 7865e297c7..24ec35fa3d 100644
--- a/core/io/http_client_tcp.cpp
+++ b/core/io/http_client_tcp.cpp
@@ -146,6 +146,11 @@ Error HTTPClientTCP::request(Method p_method, const String &p_url, const Vector<
ERR_FAIL_COND_V(status != STATUS_CONNECTED, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(connection.is_null(), ERR_INVALID_DATA);
+ Error err = verify_headers(p_headers);
+ if (err) {
+ return err;
+ }
+
String uri = p_url;
if (!ssl && http_proxy_port != -1) {
uri = vformat("http://%s:%d%s", conn_host, conn_port, p_url);