mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 19:24:18 +00:00
Verify custom HTTP headers, fix off by one error
This commit is contained in:
parent
3a83872d26
commit
3ef5a97505
5 changed files with 25 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue