Re: [PATCH] tempfile.rb (was Re: Bug in open-uri under win32 (?))

From: matz@... (Yukihiro Matsumoto)
Date: 2004-05-16 11:39:39 UTC
List: ruby-core #2881
Hi,

In message "[PATCH] tempfile.rb (was Re: Bug in open-uri under win32 (?))"
    on 04/05/16, Mauricio Fernández <batsman.geo@yahoo.com> writes:

|On Sun, May 16, 2004 at 05:00:33PM +0900, Mauricio Fern�ández wrote:
|> I'm told that this doesn't download the file correctly under windows
|> (only a few KB are dled). On visual inspection, the associated Tempfile
|> is not complete either, so the same behavior is observed when using
|> is.gets(nil) or a loop with eof?.
|
|The bug has been traced back to Tempfile, which doesn't use the binary
|mode for the underlying file. IMHO it should since the tempfile isn't
|meant to be seen by other processes, so CRLF translation (and other
|oddities such as ETB) makes no sense.

CVS 1.8 open-uri calls binmode for tempfile, to solve this problem.

							matz.


In This Thread