In article <E1AMlCP-0007Yo-UG / odie.runbox.com>,
  "T. Onoma" <transami / runbox.com> writes:

> i had idea: maybe have sepereate method to ask just for header info, and this method could also get total size and time it took fetch header.  you said ftp needed a seperate fetch to get total anyway right? add one for http too. that way people can test connections which is good, and get useful information. and perhaps sometimes all they want is header. so you could kill two birds with one stone. actually three bird! :) does that make sense?

I rethought about measuring speed of connection.

If you want to measure speed including open-uri's overhead, it can be
implemented as:

t1 = Time.now
size = open("http://...") {|f| f.size }
t2 = Time.now
p size / (t2 - t1)

If you want to measure speed without open-uri's overhead, it should be
implemented without open-uri.

So, open-uri doesn't need modification anyway.
-- 
Tanaka Akira