Open ktoso opened 7 years ago
Comment by jrudolph
Thursday Sep 24, 2015 at 08:59 GMT
This ties in with the proposals in (17694) https://github.com/akka/akka-http/issues/105 and should probably approached "holistically".
In general, several parsing modes are possible that would determine what kind of entities the user can expect when receiving an HttpMessage:
Comment by ktoso
Thursday Sep 24, 2015 at 12:03 GMT
Thanks a lot for reporting this and the insights, makes a lot of sense, marking triaged for now.
Comment by ktoso
Thursday May 19, 2016 at 01:15 GMT
Triaged. Also, one of the things which might impact our behaviour in raw throughput benchmarks I think.
Any progress on this?
No comments / markers means no progress, as simple as that. We have more urgent things to ship on our plates sadly right now - finishing 10.0 stable as well as HTTP/2 work.
We'd be thrilled to see a community contribution, e.g. from yourself since you seem interested, of this feature. Happy to provide guidance how to start working on it but won't have the time to do so myself in the next weeks.
Related ticket https://github.com/akka/akka-http/issues/105
Any progress on this?
Currently the core layer only strictifies incoming message entities if the response bytes are fully contained in the chunk of bytes that have currently been read from the receive buffer. Since this is non-deterministic the user always has the responsibility for "draining" the entity bytes from the connection in order to free it up for subsequent messages.
The proposal is to introduce a new config setting called
akka.http.parsing.auto-to-strict
which increases user convenience for the standard case (when the entity is "small") and at the same time removes all non-determinism.Possible values for the setting:
off
The parser never creates strict entities, even if the bytes are "already there".on
The parser always strictifies unchunked entities. Boundedness is achieved solely via themax-content-length
setting.<int value>
The content-length threshold up to which the parser automatically strictifies the entity.