Paul Slootman <[EMAIL PROTECTED]> writes:

> Strange... In the browser I'm downloading a file. Unfortunately the
> server doesn't have the correct mime type, so mozilla is showing me the
> binary data. The download takes some time, so I fire up an xterm, and
> do:
> 
> http_proxy=http://localhost:8080/ wget 
> http://www.dream-multimedia-tv.de/dm7000/update/rel107.img
> 
> The wget is immediately done, and results in an incomplete file.
> 
> Here's the log:
> 
> 21:13:03 wurtel wwwoffled[21592]: HTTP Proxy connection from host localhost 
> ([0:0:0:0:0:ffff:7f00:1]).
> 21:13:03 wurtel wwwoffled[21592]: Forked wwwoffles -real (pid=28536).
> 21:13:03 wurtel wwwoffles[28536]: 
> URL='http://www.dream-multimedia-tv.de/dm7000/update/rel107.img'.
> 21:13:03 wurtel wwwoffles[28536]: Cache Access Status='New Page'.
> 21:13:39 wurtel wwwoffled[21592]: HTTP Proxy connection from host localhost 
> ([0:0:0:0:0:ffff:7f00:1]).
> 21:13:39 wurtel wwwoffled[21592]: Forked wwwoffles -real (pid=28546).
> 21:13:39 wurtel wwwoffles[28546]: 
> URL='http://www.dream-multimedia-tv.de/dm7000/update/rel107.img'.
> 21:13:39 wurtel wwwoffles[28546]: Cache Access Status='Cached Page Used'.
> 21:13:39 wurtel wwwoffled[21592]: Child wwwoffles exited with status 0 (pid=28546).
> 21:14:55 wurtel wwwoffled[21592]: Child wwwoffles exited with status 0 (pid=28536).
> 
> As you can see, while the first wwwoffles was stil busy, the second sees
> the incomplete page, and uses that, assuming that it's complete...
> I thought I had done this sort of thing before, and that resulted in
> both clients getting the data simultaneously...

You obviously don't have the lock-files=yes option selected in the
configuration file or the second request would have got an error
mesage instead.

If the second request had been made a forced refresh (with the
'Pragma: no-cache' or 'Cache-Control: no-cache' headers) then a new
copy of the file would have been fetched (if allowed by the config
file).  This would also happen if the options in the Onlne section of
the configuration file (request-changed, request-changed-once etc.)
allowed it.  I think that what happened is that when the second
request for the same file came in the configuration options meant that
the file would not be requested again but the cached version would be
used.  The cached file was not finished so you got an incomplete
version.

If you wanted to force a fresh copy of the file to be downloaded then
you needed to use 'wget --cache=off'.

If you wanted to get only a complete copy of the URL then using the
lock-files option would have ensured that the second request returned
an error before the whole file was available.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             [EMAIL PROTECTED]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html

Reply via email to