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

[bugfix] Fix chunk size for Netty Cats file body #3065

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

kciesielski
Copy link
Member

Should be NettyToResponseBody.DefaultChunkSize instead r.contentLength.toInt
Additional formatting fixes.

@kciesielski kciesielski requested a review from adamw July 24, 2023 07:48

case RawBodyType.FileBody =>
val tapirFile = v
val path = Path.fromNioPath(tapirFile.file.toPath)
val stream = tapirFile.range
.flatMap(r => r.startAndEnd.map(s => Files[F](Files.forAsync[F]).readRange(path, r.contentLength.toInt, s._1, s._2)))
Copy link
Member

Choose a reason for hiding this comment

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

indeed, that was a big chunk ;)

@kciesielski kciesielski added bug Something isn't working Netty labels Jul 24, 2023
@adamw adamw merged commit 19a5ebc into master Jul 24, 2023
@mergify mergify bot deleted the bugfix/netty-cats-chunk-size branch July 24, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Netty
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants