Maybe it is also good to notice, that the method allocates a String Buffer of file size length before starting to download. Depending on the file size, your RAM and maybe vm memory settings, this could also lead to a (very) long pause. So as an example the following might work on your machine, but on mine the download never starts! :}
'http://debian.uni-essen.de/debian-cd/3.1_r0a/i386/iso-cd/debian-31r0a-i386-b...' asUrl retrieveContents
Alex
David Shaffer schrieb:
Alexander Lazarević wrote:
I think you could change the following method in HTTPSocket to get a progress display of any HTTP download.
getRestOfBuffer: beginning totalLength: length ... 'Downloading' displayProgressAt: Display center from: 0 to: length during: [:bar| [(response position < length) & (self isConnected | self dataAvailable)] whileTrue: [ bar value: response position. (self waitForDataUntil: (Socket deadlineSecs: 5)) ifFalse: [ ...
Thanks!
David