1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:17:35 +00:00

WebSocket: Avoid unnecessary IPC::Dictionary wrapper

We already have and use HashMap<DeprecatedString, DeprecatedString>
nearly everywhere, which is equivalent.
This commit is contained in:
Ben Wiederhake 2023-05-14 23:04:47 +02:00 committed by Andreas Kling
parent 9b9a38ec81
commit d030f0fe9b
4 changed files with 8 additions and 8 deletions

View file

@ -27,7 +27,7 @@ void ConnectionFromClient::die()
}
Messages::WebSocketServer::ConnectResponse ConnectionFromClient::connect(URL const& url, DeprecatedString const& origin,
Vector<DeprecatedString> const& protocols, Vector<DeprecatedString> const& extensions, IPC::Dictionary const& additional_request_headers)
Vector<DeprecatedString> const& protocols, Vector<DeprecatedString> const& extensions, HashMap<DeprecatedString, DeprecatedString> const& additional_request_headers)
{
if (!url.is_valid()) {
dbgln("WebSocket::Connect: Invalid URL requested: '{}'", url);
@ -40,7 +40,7 @@ Messages::WebSocketServer::ConnectResponse ConnectionFromClient::connect(URL con
connection_info.set_extensions(extensions);
Vector<ConnectionInfo::Header> headers;
for (auto const& header : additional_request_headers.entries()) {
for (auto const& header : additional_request_headers) {
headers.append({ header.key, header.value });
}
connection_info.set_headers(headers);