Open carlhoerberg opened 2 years ago
@carlhoerberg Is there a chance of adding a test for this? https://github.com/ruby/webrick/blob/master/test/webrick/test_cgi.rb - perhaps there?
I don't see how this change can have any impact on the backtrace from the PR description. The PR changes WEBrick::CGI::Socket#eof?
but the trace indicates that WEBrick::HTTPServer
is used and causing the error.
Also: I also cannot reproduce this behavior with wget
.
However, I also see this error from time to time, I think when using Safari, but not 100% sure when this happens exactly. In any case WEBrick::HTTPServer#run
does have an issue when the connection is reset. Testing this is a little tricky and there are multiple ways to address this. Will send a PR when I have poked around a little more.
Some clients (
wget
) resets the TCP connection when 404 is received, webrick then logs: