Legacy bug in net/imap in Ruby 1.9.x

Hello

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

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

apply to the content (in multipart mails Tmail makes the text/plain-part
have Content-Transfer-Encoding: Quoted-printable).

This fixes the problem:

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

The change is “str.length.to_s” -> “str.bytesize.to_s”.

Regards, T.

On Fri, Jan 21, 2011 at 01:39:45AM +0900, T. N. T. wrote:

end
end

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=1&tracker_id=1

Thanks.

Aaron P. wrote in post #977198:

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=1&tracker_id=1

Thanks.

Done so (I must admit I’ve been too lazy):
http://redmine.ruby-lang.org/issues/show/4318

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs