1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

[Net] Fix WebSocketClient path parsing.

Recent changes to parse_url caused the client to make invalid HTTP
requests if no path was specified.
This commit is contained in:
Fabio Alessandrelli
2021-06-28 13:21:00 +02:00
parent ce7f599208
commit d244dda597
2 changed files with 7 additions and 3 deletions

View File

@@ -158,6 +158,7 @@ bool WSLClient::_verify_headers(String &r_protocol) {
Error WSLClient::connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const Vector<String> p_protocols, const Vector<String> p_custom_headers) {
ERR_FAIL_COND_V(_connection.is_valid(), ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V(p_path.is_empty(), ERR_INVALID_PARAMETER);
_peer = Ref<WSLPeer>(memnew(WSLPeer));
IPAddress addr;