yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
* [PATCH] http_client: do not warn on do_pread overreach
@ 2018-12-08 11:39 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2018-12-08 11:39 UTC (permalink / raw)
  To: yahns-public

Without sendfile, we can hit EOFError on IO#pread
if a file we're serving gets truncated mid-response.
This was causing test_truncated_sendfile failures;
but I didn't notice before because I forgot to set
SENDFILE_BROKEN=1 to disable the test.
 lib/yahns/http_client.rb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/yahns/http_client.rb b/lib/yahns/http_client.rb
index d55a0db..8744053 100644
--- a/lib/yahns/http_client.rb
+++ b/lib/yahns/http_client.rb
@@ -332,7 +332,6 @@ def do_pread(io, count, offset)
       io.read(count, buf)
   rescue EOFError
-    warn "BUG: do_pread overreach:\n #{caller.join("\n ")}\n"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-08 11:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-08 11:39 [PATCH] http_client: do not warn on do_pread overreach Eric Wong

yahns Ruby server user/dev discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhbt.net/yahns-public
	git clone --mirror http://ou63pmih66umazou.onion/yahns-public

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 yahns-public yahns-public/ https://yhbt.net/yahns-public \
		yahns-public@yhbt.net yahns-public@rubyforge.org
	public-inbox-index yahns-public

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:


AGPL code for this site: git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git