Skip to content

Commit 889c29a

Browse files
Merge pull request #871 from lightpanda-io/ws-http-max
ws: increase max http message from 2kb to 4kb
2 parents febcc0a + 886c137 commit 889c29a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const CDP = @import("cdp/cdp.zig").CDP;
3939

4040
const TimeoutCheck = std.time.ns_per_ms * 100;
4141

42-
const MAX_HTTP_REQUEST_SIZE = 2048;
42+
const MAX_HTTP_REQUEST_SIZE = 4096;
4343

4444
// max message size
4545
// +14 for max websocket payload overhead
@@ -1142,7 +1142,7 @@ test "Client: http invalid request" {
11421142
var c = try createTestClient();
11431143
defer c.deinit();
11441144

1145-
const res = try c.httpRequest("GET /over/9000 HTTP/1.1\r\n" ++ "Header: " ++ ("a" ** 2050) ++ "\r\n\r\n");
1145+
const res = try c.httpRequest("GET /over/9000 HTTP/1.1\r\n" ++ "Header: " ++ ("a" ** 4100) ++ "\r\n\r\n");
11461146
try testing.expectEqualStrings("HTTP/1.1 413 \r\n" ++
11471147
"Connection: Close\r\n" ++
11481148
"Content-Length: 17\r\n\r\n" ++

0 commit comments

Comments
 (0)