Skip to content
Snippets Groups Projects

HTTP Basic Auth for websocket

Merged Sebastian Hahta requested to merge feature/http-auth into master
1 file
+ 2
0
Compare changes
  • Side-by-side
  • Inline
@@ -210,6 +210,8 @@ bool ftl::net::ws_connect(SOCKET sockfd, const URI &uri, const ws_options &optio
http += "Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n";
http += "Sec-WebSocket-Version: 13\r\n";
http += "\r\n";
// TODO: Check/process HTTP response code
int rc = ::send(sockfd, http.c_str(), (int)http.length(), 0);
if (rc != (int)http.length()) {
LOG(ERROR) << "Could not send Websocket http request... (" << rc << ", " << errno << ")";
Loading