-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Page not fully rendered (Compression + HTML builder) #708
Comments
I was able to reproduce this bug on Jetty and Netty. |
Might be the same cause as #685 |
Workarounded in 1.0.0-beta-4 |
Thanks @cy6erGn0m for this quick resolution. You indicates the solution to be a workaround. Are there some limitations with this implementation? |
This solution is not good enough due to performance impact (introduces scheduling delay) |
Is there an issue open for tracking updates for an actual definitive fix ? Seeing this is just a workaround (so it doesn't get forgotten) |
I put brackets on Compress and HTML builder because I'm not completely sure of what is happening.
The problem appeared on some pages generated from markdown files through HTML builders. The MD files are parsed and transformed into HTML with a third party library. This HTML is then injected into HTML builders using an
unsafe
block. MD files, and by extension unsafe content, can be quite big.When loading pages from a browser they often appear to be only partially rendered even though the HTTP code is 200.
My current intuition, after some debugging and with a partial knowledge of ktor internals, is that the bug comes from the combination of
Compression
feature and big html streams. At one moment, the html stream uses someBufferedWriter
and the compression takes the content of buffer and ends the HTTP request even if the content as not complete the html generation.The text was updated successfully, but these errors were encountered: