swindon-rs / tk-http

Full featured HTTP and Websockets library for rust/tokio
Apache License 2.0
136 stars 10 forks source link

Fix pushback #11

Closed tailhook closed 7 years ago

tailhook commented 7 years ago

This issue tracks problem described here: https://github.com/popravich/minihttp/commit/f849057ac0bee661e1d64374334850acc6bf640a#commitcomment-19486411

popravich commented 7 years ago

see @3ea08748b8156e2fe05313e3b8d13add3ffe5132

tailhook commented 7 years ago

No, we don't need to buffer data in. The whole point of backpressure is not to read data in.

Solution would be to try read after polling if we haven't done reading before.

tailhook commented 7 years ago

Furthermore, it doesn't fix the problem :) I.e. the data is in the input buffer, but nobody would trigger the future to actually parse request from there.

tailhook commented 7 years ago

It's not an issue any more since tk-bufstream is used. The real issue is #5