a73x

bbb0806e

style: zig fmt test/wsclient.zig — the one straggler since the last sweep

a73x   2026-08-14 07:38

Commit message
style: zig fmt test/wsclient.zig — the one straggler since the last sweep

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

test/wsclient.zig
Old New
@@ -327,8 +327,7 @@ pub fn main() !void {
327 327
328 const default_origin = try std.fmt.allocPrint(alloc, "http://127.0.0.1:{d}", .{p}); 328 const default_origin = try std.fmt.allocPrint(alloc, "http://127.0.0.1:{d}", .{p});
329 defer alloc.free(default_origin); 329 defer alloc.free(default_origin);
330 const req = try std.fmt.allocPrint(alloc, 330 const req = try std.fmt.allocPrint(alloc, "GET /ws/{d} HTTP/1.1\r\n" ++
331 "GET /ws/{d} HTTP/1.1\r\n" ++
332 "host: 127.0.0.1:{d}\r\n" ++ 331 "host: 127.0.0.1:{d}\r\n" ++
333 "connection: upgrade\r\n" ++ 332 "connection: upgrade\r\n" ++
334 "upgrade: websocket\r\n" ++ 333 "upgrade: websocket\r\n" ++
@@ -350,7 +349,7 @@ pub fn main() !void {
350 try head.appendSlice(alloc, b[0..n]); 349 try head.appendSlice(alloc, b[0..n]);
351 } 350 }
352 const head_end = std.mem.indexOf(u8, head.items, "\r\n\r\n").? + 4; 351 const head_end = std.mem.indexOf(u8, head.items, "\r\n\r\n").? + 4;
353 const status_line = head.items[0 .. std.mem.indexOf(u8, head.items, "\r\n").?]; 352 const status_line = head.items[0..std.mem.indexOf(u8, head.items, "\r\n").?];
354 if (std.mem.indexOf(u8, status_line, "101") == null) 353 if (std.mem.indexOf(u8, status_line, "101") == null)
355 fatal(EXIT_DIED, "upgrade refused: {s}", .{status_line}); 354 fatal(EXIT_DIED, "upgrade refused: {s}", .{status_line});
356 // The accept key must be OUR key's digest — a hub echoing a canned 355 // The accept key must be OUR key's digest — a hub echoing a canned