https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2012-05-16T05:27:09Z
Ruby Issue Tracking System
Ruby master - Bug #6436: Byte counting incorrect in BufferedIO (net/protocol.rb)
https://bugs.ruby-lang.org/issues/6436?journal_id=26645
2012-05-16T05:27:09Z
jcast (Jeremie Castagna)
jeremie.castagna@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/2687">protocol.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2687/protocol.patch">protocol.patch</a> added</li></ul><p>Patch file.</p>
Ruby master - Bug #6436: Byte counting incorrect in BufferedIO (net/protocol.rb)
https://bugs.ruby-lang.org/issues/6436?journal_id=26649
2012-05-16T10:05:20Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul><li><strong>File</strong> <a href="/attachments/2689">protocol.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2689/protocol.patch">protocol.patch</a> added</li></ul><p>Emacs diff-mode.el provides a function, diff-context->unified.</p>
Ruby master - Bug #6436: Byte counting incorrect in BufferedIO (net/protocol.rb)
https://bugs.ruby-lang.org/issues/6436?journal_id=26667
2012-05-17T01:03:26Z
mame (Yusuke Endoh)
mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>nobu (Nobuyoshi Nakada)</i></li></ul><p>Thanks Jeremie,<br>
Could you add a test to test/net/http/test_buffered_io.rb ?</p>
<p>Nobu, can you review the patch?</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p>
Ruby master - Bug #6436: Byte counting incorrect in BufferedIO (net/protocol.rb)
https://bugs.ruby-lang.org/issues/6436?journal_id=80771
2019-08-15T01:41:40Z
jeremyevans0 (Jeremy Evans)
merch-redmine@jeremyevans.net
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>It looks like this issue was fixed between Ruby 2.4 and 2.5:</p>
<pre><code>$ ruby24 -rnet/http -e "p Net::HTTP.start('www.falcom.co.jp', 443, :use_ssl=>true){|http| http.request_get('/'){|res| res.read_body{|c| p c.bytesize; c.force_encoding 'UTF-8'}}}"
0
16384
16384
16384
4604
2
5
0
16384
16384
16384
4604
2
5
-e: end of file reached (EOFError)
$ ruby24 -rnet/http -e "p Net::HTTP.start('www.falcom.co.jp', 443, :use_ssl=>true){|http| http.request_get('/'){|res| res.read_body{|c| p c.bytesize}}}"
0
16384
16384
16384
4604
#<Net::HTTPOK 200 OK readbody=true>
$ ruby25 -rnet/http -e "p Net::HTTP.start('www.falcom.co.jp', 443, :use_ssl=>true){|http| http.request_get('/'){|res| res.read_body{|c| p c.bytesize; c.force_encoding 'UTF-8'}}}"
0
16384
16384
16384
4604
#<Net::HTTPOK 200 OK readbody=true>
</code></pre>