aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/fetch
Commit message (Collapse)AuthorAgeFilesLines
* Usage style sweep: spell "usage" with a small 'u'.Dag-Erling Smørgrav2002-04-221-1/+1
| | | | | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/. Notes: svn path=/head/; revision=95258
* Use `The .Nm utility'Philippe Charnier2002-04-191-2/+3
| | | | Notes: svn path=/head/; revision=95083
* Restored the part of 1.45 that was clobbered in rev.1.46:Bruce Evans2002-03-271-0/+1
| | | | | | | | #include <sys/time.h> instead of depending on namespace pollution in <sys/stat.h> for the declaration of struct timeval. Notes: svn path=/head/; revision=93257
* Add FBSDID. Remove unused include. Getopt returns -1 not EOF.Philippe Charnier2002-03-261-5/+5
| | | | Notes: svn path=/head/; revision=93213
* #include <sys/time.h> instead of depending on namespace pollution inBruce Evans2002-02-251-2/+2
| | | | | | | | | | | | <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. Notes: svn path=/head/; revision=91225
* If downloading to a temporary file, set the timestamp on the temp file, notDag-Erling Smørgrav2002-02-161-2/+2
| | | | | | | | | | | on the file we're replacing. PR: bin/34992 Submitted by: Shunichiro Ariura <syun1rou@blackshell.org> MFC after: 1 week Notes: svn path=/head/; revision=90729
* Remove leaf node WARNS?=2 (that mainly I added). This shouldMark Murray2002-02-081-1/+0
| | | | | | | help the GCC3 transition and CURRENT in general. Notes: svn path=/head/; revision=90415
* Document fetch(1) reaction to SIGINFO.Ruslan Ermilov2002-01-161-0/+12
| | | | | | | | | PR: docs/33640 Submitted by: Maxim Konovalov <maxim@macomnet.ru> Approved by: des Notes: svn path=/head/; revision=89429
* Set fetchDebug if v_level is 3 or more.Dag-Erling Smørgrav2001-12-091-0/+2
| | | | | | | | PR: bin/32615 MFC after: 1 week Notes: svn path=/head/; revision=87563
* Remove an extraneous argument to fprintf that -Wformat noticed.Ian Dowse2001-11-101-1/+1
| | | | | | | Reviewed by: des Notes: svn path=/head/; revision=86242
* Remove a debugging warnx() that got committed by mistake.Dag-Erling Smørgrav2001-11-031-1/+0
| | | | Notes: svn path=/head/; revision=85933
* Don't print running stats unless we're the foreground process.Dag-Erling Smørgrav2001-09-231-0/+11
| | | | | | | PR: 30764 Notes: svn path=/head/; revision=83863
* Add a cast to silence a warning (error because of WARNS=2) on Alpha.Mike Barcroft2001-09-101-1/+1
| | | | | | | Discussed with: des Notes: svn path=/head/; revision=83307
* If the local file does not exist, or is a regular file, and we're not tryingDag-Erling Smørgrav2001-09-081-27/+71
| | | | | | | | | | | | | | | | to resume a transfer, download the requested document into a temporary file which we later rename. This avoids leaving half-completed files around in case of a crash (it'll still leave a half-completed file, but with a hope- fully non-conflicting name), and should reduce the need for human inter- vention on ports-building machines. The temporary file name for "foo/bar" is constructed by invoking mkstemps() with the pattern "foo/.fetch.XXXXXX.bar" Requested by: obrien Notes: svn path=/head/; revision=83217
* Remove a blank line that snuck in with the previous commit.Dag-Erling Smørgrav2001-08-181-1/+1
| | | | | | | Set the default timeout to 120 seconds instead of 0 (no timeout). Notes: svn path=/head/; revision=81884
* Add some comments.Dag-Erling Smørgrav2001-08-171-3/+26
| | | | Notes: svn path=/head/; revision=81863
* Include value of command line argument that causes an error message orStefan Eßer2001-07-281-6/+9
| | | | | | | | | | warning in said message, since fetch may be run from a makefile or script which does not print the command line. Approved by: des Notes: svn path=/head/; revision=80521
* If we're writing to stdout, we don't care about the size.Dag-Erling Smørgrav2001-07-171-1/+1
| | | | | | | Submitted by: wollman Notes: svn path=/head/; revision=79838
* WARNS cleanup + remove an unused macro and an unused function argument.Dag-Erling Smørgrav2001-07-172-629/+633
| | | | Notes: svn path=/head/; revision=79837
* Remove whitespace at EOL.Dima Dorfman2001-07-151-4/+4
| | | | Notes: svn path=/head/; revision=79755
* Fix an embarassing if-test-reversal bug that broke scheme guessing.Dag-Erling Smørgrav2001-07-081-2/+2
| | | | Notes: svn path=/head/; revision=79422
* Don't try to print a completion percentage for zero-size files.Dag-Erling Smørgrav2001-06-011-1/+1
| | | | | | | | PR: 27780 Submitted by: Craig Leres <leres@ee.lbl.gov> Notes: svn path=/head/; revision=77576
* Damn. Fix typo in previous commit.Dag-Erling Smørgrav2001-05-271-1/+1
| | | | Notes: svn path=/head/; revision=77260
* When running on a tty, install an authentication callback.Dag-Erling Smørgrav2001-05-261-8/+52
| | | | Notes: svn path=/head/; revision=77241
* Bring the usage message in synch with reality.Dag-Erling Smørgrav2001-03-281-3/+2
| | | | | | | PR: bin/26160 Notes: svn path=/head/; revision=74957
* Now that libfetch uses the high port range by default, add a -U option toDag-Erling Smørgrav2001-03-242-13/+17
| | | | | | | make it use the low (default) port range instead. Notes: svn path=/head/; revision=74717
* If SIGINFO is received during the transfer, print a status line similarDag-Erling Smørgrav2001-03-071-5/+29
| | | | | | | | | | | to the summary shown at the end of the transfer. Some days, I really hate Unix... Suggested by: cracauer Notes: svn path=/head/; revision=73937
* Fix a formatting bug (MFC candidate)Dag-Erling Smørgrav2001-03-071-1/+1
| | | | Notes: svn path=/head/; revision=73924
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-1/+1
| | | | Notes: svn path=/head/; revision=71895
* Warn if the size of the remote file isn't known.Dag-Erling Smørgrav2000-12-221-2/+11
| | | | | | | | | | If the -R option was specified, don't truncate the local file even if its mtime is incorrect. PR: bin/23719 Notes: svn path=/head/; revision=70275
* If the URL did not specify a scheme, try to guess it from the host name.Dag-Erling Smørgrav2000-12-131-0/+10
| | | | Notes: svn path=/head/; revision=69976
* If the transfer timed out, but we don't know how large the file is supposedDag-Erling Smørgrav2000-11-301-1/+10
| | | | | | | to be, assume it was truncated. Notes: svn path=/head/; revision=69383
* Format string auditingKris Kennaway2000-11-271-2/+2
| | | | Notes: svn path=/head/; revision=69256
* mdoc(7) police: do not split author names in the AUTHORS section.Ruslan Ermilov2000-11-221-0/+1
| | | | Notes: svn path=/head/; revision=69027
* Spell the des's name correctly.Ruslan Ermilov2000-11-141-1/+1
| | | | Notes: svn path=/head/; revision=68718
* Understand the difference between an empty file and a non-existent file.Dag-Erling Smørgrav2000-10-191-9/+13
| | | | | | | This has been sitting in my tree for ages... Notes: svn path=/head/; revision=67326
* Don't try to set the mtime of the output file if it's not a regular file.Dag-Erling Smørgrav2000-09-021-1/+2
| | | | | | | Pointed out by: cwt Notes: svn path=/head/; revision=65362
* Don't unlink the target file if it's not a regular file.Dag-Erling Smørgrav2000-08-311-1/+2
| | | | Notes: svn path=/head/; revision=65277
* Restore the old semantics of deleting the output file when interrupted.Dag-Erling Smørgrav2000-07-261-2/+4
| | | | | | | Some people liked this and some didn't, so POLA won. Notes: svn path=/head/; revision=63877
* Don't print summary in quiet mode.Dag-Erling Smørgrav2000-07-211-0/+3
| | | | Notes: svn path=/head/; revision=63720
* Don't display a running count in quiet mode.Dag-Erling Smørgrav2000-07-211-2/+7
| | | | | | | | Don't add the offset to the size; it's libfetch's job to report the correct size of the requested file. Notes: svn path=/head/; revision=63717
* Fix two bugs related to resumed transfers:Dag-Erling Smørgrav2000-07-191-20/+26
| | | | | | | | | | | | | - 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. Notes: svn path=/head/; revision=63568
* Braino: don't use passive mode unless the user requests it.Dag-Erling Smørgrav2000-07-191-1/+1
| | | | | | | | PR: bin/20025 Submitted by: HIYAMA Takeshi <th@cis.ibaraki.ac.jp> Notes: svn path=/head/; revision=63501
* * Remove description of obsolete -t option.Ben Smithurst2000-07-181-5/+2
| | | | | | | | | * Insert newline before "and" in ".Fl c and". Approved by: des Notes: svn path=/head/; revision=63465
* The description of the semantics of -v and -q has long since been OBE.Dag-Erling Smørgrav2000-07-171-10/+1
| | | | Notes: svn path=/head/; revision=63354
* While I'm at it, break a line that was too long, remove a pointless diagnosticDag-Erling Smørgrav2000-07-171-3/+3
| | | | | | | and adjust the verbosity level of another. Notes: svn path=/head/; revision=63353
* Document the fact that -r and -m are mutually exclusive.Dag-Erling Smørgrav2000-07-171-0/+10
| | | | Notes: svn path=/head/; revision=63346
* Rearrange / rewrite large portions of fetch() to take advantage of newDag-Erling Smørgrav2000-07-171-35/+84
| | | | | | | | | | | | | | | | | | | | | | | | | 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). Notes: svn path=/head/; revision=63345
* Better signal handling.Dag-Erling Smørgrav2000-07-161-11/+18
| | | | | | | Submitted by: green Notes: svn path=/head/; revision=63235
* Fix a bug in the stats display that showed up when resuming aborted transfers.Dag-Erling Smørgrav2000-07-131-2/+2
| | | | | | | Submitted by: green Notes: svn path=/head/; revision=63067