yahns Ruby server user/dev discussion
 help / color / 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)
     end
   rescue EOFError
-    warn "BUG: do_pread overreach:\n #{caller.join("\n ")}\n"
     nil
   end
 

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

only message in thread, back to index

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

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

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.yahns

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox