Merge pull request #56771 from mhilbrunner/unacceptable

Verify custom HTTP headers, fix off by one error
This commit is contained in:
Fabio Alessandrelli 2022-02-02 18:28:30 +01:00 committed by GitHub
commit 6ff753675a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 72 additions and 53 deletions

View file

@ -87,6 +87,11 @@ Error HTTPClientJavaScript::request(Method p_method, const String &p_url, const
ERR_FAIL_COND_V(port < 0, ERR_UNCONFIGURED);
ERR_FAIL_COND_V(!p_url.begins_with("/"), ERR_INVALID_PARAMETER);
Error err = verify_headers(p_headers);
if (err) {
return err;
}
String url = (use_tls ? "https://" : "http://") + host + ":" + itos(port) + p_url;
Vector<CharString> keeper;
Vector<const char *> c_strings;