You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Media support in Níma HTTP1 currently does not work properly. HttpCallEntityChain buffers everything into the memory, instead of writing into the request OS. It should rather use something similar to ClientConnectionOutputStream which performs sent entity analysis to determine proper transfer-encoding and content-length.
Once this is changed, it will break our current redirect support for entities introduced in #6804. Once the following issue is fixed #6992, it should introduce fix usable also by this issue.
Tomas Langer:
For example when you call ServerResponse.send(Paths.get("/my/file.txt")) the file will be fully buffered into memory.
Possible solutions (there may be more):
have a boolean streaming() on media supports to tell the server and client that this really must be streamed and not cached in memory
have some advanced logic to buffer a certain (max) amount in memory for any provider, and if more bytes would be written, start sending them over the network
In both cases we need to refactor the method send(Object) on server response (and appropriate one on client request)
The text was updated successfully, but these errors were encountered:
tomas-langer
changed the title
Media support in Níma WebClient HTTP1 buffers everything into memory
Media support (such as Path) in Níma HTTP1 buffer into memory
Jun 15, 2023
Media support in Níma HTTP1 currently does not work properly.
HttpCallEntityChain buffers everything into the memory, instead of writing into the request OS. It should rather use something similar to ClientConnectionOutputStream which performs sent entity analysis to determine proper
transfer-encoding
andcontent-length
.Once this is changed, it will break our current redirect support for entities introduced in #6804. Once the following issue is fixed #6992, it should introduce fix usable also by this issue.
Tomas Langer:
For example when you call
ServerResponse.send(Paths.get("/my/file.txt"))
the file will be fully buffered into memory.Possible solutions (there may be more):
boolean streaming()
on media supports to tell the server and client that this really must be streamed and not cached in memoryIn both cases we need to refactor the method
send(Object)
on server response (and appropriate one on client request)The text was updated successfully, but these errors were encountered: