diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-01-20 22:50:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 22:50:39 +0100 |
commit | cfb986c6318f61b4b67bc3af4188c06a0717bd9a (patch) | |
tree | 373b028bfbae8d082db1038e222b70543c111185 /modules/websocket/wsl_client.cpp | |
parent | e6170aae39194a6ada312ff8a3f53a36bf16aff8 (diff) | |
parent | bd448e5535686a4473d185f4103b4ac4dedf0c71 (diff) | |
download | redot-engine-cfb986c6318f61b4b67bc3af4188c06a0717bd9a.tar.gz |
Merge pull request #51452 from omar-polo/fix-macros
Diffstat (limited to 'modules/websocket/wsl_client.cpp')
-rw-r--r-- | modules/websocket/wsl_client.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/websocket/wsl_client.cpp b/modules/websocket/wsl_client.cpp index bccbf88417..be1c75c354 100644 --- a/modules/websocket/wsl_client.cpp +++ b/modules/websocket/wsl_client.cpp @@ -124,17 +124,17 @@ bool WSLClient::_verify_headers(String &r_protocol) { } } -#define _WSL_CHECK(NAME, VALUE) \ +#define WSL_CHECK(NAME, VALUE) \ ERR_FAIL_COND_V_MSG(!headers.has(NAME) || headers[NAME].to_lower() != VALUE, false, \ "Missing or invalid header '" + String(NAME) + "'. Expected value '" + VALUE + "'."); -#define _WSL_CHECK_NC(NAME, VALUE) \ +#define WSL_CHECK_NC(NAME, VALUE) \ ERR_FAIL_COND_V_MSG(!headers.has(NAME) || headers[NAME] != VALUE, false, \ "Missing or invalid header '" + String(NAME) + "'. Expected value '" + VALUE + "'."); - _WSL_CHECK("connection", "upgrade"); - _WSL_CHECK("upgrade", "websocket"); - _WSL_CHECK_NC("sec-websocket-accept", WSLPeer::compute_key_response(_key)); -#undef _WSL_CHECK_NC -#undef _WSL_CHECK + WSL_CHECK("connection", "upgrade"); + WSL_CHECK("upgrade", "websocket"); + WSL_CHECK_NC("sec-websocket-accept", WSLPeer::compute_key_response(_key)); +#undef WSL_CHECK_NC +#undef WSL_CHECK if (_protocols.size() == 0) { // We didn't request a custom protocol ERR_FAIL_COND_V(headers.has("sec-websocket-protocol"), false); |