-
Notifications
You must be signed in to change notification settings - Fork 322
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
Re-add io/wait operations #357
Comments
Interesting. If this actually works, I'm all for it. Want to send a PR? |
I'm be "out-of-office" until middle of August, I'll only be able to tackle this then. I'll also need some more data to back up this assumption, but I really think that, for cases like Keep-Alive, we have to wait until #read_nonblock stops sending data. |
It looks like behaviour of
Btw, it looks like #wait_writable can also return nil - ruby/ruby@a4f7274 |
This will get handled in #272. If you'd like to make sure that's the case, please take a look at https://github.com/socketry/socketry |
@tarcieri sweet! I was figuring that the changes would end up there. Still, a few questions:
|
@TiagoCardoso1983 the first case appears to be unhandled. Re: exceptionless I/O for 2.3 mode, I don't really see the value in complicating the logic just for connect/accept |
pkgsrc changes: - sort DEPENDS Upstream changes (from CHANGES.md): ## 3.0.0 (2017-10-01) * Drop support of Ruby `2.0` and Ruby `2.1`. ([@ixti]) * [#410](httprb/http#410) Infer `Host` header upon redirects. ([@janko-m]) * [#409](httprb/http#409) Enables request body streaming on any IO object. ([@janko-m]) * [#413](httprb/http#413), [#414](httprb/http#414) Fix encoding of body chunks. ([@janko-m]) * [#368](httprb/http#368), [#357](httprb/http#357) Fix timeout issue. ([@HoneyryderChuck])
@tarcieri
Coming from #298 and #322
Why
Just to understand my motivation, all ruby net/protocol libraries use
io/wait
, so I'd say it's a must for libraries likehttp
to update support.How
I was testing with the example from #298 until I got the semantics right. Here is the script I used:
Run this script with the 3 strategies and compare the results.
This might be controversial (I also don't fully understand it, as most of the times
#wait_readable
returns nil when it should return false), but you can with the implementation on net/protocol.My faulty presumption: when the connection is Keep-Alive, the server doesn't send EOF/close the socket). I say this because if you see the "bug" strategy, the body is fully there every single time.
The text was updated successfully, but these errors were encountered: