Verify custom HTTP headers, fix off by one error

This commit is contained in:
Max Hilbrunner
2022-01-14 03:22:23 +01:00
parent 3a83872d26
commit 3ef5a97505
5 changed files with 25 additions and 3 deletions

View File

@ -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);