- if the dates didn't match, fetch would append the received file to the
existing file instead of replacing it.
- if the local file was complete and up-to-date, fetch would miscalculate
the expected size and report a failure instead of a success, because it
had no way of knowing that the server was actually resending the entire
file since the requested offset was invalid.
libfetch features (fetchRestartCalls, fetchXGet()).
Since it doesn't make much sense to have m_flag and r_flag set at the same
time, and it can actually cause trouble in some cases, die if they're both
set.
Set the SA_RESETHAND flag for SIGINT so that when we've caught one, we can
kill ourselves with a second SIGINT (thus notifying our parent of our tragic
fate) instead of just exiting.
These changes fix several problems that would show up when fetching ports,
as well as speeding up HTTP transfers quite a bit (at least for relatively
small files).
Most of these changes were prompted by an interaction problem with an HTTP
server called SWS-1.0, which exhibited two bugs, the first of which prevented
fetch from working around the second (the first was not sending content-type
in reply to HEAD requests, the second was sending garbage after the end of
the requested file).
Always display the completion percentage if stderr is a tty.
Drop the char-by-char transfer mode, it was based on an incorrect assumption
regarding the semantics of fread().
Finally (I hope) straighten out the business of setting the mtime, as well as
when to remove the output file and when not to.
Thanks are owed to the many who have provided nearly instantaneous and
highly constructive feedback and suggestions about these matters.
around the call to fetchStat().
Catch SIGINT, and rework the signal handling so it doesn't skimp on the
cleanup after a timeout or interrupt. Also, don't just bail out after a
timeout; there may be more files to fetch.
Fix a bug where the stats code would print the expected size instead of the
number of bytes received.
Fix the reading code so it'll support partial reads.
of an empty buffer... the output file wasn't readable... also warn that
we can't checksum on stdout and print out the base64 encoded version of the
md5 checksum...
Site to actually return md5 digest: web.golux.com
Verified that fetch was broken: Ken Coar <Ken.Coar@Golux.Com>
Look at the FTP_PASSIVE_MODE environment variable like the man page says.
PR: bin/9464
Submitted by: John A. Shue <John.Shue@symmetron.com>
Add references to RFC's 1790, 959, 850.
PR: doc/6564
Fix usage string. Fix getopt() string. Fix ordering of compatibility options.
fetch.1:
Fix synopsis. Fix ordering of T and t options. Fix minor grammar nit.
- failed to use authorization parameters passed in the environment, if
/dev/tty could not be opened (i.e. if running from cron)
- mixed use of /dev/tty and stdin for prompt and reading of the result