[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Net::HTTP::get statis of a chunked response

Aníbal Rojas

12/27/2006 2:15:00 PM

Hello,

I am using a code like:

# using block
File.open('result.txt', 'w') {|f|
resp, data = http.get('/~foo/') do |str|
f.write str
end
}

To read a chunked response from a server (a large file) Docs say:
"In version 1.2, this method never raises exception."

How can I know if the transfer was Ok? Just checking the size
reported by the content-length header against the size of the file
written to disk? Or is there any other recommended way?

Thanks in advance,

--
Anibal Rojas
http://www.ruby...
http://www.hasmanydeve...

1 Answer

Ara.T.Howard

12/27/2006 2:49:00 PM

0