From: Aaron Patterson Date: 2011-01-25T02:42:06+09:00 Subject: Re: Legacy bug in net/imap in Ruby 1.9.x --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 21, 2011 at 01:39:45AM +0900, T. N. T. wrote: > Hello >=20 > Since I'm using Rails 2.3.8 with Ruby 1.9.2 the sent emails are cut-off > at the end. Not always but only in non-multipart mails where the headers >=20 > Content-Type: text/plain; charset=3Dutf-8 > Content-Transfer-Encoding: 8bit >=20 > apply to the content (in multipart mails Tmail makes the text/plain-part > have Content-Transfer-Encoding: Quoted-printable). >=20 > This fixes the problem: >=20 > module Net > class IMAP > def send_literal(str) > put_string("{" + str.bytesize.to_s + "}" + CRLF) > @continuation_request_arrival.wait > raise @exception if @exception > put_string(str) > end > end > end >=20 > The change is "str.length.to_s" -> "str.bytesize.to_s". Will you file a ticket in the redmine tracker for this so that it gets fixed in ruby-core? http://redmine.ruby-lang.org/projects/ruby-19/issues?set_filter=3D1&track= er_id=3D1 Thanks. --=20 Aaron Patterson http://tenderlovemaking.com/ --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iQEcBAEBAgAGBQJNPbnoAAoJEJUxcLy0/6/GtwIH/3X0F3w1xWalberoRUb5SlwT 3tiufAlRaugvIoa+/FdwrubcNL+dWj3YAggKFMkdu6acZ2XU+IrD2+BiJYeC1NAo hDvX8XfSq9ayPTQzNa0yxi09Hnml5jP8/BQOnZT/BGcO6vGh4hqS+YLRvdqLPhMz DDfAVSRotNGiI8fRnDrmUDnoBO6JdSeFkGTC75RBRnaDyg5NuixTrXgrdDtx8gVW dJhSl7ts3Bjc/6cCnkXq1bW7AOCktjneiV0/X0N+G/xiz0UOvjrdvwruFbzLNKJC DxZe7PNfOiXdkNC++QJs0DWHzMsZjB4Syd7xchLocIhK2viL2nwKD21BebOaCn0= =b3pq -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI--