Godot Version
4.5.1
Question
I have 2 questions.
When trying to connect to a non-godot server using the websocket protocol, Bruno (a web request testing tool) connects cleanly, showing 4 response headers for the connection. When trying to connect via godot, I see the error: "Not enough response headers. Got: 2 expected >= 4.”
from the C++ below:
bool WSLPeer::_verify_server_response() {
Vector psa = String::ascii(Span((const char *)handshake_buffer->get_data_array().ptr(), handshake_buffer->get_position() - 4)).split(“\r\n”);
int len = psa.size();
ERR_FAIL_COND_V_MSG(len < 4, false, "Not enough response headers. Got: " + itos(len) + “, expected >= 4.”);
Why is it looking for 4 headers? I don’t believe Godot is even inspecting the headers, making the connector look like it’s in a rough shape.
Bruno shows:
| sec-websocket-version | 13 |
|---|---|
| upgrade | websocket |
| connection | upgrade |
| sec-websocket-accept | LFD5WwPt8F0iIaAdKzy33SIaZSs= |
Is it possible the websocket implementation isn’t parsing the headers properly?