mirror of
https://github.com/defold/extension-websocket.git
synced 2025-06-27 01:47:42 +02:00
Merge pull request #20 from defold/issue-17-path-fix
Issue 17: Fixed path argument in http handshake
This commit is contained in:
commit
70afde4cfa
@ -40,8 +40,12 @@ static Result SendClientHandshakeHeaders(WebsocketConnection* conn)
|
||||
dmSnPrintf(port, sizeof(port), ":%d", conn->m_Url.m_Port);
|
||||
|
||||
dmSocket::Result sr;
|
||||
WS_SENDALL("GET /");
|
||||
WS_SENDALL("GET ");
|
||||
if (conn->m_Url.m_Path[0] == '\0') {
|
||||
WS_SENDALL("/"); // Default to / for empty path
|
||||
} else {
|
||||
WS_SENDALL(conn->m_Url.m_Path);
|
||||
}
|
||||
WS_SENDALL(" HTTP/1.1\r\n");
|
||||
WS_SENDALL("Host: ");
|
||||
WS_SENDALL(conn->m_Url.m_Hostname);
|
||||
|
Loading…
x
Reference in New Issue
Block a user