ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "jcast (Jeremie Castagna)" <jeremie.castagna@gmail.com>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:45063] [ruby-trunk - Bug #6436] Byte counting incorrect in BufferedIO (net/protocol.rb)
Date: Wed, 16 May 2012 05:27:35 +0900	[thread overview]
Message-ID: <redmine.journal-26645.20120516052709@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-6436.20120516050958@ruby-lang.org


Issue #6436 has been updated by jcast (Jeremie Castagna).

File protocol.patch added

Patch file.
----------------------------------------
Bug #6436: Byte counting incorrect in BufferedIO (net/protocol.rb)
https://bugs.ruby-lang.org/issues/6436#change-26645

Author: jcast (Jeremie Castagna)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 1.9


BufferedIO's @rbuf counts bytes with String#size, but should use String#bytesize. This creates potential incorrect reading of a HTTP body when changing the encoding of each chuck passed by HTTP#read_body:

http.read_body do |chunk|
  chunk.force_encoding "UTF-8"
end


-- 
http://bugs.ruby-lang.org/

  reply	other threads:[~2012-05-15 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15 20:10 [ruby-core:45062] [ruby-trunk - Bug #6436][Open] Byte counting incorrect in BufferedIO (net/protocol.rb) jcast (Jeremie Castagna)
2012-05-15 20:27 ` jcast (Jeremie Castagna) [this message]
2012-05-15 23:52   ` [ruby-core:45068] Re: [ruby-trunk - Bug #6436] " Eric Wong
2012-05-16  1:05 ` [ruby-core:45070] " nobu (Nobuyoshi Nakada)
2012-05-16 16:03 ` [ruby-core:45094] [ruby-trunk - Bug #6436][Assigned] " mame (Yusuke Endoh)
2019-08-15  1:41 ` [ruby-core:94361] [Ruby master Bug#6436] " merch-redmine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-26645.20120516052709@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).