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

Add ArmeriaServerBuilder#withMaxRequestLength #570

Merged
merged 4 commits into from
Dec 7, 2024

Conversation

danicheg
Copy link
Member

@danicheg danicheg commented Dec 3, 2024

Exposing ServerBuilder#maxRequestLength in ArmeriaServerBuilder for handiness.

@@ -50,7 +50,9 @@ class ArmeriaServerBuilderSuite extends CatsEffectSuite with ServerFixture {
IO(Thread.currentThread.getName).flatMap(Ok(_))

case req @ POST -> Root / "echo" =>
Ok(req.body)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An interesting issue occurred with the previous version of request body handling: the test suite hanged when running a test to check for exceeding the maxRequestLength limit. This was likely caused by an exception com.linecorp.armeria.common.ContentTooLargeException propagated from Armeria to fs2 Stream. Ultimately, the request's body stream wasn't consumed resulting in not releasing some resources and hanging. It raises an interesting question about how we handle that exception from Armeria in the integration, but I'll leave it for another PR.

@danicheg danicheg requested a review from ikhoon December 3, 2024 11:11
@danicheg danicheg merged commit a9b3c50 into http4s:main Dec 7, 2024
9 checks passed
@danicheg danicheg deleted the builder-extensions branch December 7, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant