Skip to content

Commit 3f6b095

Browse files
committed
Increase MAX_MESSAGE_SIZE
1 parent f1d6d38 commit 3f6b095

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/server.zig

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const MAX_HTTP_REQUEST_SIZE = 2048;
4545
// max message size
4646
// +14 for max websocket payload overhead
4747
// +140 for the max control packet that might be interleaved in a message
48-
const MAX_MESSAGE_SIZE = 256 * 1024 + 14;
48+
const MAX_MESSAGE_SIZE = 512 * 1024 + 14;
4949

5050
const Server = struct {
5151
app: *App,
@@ -1246,10 +1246,7 @@ test "Client: read invalid websocket message" {
12461246
}
12471247

12481248
// length of message is 0000 0401, i.e: 1024 * 256 + 1
1249-
try assertWebSocketError(
1250-
1009,
1251-
&.{ 129, 255, 0, 0, 0, 0, 0, 4, 0, 1, 'm', 'a', 's', 'k' },
1252-
);
1249+
try assertWebSocketError(1009, &.{ 129, 255, 0, 0, 0, 0, 0, 8, 0, 1, 'm', 'a', 's', 'k' });
12531250

12541251
// continuation type message must come after a normal message
12551252
// even when not a fin frame

0 commit comments

Comments
 (0)