Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netty (fix): Support reading up to 64kb HTTP header #3387

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,15 @@ class NettyServer(config: NettyServerConfig, session: Session) extends HttpServe
val pipeline = ch.pipeline()

// pipeline.addLast(new IdleStateHandler(1, 1, 60, TimeUnit.SECONDS))
pipeline.addLast(new HttpServerCodec()) // 4096, 8192, Int.MaxValue, false))
pipeline.addLast(
new HttpServerCodec(
4096, // the same with Netty's default MAX_INITIAL_LINE_LENGTH
64 * 1024, // Upto ALB's max request header size
// No need to limit the chunk size in Netty. Ref https://github.com/twitter/finagle/commit/990c8650366e5374ea062c753a4628c5971fc40e
Int.MaxValue,
false // Skip header validation
)
)
// pipeline.addLast(new HttpServerKeepAliveHandler())
pipeline.addLast(new HttpObjectAggregator(Int.MaxValue))
pipeline.addLast(new HttpContentCompressor())
Expand Down
Loading