| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Update copyright dates and strip my middle name.
|
|
|
|
|
|
|
|
| |
but the use of fseek() means fetch(1) can't correctly resume a transfer
that was interrupted past the 2 GB mark.
Pointed out by: ache@
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
| |
in append mode. Open it in read-write mode instead. Also move the
fseek up one level to cover the (unlikely but not impossible) case where
the server accepts ranges but does not send a Content-Size header.
PR: bin/117277
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
returned by the server matched what we requested, and blindly appended
what we received to what we already had. This could go two ways: if the
delivered offset was higher than expected, the local file would contain
duplicate data, while if it was lower than expected, there would be data
missing from the middle of the file. Furthermore, if the transfer was
interrupted again, each subsequent attempt would compound the error.
Fix the first problem by restarting the transfer from scratch if there
is a gap, and the second by explicitly seeking to the correct location
in the local file so as to overwrite any duplicated data.
PR: bin/117277
Approved by: re (kib)
MFC after: 3 weeks
|
|
|
|
|
|
| |
contents of the root directory.
MFC after: 1 week
|
|
|
|
| |
needed.
|
|
|
|
| |
Tested with: make universe
|
|
|
|
|
|
|
|
| |
T_secs already had a non-zero default. Unbreak by moving the default to
ftp_timeout / http_timeout.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rather than usually returning 1 but in a few instances using a sysexits(3)
return value.
2. Remove a few unused variables from libfetch.
PR: docs/122470 (1, only)
Reviewed by: des
> Description of fields to fill in above: 76 columns --|
> PR: If a GNATS PR is affected by the change.
> Submitted by: If someone else sent in the change.
> Reviewed by: If someone else reviewed your modification.
> Approved by: If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
> Security: Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.
M usr.bin/fetch/fetch.c
M lib/libfetch/fetch.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fetch(1) accepts a new argument -i <file> that if specified will cause
the file to be downloaded only if it is more recent than the mtime of
<file>.
libfetch(3) accepts the mtime in the url structure and a flag to
indicate when this behavior is desired.
PR: bin/87841
Submitted by: Jukka A. Ukkonen <jau@iki.fi> (partially)
Reviewed by: des, ru
MFC after: 3 weeks
|
| |
|
|
|
|
|
| |
Submitted by: Mike Tancsa <mike@sentex.net>
MFC after: 1 week
|
|
|
|
| |
Reviewed by: des
|
|
|
|
|
|
| |
PR: bin/104702
Submitted by: Kevin Day <toasty@dragondata.com>
MFC after: 1 week
|
|
|
|
|
|
|
| |
mirror mode.
PR: bin/86940
MFC after: 2 weeks
|
|
|
|
|
| |
Submitted by: flz
MFC after: 2 weeks
|
|
|
|
| |
Approved by: des
|
| |
|
|
|
|
|
| |
Submitted by: SANETO Takanori <sanewo@ba2.so-net.ne.jp>
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
meaningless. In particular, don't assume that it is left untouched if
stat(2) fails; that assumption happens to fail at high optimization
levels on some platforms.
MFC after: 1 week
|
|
|
|
| |
MFC after: 2 weeks
|
| |
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
| |
remote size is unknown, but we do. Resolve this in the man page's favor.
Requested by: Andre Albsmeier <andre.albsmeier@siemens.com>
MFC after: 1 week
|
|
|
|
|
|
| |
large files (i.e. DVD images).
Reviewed by: des@
|
|
|
|
|
|
| |
encoding.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
Use %ju and an (uintmax_t) cast to print size_t values.
Use %jd and an (intmax_t) cast to print off_t values.
Use off_t variables to hold the difference between two off_t values.
Don't bother with unsigned char where char will do nicely.
|
|
|
|
|
| |
format. The old code tried to produce the exact same output as the
pre-libfetch implementation, but I no longer see any value in this.
|
|
|
|
| |
during slow transfers of large files.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fix handling of -v option.
Don't treat negative offsets as valid positive ones.
Clean up the ETA and transfer rate code. Show transfer rate along with
ETA if the verbose level is higher than 1.
|
|
|
|
|
|
|
|
| |
to the remote document.
PR: 33856
MFC after: 1 week
Approved by: re
|
|
|
|
| |
in certain failure scenarii (mostly DNS trouble).
|
|
|
|
| |
any data in 30 seconds.
|
| |
|
|
|
|
|
|
|
| |
quiet mode.
PR: bin/37079
Submitted by: Nicolas Rachinsky <list@rachinsky.de>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Re-add alarm(2) calls around the calls to fetchStat(3) and fetchXGet(3),
since these calls can still time out on DNS lookups or TCP connect(2).
Remove the alarm(2) calls in the main loop, since all methods properly
handle transfer timeouts (as opposed to connection timeouts).
Set the sigalrm flag if a timeout occurs in the main loop.
Move the signal: label up a little so we still set the atime and mtime
when the transfer times out or is interrupted, so that restarted transfers
will work as expected (as long as the file still exists).
MFC after: 2 weeks
|
|
|
|
| |
Spotted by: kris
|
|
|
|
| |
unitialized variable" warning.
|
|
|
|
|
| |
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
|
|
|
|
|
| |
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval.
|
| |
|
|
|
|
|
|
|
|
|
| |
<sys/stat.h> for the declaration of struct timeval.
Removed unused includes (<time.h> doesn't declare anything of interest;
only <sys/time.h> does).
Sorted includes a bit.
|
|
|
|
|
|
|
|
| |
on the file we're replacing.
PR: bin/34992
Submitted by: Shunichiro Ariura <syun1rou@blackshell.org>
MFC after: 1 week
|
|
|
|
|
| |
PR: bin/32615
MFC after: 1 week
|
|
|
|
| |
Reviewed by: des
|