To see if a server accept REST command, I send with Ftpcommand : REST 5
If the function return True, then the server accept REST
Then I send the commands :
REST SizeAlreadyDownloaded
and
RETR RemoteFile
The server return always an error 550 (invalid directory - syntax error)
and then return 150 (OK)
The download with InternetReadfile works.
With certain servers : no problem the "resume broken file" works
But with others (Like ftp.microsoft.com which accept REST) the download
restarts at 0
The same problem occurs with the example on the vbip site.
The ones that are failing are probably RFC compliant. The REST command is
supposed to refer to the following command only. Note - not the following
transfer, but the following command. Hence, if you're calling REST before a
RETRieve, you must send PORT or PASV, then REST, then RETR. If you call
REST, then PORT or PASV, then RETR, you are essentially voiding out your
REST request.
The WinInet libraries don't (last time I looked, at least) allow you to
insert commands between the PORT or PASV and the RETR.
Alun.
~~~~
[Please don't email posters, if a Usenet response is appropriate.]
--
Texas Imperial Software | Find us at http://www.wftpd.com or email
1602 Harvest Moon Place | al...@texis.com.
Cedar Park TX 78613-1419 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(512)258-9858 | Try our NEW client software, WFTPD Explorer.
Thanks for your response Alun