Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non const req #41

Merged
merged 10 commits into from
Jul 19, 2024
8 changes: 4 additions & 4 deletions source/vibe/http/websockets.d
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ final class WebSocket {
ConnectionStream m_conn;
bool m_sentCloseFrame = false;
IncomingWebSocketMessage m_nextMessage = null;
const HTTPServerRequest m_request;
HTTPServerRequest m_request;
HTTPServerResponse m_serverResponse;
HTTPClientResponse m_clientResponse;
Task m_reader;
Expand Down Expand Up @@ -543,7 +543,7 @@ scope:
* rng = Source of entropy to use. If null, assume we're a server socket
* client_res = For client sockets, the response object (keeps the http client locked until the socket is done)
*/
private this(ConnectionStream conn, const HTTPServerRequest request, HTTPServerResponse server_res, RandomNumberStream rng, HTTPClientResponse client_res)
private this(ConnectionStream conn, HTTPServerRequest request, HTTPServerResponse server_res, RandomNumberStream rng, HTTPClientResponse client_res)
{
m_ownerTask = Task.getThis();
m_conn = conn;
Expand Down Expand Up @@ -573,7 +573,7 @@ scope:
this(conn, null, null, rng, client_res);
}

private this(ConnectionStream conn, in HTTPServerRequest request, HTTPServerResponse res)
private this(ConnectionStream conn, HTTPServerRequest request, HTTPServerResponse res)
{
this(conn, request, res, null, null);
}
Expand Down Expand Up @@ -610,7 +610,7 @@ scope:
/**
The HTTP request that established the web socket connection.
*/
@property const(HTTPServerRequest) request() const { return m_request; }
@property HTTPServerRequest request() { return m_request; }
s-ludwig marked this conversation as resolved.
Show resolved Hide resolved

/**
Checks if data is readily available for read.
Expand Down
Loading