Skip to content

Commit 6506fa7

Browse files
Merge pull request #679 from lightpanda-io/increase-MAX_MESSAGE_SIZE
Increase MAX_MESSAGE_SIZE
2 parents f1d6d38 + 867c72b commit 6506fa7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/server.zig

Lines changed: 3 additions & 6 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,
@@ -1245,11 +1245,8 @@ test "Client: read invalid websocket message" {
12451245
);
12461246
}
12471247

1248-
// 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-
);
1248+
// length of message is 0000 0401, i.e: 1024 * 512 + 1
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)