aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/fetch/main.c
Commit message (Collapse)AuthorAgeFilesLines
* New libfetch-based fetch.Dag-Erling Smørgrav2000-06-281-402/+0
| | | | Notes: svn path=/head/; revision=62216
* Print a warning and exit with != 0 when at least one downloaded fileMartin Cracauer2000-03-081-19/+35
| | | | | | | | | | | is shorter than previously announced by the server. Tested by asami. Approved by: jkh Notes: svn path=/head/; revision=57824
* Add the -F option. This is for forcing restarts with -r by inhibitingBrian Feldman1999-10-231-2/+6
| | | | | | | transmission of the If-Range HTTP header field. Notes: svn path=/head/; revision=52444
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* "transfered" -> "transferred"Brian Feldman1999-07-021-2/+2
| | | | | | | Reviewed by: dict(1) Notes: svn path=/head/; revision=48457
* Restore \n at end of usage message.Garrett Wollman1999-03-081-2/+2
| | | | | | | Complained-about-by: charnier Notes: svn path=/head/; revision=44576
* Deal with broken Web sites which return 302 responses rather than 404Garrett Wollman1999-02-231-5/+11
| | | | | | | | | and an error document when the requested resource does not exist. Grrr. Requested by: asami Notes: svn path=/head/; revision=44240
* Add -s option, just report size of file that would be fetched.Martin Cracauer1998-12-081-3/+8
| | | | | | | Reviewed by: -current list Notes: svn path=/head/; revision=41600
* main.c:Dag-Erling Smørgrav1998-11-081-4/+4
| | | | | | | | | 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. Notes: svn path=/head/; revision=41021
* Add -S flag; this is benign since fetch's behavior is unchanged if youJordan K. Hubbard1998-09-201-3/+14
| | | | | | | | don't use it. That's why I'm bringing it in during our "code slush" Submitted by: Stefan Esser <se@mi.uni-koeln.de> Notes: svn path=/head/; revision=39497
* Arrggghhhh... forgot to strip the / after outputting %2fDag-Erling Smørgrav1998-05-091-3/+6
| | | | Notes: svn path=/head/; revision=35862
* Map a leading / in -c argument to %2f instead of dropping it silently.Dag-Erling Smørgrav1998-05-091-9/+4
| | | | | | | PR: bin/6558 Notes: svn path=/head/; revision=35858
* gcc wants to see long long variables passed to %q printf formats, soJohn Birrell1998-02-201-6/+6
| | | | | | | cast to that instead of quad_t. Notes: svn path=/head/; revision=33654
* Be consistent with other utilities in spelling "Kbytes". (Actually,Satoshi Asami1997-08-191-3/+3
| | | | | | | | | there even was one of them about ten lines above in the same file.) Reminded by: joerg's commit to usr.bin/ftp/ftp.c rev 1.9 Notes: svn path=/head/; revision=28396
* Add -t option which turns T/TCP off as workaround for some broken serversAndrey A. Chernov1997-08-051-2/+6
| | | | | | | Submitted by: Marc Slemko <marcs@znep.com> Notes: svn path=/head/; revision=27921
* Provide a new `-b' flag to work around some broken HTTP/TCP implementationsGarrett Wollman1997-07-251-3/+8
| | | | | | | that can't deal with a half-closed connection. Notes: svn path=/head/; revision=27679
* One newline should be enough.Philippe Charnier1997-07-021-2/+2
| | | | Notes: svn path=/head/; revision=27167
* Do not use argv[0] in usage().Philippe Charnier1997-07-011-8/+8
| | | | Notes: svn path=/head/; revision=27148
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=23012
* Fix fetch so that all status information is sent to stderr, preventsJohn-Mark Gurney1997-02-171-11/+10
| | | | | | | | | | | corruption of file being recieved to stdout. Submitted-by: Kent Vander Velden <graphix@iastate.edu> Closes PR#2739 Notes: svn path=/head/; revision=22819
* Modified the display() function to recognize when the output it going to aJohn-Mark Gurney1997-02-141-14/+18
| | | | | | | | | | | | file. When it is don't do the percentage update, but still display the file size and rate. Closes PR#2725 Reviewed by: wollman Notes: svn path=/head/; revision=22720
* Fix PR#2700: report correct transmission speed, and restart transfersGarrett Wollman1997-02-101-2/+4
| | | | | | | | | from the restart point, not the end of the file (blush!). Submitted by: John-Mark Gurney <jmg@nike.efn.org> Notes: svn path=/head/; revision=22547
* Some bug-fixes, clean-ups, and one new feature:Garrett Wollman1997-02-051-1/+1
| | | | | | | | | | | | | | | | | - Fix the bug with URIs of the form ftp://host/filename. - Fix some more string-termination bugs in util.c. - Use safe_malloc() rather than testing the return value of regular malloc() in 15 places. - Implement HTTP authentication, for both servers and proxies. Currently only ``basic'' authentication is supported; This Is A Bug (but less of one tjhan nmot supporting any authentication). I think there is only one more feature which is required for full HTTP/1.1 support, which is Transfer-Encoding: chunked; this should not be toohard, but it isn't very important, either. Notes: svn path=/head/; revision=22307
* Some fixes for HTTP:Garrett Wollman1997-01-311-19/+23
| | | | | | | | | | | | | | 1) Implement redirects (or try to, at least). 2) Implement automatic retry after 503 errors when Retry-After is given. 3) Implement a -a flag to enable both of these behaviors. 4) Recognize Transfer-Encoding headers and emit a warning that the file is likely to be damaged. 5) Bug fix: only write the amount of data we read. 6) Actually document some of these. 7) Fix the usage message to display flags in semi-alphabetical order. Notes: svn path=/head/; revision=22167
* Here is my long-threatened revamping of fetch. Jean-Marc probably won'tGarrett Wollman1997-01-301-684/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | recognize it any more. This makes the following significant changes: - The main body of the program doesn't know a thing about URIs, HTTP, or FTP. This makes it possible to easily plug in other protocols. (The next revision will probably be able to dynamically add new recognizers.) - There are no longer arbitrary timeouts for the protocols. If you want to set one for yourself, use the environment variables. - FTP proxies are now supported (if I implemented it right). - The HTTP implementation is much more complete, and can now do restarts, preserve modtimes, and mrun in mirror mode. It's not yet up to 1.1, but it's getting there. - Transaction TCP is now used for sending HTTP requests. The HTTP/1.1 syntax for requesting that the connection be closed after one request is implemented. In all of this, I have doubtless broken somebody. Please test it and tell me about the bugs. Notes: svn path=/head/; revision=22133
* Handle timeouts in a slightly less baroque way.Jordan K. Hubbard1997-01-171-22/+22
| | | | Notes: svn path=/head/; revision=21798
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Report net connection error via hstrerror(h_errno) now instead ofAndrey A. Chernov1996-11-141-2/+3
| | | | | | | simple fact that can't connect Notes: svn path=/head/; revision=19734
* Change to new ftpLogin interfaceAndrey A. Chernov1996-11-141-4/+8
| | | | | | | | | Now clearly say: Not logged in instead of old: Broken pipe (note it was original reason for all my libftpio changes) Notes: svn path=/head/; revision=19732
* Cosmetic bugfix. fetch was modifying it's argv[] strings in place, whichPeter Wemm1996-11-101-2/+6
| | | | | | | caused ps(1) to show strange things.. Notes: svn path=/head/; revision=19611
* bin/1933: don't print negative % for huge files (80Mb)Poul-Henning Kamp1996-10-311-2/+4
| | | | Notes: svn path=/head/; revision=19287
* old host:/filename syntax was brokenAdam David1996-10-241-5/+8
| | | | | | | implement /filename syntax for completeness Notes: svn path=/head/; revision=19140
* The -h flag implies ftp = 1.Jean-Marc Zucconi1996-10-061-1/+2
| | | | Notes: svn path=/head/; revision=18722
* Attempt to untangle the timeout code a bit, also make the default ftpPeter Wemm1996-09-191-16/+29
| | | | | | | | | and http timeouts the same, since when using a http proxy to do ftp transfers, the http timeout was being used for what is coming in via ftp. Notes: svn path=/head/; revision=18396
* Make fetch 64-bit safe, corresponding to libftpio changes.Peter Wemm1996-09-191-26/+31
| | | | | | | Submitted by: Jason Thorpe <thorpej@nas.nasa.gov>, PR#1641 Notes: svn path=/head/; revision=18395
* Remove the code which has restart looking at the modtime. That's justJordan K. Hubbard1996-09-101-2/+2
| | | | | | | | moronic! We don't care about the time in restart mode, only the size. It's *mirror* mode which cares about modtimes. Notes: svn path=/head/; revision=18226
* Allow proper ftp verbosity with a new -v flag.Jordan K. Hubbard1996-08-311-7/+10
| | | | Notes: svn path=/head/; revision=17979
* Don't make -l warn when it's not used, so we can potentially set itJordan K. Hubbard1996-08-231-4/+1
| | | | | | | | all the time if we want to use "link" behavior for file URLs (and not have fetch whine at us when they're not). Notes: svn path=/head/; revision=17789
* Print the correct thing when interrupted by a signal.Jordan K. Hubbard1996-08-221-8/+7
| | | | Notes: svn path=/head/; revision=17781
* 1. Understand file:/path style URLs.Jordan K. Hubbard1996-08-221-509/+579
| | | | | | | | 2. Add a -l flag for symlinking to rather than copying file:/path style URLs. 3. Add a -T flag for setting the timeout interval (overrides FTP_TIMEOUT if set) Notes: svn path=/head/; revision=17778
* Fix a small potential bogon I noticed here with restarts.Jordan K. Hubbard1996-08-211-2/+2
| | | | Notes: svn path=/head/; revision=17734
* Add support for HTTP proxies, fix some bugs with http transfers.Jordan K. Hubbard1996-08-141-4/+49
| | | | | | | Submitted-By: Mikael Hybsch <micke@dynas.se> Notes: svn path=/head/; revision=17596
* Fix broken modtime preservation code. *Now* it preserves the modtimeJordan K. Hubbard1996-08-121-17/+25
| | | | | | | | correctly! Noticed-By: knarf@camelot.de (Frank Bartels) Notes: svn path=/head/; revision=17539
* Defer to fashion.Jordan K. Hubbard1996-08-071-10/+10
| | | | Notes: svn path=/head/; revision=17460
* Suppress the messages from the server after login (ftpVerbose(ftp,0)). ErrorsJean-Marc Zucconi1996-08-041-1/+3
| | | | | | | are already correctly reported. Notes: svn path=/head/; revision=17413
* Adapt to new libftpio. [jkh]Jordan K. Hubbard1996-08-031-9/+9
| | | | | | | | Better error messages. Submitted-By: "David E. O'Brien" <obrien@Nuxi.cs.ucdavis.edu> Notes: svn path=/head/; revision=17407
* Whups - update the usage message too.Jordan K. Hubbard1996-07-181-2/+2
| | | | Notes: svn path=/head/; revision=17206
* Add -n flag to use the current modtime rather than preserving it.Jordan K. Hubbard1996-07-181-3/+8
| | | | Notes: svn path=/head/; revision=17205
* Back out previous commit: do not use read(), but fread (). Change BUFFER_SIZEJean-Marc Zucconi1996-07-051-11/+11
| | | | | | | | | | to 1K to avoid waiting too long between 2 progress reports in the case of a slow transfer. Move the signal()/setitimer() code just before the read loop because the ftpio library set and reset the timer internally. Notes: svn path=/head/; revision=16964
* Use read(fileno(fp), ...) instead of fread(..., fp) to avoid buffered input.Jean-Marc Zucconi1996-07-021-2/+2
| | | | Notes: svn path=/head/; revision=16890