aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/fetch
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Correct check to see if file changes.Eitan Adler2013-06-021-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | Reported by: swildner@DragonFlyBSD.org Reviewed by: des Notes: svn path=/head/; revision=251262
* | | Fix bandwidth reporting when doing a restarted download with "-r".Andre Oppermann2012-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The offset is already accounted for in xs->lastrcvd and doesn't have to be subtracted again. Reported by: Florian Smeets <flo@smeets.im> Submitted by: Mateusz Guzik <mjguzik@gmail.com> Tested by: Florian Smeets <flo@smeets.im> MFC after: 1 week Notes: svn path=/head/; revision=244058
* | | Add check for failure of mkstemp and setenv.Eitan Adler2012-12-081-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: des Approved by: cperciva (implicit) Obtained from: DragonFlyBSD MFC after: 1 week Notes: svn path=/head/; revision=244037
* | | Change fetch(1) to:Andre Oppermann2012-11-161-11/+25
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | o Report the instantaneous bandwidth instead of an average since the beginning of the download. o At the finish of the download report the average bandwidth and also the total time it took instead of 00m00s. Reviewed by: des MFC after: 1 week Notes: svn path=/head/; revision=243147
* | More -Wmissing-variable-declarations fixes.Ed Schouten2012-10-191-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'. Notes: svn path=/head/; revision=241737
* | Use libmd if and only if OpenSSL is not available.Dag-Erling Smørgrav2012-09-141-3/+4
|/ | | | | | | | PR: bin/171402 MFC after: 3 days Notes: svn path=/head/; revision=240496
* Revert r232274 - unauthorized, unnecessary and incorrect.Dag-Erling Smørgrav2012-05-261-7/+2
| | | | Notes: svn path=/head/; revision=236110
* General mdoc(7) and typo fixes.Glen Barber2012-05-101-1/+1
| | | | | | | | | PR: 167696 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Notes: svn path=/head/; revision=235211
* Document the 'URL' argument.David E. O'Brien2012-02-281-2/+7
| | | | Notes: svn path=/head/; revision=232274
* Fix two issues related to the use of SIGINFO in fetch(1) to displayDag-Erling Smørgrav2012-01-181-7/+12
| | | | | | | | | | | | | | | | progress information. The first is that fetch_read() (used in the HTTP code but not the FTP code) can enter an infinite loop if it has previously been interrupted by a signal. The second is that when it is interrupted, fetch_read() will discard any data it may have read up to that point. Luckily, both bugs are extremely timing-sensitive and therefore difficult to trigger. PR: bin/153240 Submitted by: Mark <markjdb@gmail.com> MFC after: 3 weeks Notes: svn path=/head/; revision=230307
* latin1 -> utf8Dag-Erling Smørgrav2011-10-041-1/+1
| | | | Notes: svn path=/head/; revision=225982
* Document the fact that passive mode is now the default.Dag-Erling Smørgrav2011-09-272-8/+10
| | | | | | | Update copyright dates and strip my middle name. Notes: svn path=/head/; revision=225815
* Use fseeko() instead of fseek(). The rest of the code is off_t-aware,Dag-Erling Smørgrav2011-09-271-2/+2
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=225805
* Followup to r225599: the fseek() was a no-op since the file was openedDag-Erling Smørgrav2011-09-271-8/+8
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=225800
* When resuming an HTTP download, we failed to verify that the rangeDag-Erling Smørgrav2011-09-151-0/+14
| | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=225599
* Fixed static linkage.Ruslan Ermilov2010-02-261-2/+2
| | | | Notes: svn path=/head/; revision=204352
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Treat an empty argument as an error, instead of fetching theRuslan Ermilov2009-12-301-0/+5
| | | | | | | | | contents of the root directory. MFC after: 1 week Notes: svn path=/head/; revision=201290
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-131-0/+1
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-111-1/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* The FTP_TIMEOUT and HTTP_TIMEOUT environment variables were ignored becauseDag-Erling Smørgrav2009-01-171-3/+4
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=187361
* 1. Update fetch to consistently return 1 on error, as the man page states,Murray Stokely2008-12-171-6/+5
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=186241
* Add support for HTTP 1.1 If-Modified-Since behavior.Murray Stokely2008-12-152-5/+40
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=186124
* Improve usage and sync SYNOPSIS with usage.Ruslan Ermilov2008-12-132-10/+17
| | | | Notes: svn path=/head/; revision=186043
* Apply the same defaults to https as to http.Dag-Erling Smørgrav2008-12-111-2/+3
| | | | | | | | Submitted by: Mike Tancsa <mike@sentex.net> MFC after: 1 week Notes: svn path=/head/; revision=185912
* Use the SCHEME_ knobs rather than knowing what they expand to.David E. O'Brien2008-08-211-2/+2
| | | | | | | Reviewed by: des Notes: svn path=/head/; revision=181962
* List all environment variables supported by libfetch, along with a referenceDag-Erling Smørgrav2007-12-281-9/+19
| | | | | | | | | to the fetch(3) man page. MFC after: 1 week Notes: svn path=/head/; revision=174960
* Try to preserve ownership and permissions when replacing an existing file.Dag-Erling Smørgrav2006-11-101-0/+2
| | | | | | | | | PR: bin/104702 Submitted by: Kevin Day <toasty@dragondata.com> MFC after: 1 week Notes: svn path=/head/; revision=164152
* Fix a typo.Joseph Koshy2006-04-221-2/+2
| | | | | | | | Submitted by: Pawel Worach <pawel.worach at gmail dot com> MFC after: 1 week Notes: svn path=/head/; revision=157953
* Reimplementation of world/kernel build options. For details, see:Ruslan Ermilov2006-03-171-1/+3
| | | | | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine) Notes: svn path=/head/; revision=156813
* Only clear sb.st_size if it is clearly wrong or meaningless. This fixesDag-Erling Smørgrav2005-12-301-5/+5
| | | | | | | | | | mirror mode. PR: bin/86940 MFC after: 2 weeks Notes: svn path=/head/; revision=153919
* Reflect progress in process title.Dag-Erling Smørgrav2005-12-301-0/+4
| | | | | | | | Submitted by: flz MFC after: 2 weeks Notes: svn path=/head/; revision=153894
* Expand *n't contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141846
* Sort sections.Ruslan Ermilov2005-01-181-8/+8
| | | | Notes: svn path=/head/; revision=140420
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* NOCRYPT -> NO_CRYPTRuslan Ermilov2004-12-211-1/+1
| | | | Notes: svn path=/head/; revision=139113
* Fix buffer overflow. This is FreeBSD-SA-04:16.fetch.Colin Percival2004-11-181-1/+2
| | | | | | | Approved by: des Notes: svn path=/head/; revision=137854
* Update copyright years.Dag-Erling Smørgrav2004-09-212-2/+2
| | | | Notes: svn path=/head/; revision=135546
* The check for r_flag was accidentally removed in the previous commit.Dag-Erling Smørgrav2004-08-261-1/+1
| | | | | | | | Submitted by: SANETO Takanori <sanewo@ba2.so-net.ne.jp> MFC after: 3 days Notes: svn path=/head/; revision=134350
* Fix a couple of edge cases in which sb.st_size may be incorrect orDag-Erling Smørgrav2004-08-151-5/+16
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=133779
* Join the 21st century: Cryptography is no longer an optional componentColin Percival2004-08-061-1/+0
| | | | | | | | | | | | | of releases. The -DNOCRYPT build option still exists for anyone who really wants to build non-cryptographic binaries, but the "crypto" release distribution is now part of "base", and anyone installing from a release will get cryptographic binaries. Approved by: re (scottl), markm Discussed on: freebsd-current, in late April 2004 Notes: svn path=/head/; revision=133196
* Document the behaviour of the "-o file" option when "file" is a directoryColin Percival2004-07-301-0/+4
| | | | | | | | | (downloaded file(s) are created inside the directory). MFC after: 3 days Notes: svn path=/head/; revision=132879
* Don't strip trailing linear whitespace from passwords.Dag-Erling Smørgrav2004-07-271-5/+5
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=132696
* Style nits.Dag-Erling Smørgrav2004-07-271-5/+4
| | | | Notes: svn path=/head/; revision=132695
* Truncate long file names in stat_display(), as was originally intended.Dag-Erling Smørgrav2004-07-051-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=131615
* The description of the -S option in the man page says we won't fail if theDag-Erling Smørgrav2004-06-241-1/+0
| | | | | | | | | | 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 Notes: svn path=/head/; revision=131052
* Fix integer overflow in the file size output when dealing withLukas Ertl2004-05-191-3/+3
| | | | | | | | | large files (i.e. DVD images). Reviewed by: des@ Notes: svn path=/head/; revision=129440
* Restore part of the word that got (accidentally) removed.Ruslan Ermilov2004-05-191-2/+2
| | | | | | | Removed whitespace at EOL. Notes: svn path=/head/; revision=129427
* Workaround for servers that ignore byte ranges when using chunkedDag-Erling Smørgrav2004-04-061-1/+1
| | | | | | | | | encoding. MFC after: 3 days Notes: svn path=/head/; revision=127941
* Remove EXAMPLES section which duplicates text in fetch(3).Dag-Erling Smørgrav2004-02-271-22/+0
| | | | Notes: svn path=/head/; revision=126307