Page not fully rendered (Compression + HTML builder)
See original GitHub issueI 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 some BufferedWriter
and the compression takes the content of buffer and ends the HTTP request even if the content as not complete the html generation.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
@Bluexin See https://github.com/ktorio/ktor/issues/742
Workarounded in 1.0.0-beta-4