Skip to content
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

Test failures with webrick 1.7 #448

Open
dleidert opened this issue Nov 28, 2021 · 3 comments
Open

Test failures with webrick 1.7 #448

dleidert opened this issue Nov 28, 2021 · 3 comments

Comments

@dleidert
Copy link

We see the tests in httpclient run into timeouts with webrick 1.7.0. I was able to track it down to this line in lib/httpclient/session.rb:

    799     StatusParseRegexp = %r(\AHTTP/(\d+\.\d+)\s+(\d\d\d)\s*([^\r\n]+)?\r?\n\z)
    800     def parse_header(socket)
    801       ::Timeout.timeout(@receive_timeout, ReceiveTimeoutError) do
    802         initial_line = nil
    803         begin
    804           begin
=>  805             initial_line = socket.gets("\n")
    806             if initial_line.nil?
    807               close
    808               raise KeepAliveDisconnected.new(self)
    809             end
    810           rescue Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE, IOError

Here it "stalls". The problem is caused by this small change in webrick:

ruby/webrick@069e9b1

@dleidert
Copy link
Author

dleidert commented Nov 28, 2021

I have just been informed by a colleague that the commit has been reverted in webrick: ruby/webrick#67, but there is not yet a new version of it. So you'll probably try to stay clear of version 1.7.0.

@patbl
Copy link

patbl commented Jun 1, 2022

Thanks for noting this! I was running the tests on Ruby 3.0 to test compatibility with that version of Ruby, and the tests pass when I add Webrick 1.6.1 to the Gemfile. So I guess it's compatible with Ruby 3.0 even though it hasn't been updated in a while.

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Dec 24, 2022
Tests pass with all Rubys *but* they hang even before this commit with even
Ruby 2.7 unless dev-ruby/webrick has a patch applied.

Bug: ruby/webrick#67
Bug: nahi/httpclient#448
Bug: https://bugs.gentoo.org/844892
Signed-off-by: Sam James <sam@gentoo.org>
@thesamesam
Copy link

webrick-1.8.0 and webrick-1.8.1 have been released in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants