Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PRB: wininet and Broken File

5 views
Skip to first unread message

DJM

unread,
Sep 14, 2003, 1:26:54 PM9/14/03
to
I use wininet for a FTP client

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.

Alun Jones [MS MVP]

unread,
Sep 14, 2003, 1:41:46 PM9/14/03
to
In article <3f64a4d9$0$24135$ba62...@reader1.news.skynet.be>, "DJM"
<jde...@oterwin.be> wrote:
>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.

DJM

unread,
Sep 15, 2003, 9:17:10 AM9/15/03
to
>
> The WinInet libraries don't (last time I looked, at least) allow you to
> insert commands between the PORT or PASV and the RETR.
>
I believe that it is the problem :
When I send REST and then RETR, Wininet inserts the commands TYPE and PORT
between REST and RETR
Why this works with certains server and no with others ? I dont Know

Thanks for your response Alun


0 new messages