Skip to content

Commit 04ceee1

Browse files
committedJan 2, 2023
fix typo
1 parent d2a3f1d commit 04ceee1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎src/handshake.zig

+5-5
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ test "valid ws handshake" {
281281
try testing.expectEqualSlices(u8, stm.written(), &http_request.*);
282282
}
283283

284-
test "read client_max_windwo_bits" {
284+
test "read server_max_window_bits" {
285285
const http_response = "HTTP/1.1 101 Switching Protocols" ++ crlf ++
286286
"Server: AutobahnTestSuite/0.8.2-0.10.9" ++ crlf ++
287287
"X-Powered-By: AutobahnPython/0.10.9" ++ crlf ++
@@ -301,16 +301,16 @@ test "read client_max_windwo_bits" {
301301
cs.readOptions(&rsp);
302302
try testing.expect(cs.options.per_message_deflate);
303303

304-
var cmwb: ?[]const u8 = null;
304+
var max_window_bits: ?[]const u8 = null;
305305
for (rsp.headers) |h| {
306306
if (h.keyMatch("sec-websocket-extensions")) {
307307
if (h.paramValue("server_max_window_bits")) |v| {
308-
cmwb = v;
308+
max_window_bits = v;
309309
}
310310
}
311311
}
312-
try testing.expect(cmwb != null);
313-
try testing.expectEqualSlices(u8, cmwb.?, "12");
312+
try testing.expect(max_window_bits != null);
313+
try testing.expectEqualSlices(u8, max_window_bits.?, "12");
314314
try testing.expectEqual(cs.options.server_max_window_bits, 12);
315315
}
316316

0 commit comments

Comments
 (0)