[ktor-server-netty] Unable to send responses larger than ~2GB
See original GitHub issueWe are unable to send responses larger than 2GB which include the Content-Length
header. The issue would appear to be here: https://github.com/ktorio/ktor/blob/e2e622c90f9beba9248249714ec58c0d33e7cfd7/ktor-server/ktor-server-netty/src/io/ktor/server/netty/cio/NettyResponsePipeline.kt#L191
This is also mentioned in the stacktrace we get. We are running version ktor 0.9.2 with ktor-server-netty.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Can't upload file larger than 2GB to webdav by requests #1784
Dear Sir, I can't upload file larger than 2GB to webdav server by requests, and the following is the error message.
Read more >Project 'fatjar' not found in root project - Stack Overflow
on IntelliJ's terminal just like it says I get the following error: FAILURE: Build failed with an exception. What went wrong: Project 'fatjar' ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure. The response body is streamed directly from an external system, hence our need for writing directly to the
ByteWriteChannel
. The code works, even for files larger thanInt.MAX_VALUE
, as long as we don’t send theContent-Length
. For files smaller thanInt.MAX_VALUE
we can send theContent-Length
.Awesome. Please reopen this if it happens again.