Commit Graph

91 Commits

Author SHA1 Message Date
Garrett Wollman
c7ede78e51 Restore \n at end of usage message.
Complained-about-by: charnier
1999-03-08 19:16:14 +00:00
Alexander Langer
c5e72606a7 Improve error message wording when attempting to link to a non-existent
file on the local host.

PR:		10042
Submitted by:	Chris Costello <phoenix@calldei.com>
1999-03-02 04:14:33 +00:00
Garrett Wollman
189da04438 Deal with broken Web sites which return 302 responses rather than 404
and an error document when the requested resource does not exist.  Grrr.

Requested by:	asami
1999-02-23 18:51:13 +00:00
Bill Fenner
d17bf266c4 Remove the FTP_PASSIVE_MODE "fix"; libftpio handles this. 1999-02-05 01:01:17 +00:00
Bill Fenner
054672c795 Warn about collapsing multiple slashes into 1 in ftp URL's.
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
1999-02-03 20:43:29 +00:00
Bill Fenner
93eb50393d Don't try to parse a colon in a URL as a port
(e.g. http://www.host.name/foo:bar)

PR:		bin/5072
Submitted by:	Takeshi WATANABE <watanabe@komadori.planet.kobe-u.ac.jp>
1999-02-03 20:24:53 +00:00
Garrett Wollman
9caa4ddf6b Fix logic error in RFC 850 kluge. 1999-01-15 17:10:31 +00:00
Garrett Wollman
c146843096 For RFC 850 dates received in HTTP responses, implement the century pivot
described in RFC 2068.  Include a reference to same in the manual page.
1999-01-15 16:56:22 +00:00
Martin Cracauer
b451f4524e Add -s option, just report size of file that would be fetched.
Reviewed by:	-current list
1998-12-08 13:00:49 +00:00
Dag-Erling Smørgrav
9f63f2aa1c main.c:
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.
1998-11-08 23:18:48 +00:00
Bill Fenner
60a53b7d32 If we know the content-length, only read that number of bytes from
the server.  There exists a broken server which sends a few extra
garbage bytes in response to HTTP/1.1 requests.
1998-10-26 02:39:21 +00:00
Jordan K. Hubbard
0637c2cccd Add -S flag; this is benign since fetch's behavior is unchanged if you
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>
1998-09-20 00:01:26 +00:00
Dag-Erling Smørgrav
82e3dde754 DTRT for file: URLs when output file is "-".
PR:		bin/7203
1998-09-17 00:15:15 +00:00
Stefan Eßer
cc522880b4 Fix proxy authorization code:
- 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
1998-07-12 09:07:36 +00:00
Garrett Wollman
cffe96c903 Fix my last change: the .Fx macro doesn't do anything useful without an
argument, so use `.Tn FreeBSD' instead.
1998-05-09 21:39:49 +00:00
Garrett Wollman
eeed58d824 Documentation fix: delete references to T/TCP as they are not relevant
to the case in question.  (Said case being quite clearly defined by
the basic TCP specification, RFC 792.)
1998-05-09 20:50:37 +00:00
Dag-Erling Smørgrav
49778f39ac Arrggghhhh... forgot to strip the / after outputting %2f 1998-05-09 08:56:07 +00:00
Dag-Erling Smørgrav
757c6582c1 Map a leading / in -c argument to %2f instead of dropping it silently.
PR:		bin/6558
1998-05-09 08:41:23 +00:00
Bill Fenner
5e92200712 Describe absolute paths in FTP URL's. This patch has been sitting
around uncommitted for 2 months =(
1998-05-09 07:33:09 +00:00
Philippe Charnier
306005e78c .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 07:48:45 +00:00
John Birrell
5362bb64c5 gcc wants to see long long variables passed to %q printf formats, so
cast to that instead of quad_t.
1998-02-20 05:11:42 +00:00
John Birrell
2ffc763234 time() needs a pointer to a time_t, but tv_sec in a timeval is a
long (yuk). So give time() what it wants and let the compiler
promote the variable when it is assigned to tv_sec.
1998-02-20 05:08:53 +00:00
Bill Fenner
18d1eb6776 Suggest using "-b" or "-t" if the connection is reset (typical symptom
of broken TCP stack).
1997-11-22 01:00:42 +00:00
John Polstra
a5bd62c599 Add missing arguments detected by "-Wformat". 1997-11-18 03:27:34 +00:00
David E. O'Brien
e3f8c97942 style-police got me. :-)
Also fixed some "didn't make the most sense" problems.

Submitted by:	bde
1997-11-12 04:39:33 +00:00
David E. O'Brien
e4b172e407 If "-l" is given, make sure the target of the link exist. 1997-11-08 22:15:55 +00:00
Andrey A. Chernov
9e8930055e Change diags to see what part of url actually parsed, see
previous change about #? parms
1997-11-01 05:47:41 +00:00
Andrey A. Chernov
4ad97ec183 Don't search for ':' port in ?# params part
Require to correctly parse http://...cgi?http://...
1997-10-31 23:33:44 +00:00
Bill Fenner
21d466b21a Interpret multiple slashes as a single slash in ftp: URL's. This
is contrary to RFC1738, which specifies that empty elements between
slashes really mean to send a CWD command with an empty argument.
Most FTP servers consider this an error, so strict RFC compliance
is advisable in this case.
1997-10-08 18:43:53 +00:00
Bill Fenner
a5cd8a3572 Use the RFC1738 interpretation of ftp: URL's, i.e. CWD to each
slash-seperated element of the URL and then RETR the last element.

PR:		bin/4670
Reviewed by:	wollman
1997-10-06 01:09:56 +00:00
Martin Cracauer
3e27c094e4 fetch(3) doesn't get asctime(3) format, wrong length assumed
PR:		bin/4625
Submitted by:	"Timo J. Rinne" <tri@pooh.tky.hut.fi>
Obtained from:bin/4625
1997-09-28 11:25:59 +00:00
Satoshi Asami
e5ed1f5994 Be consistent with other utilities in spelling "Kbytes". (Actually,
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
1997-08-19 01:57:53 +00:00
Andrey A. Chernov
f4e4504f06 Add -t option which turns T/TCP off as workaround for some broken servers
Submitted by: Marc Slemko <marcs@znep.com>
1997-08-05 20:18:39 +00:00
Garrett Wollman
12b7829739 Work around a brokenness in the HTTP spec by generating the Host header
for ftp: URLs as well.  This can't possibly be done in the general case,
but since we only claim to support http and ftp, we'll adhere to the
bogus requirement (RFC 2068, s. 14.25) anyway...  >sigh<

Submitted by: =?iso-8859-1?Q?=C5ge_R=F8bekk?= <aagero@aage.priv.no>
1997-07-26 20:18:43 +00:00
Garrett Wollman
efd4ad4cd2 Fix the error message for when mirroring and restarting are rejected
due to the output not being a regular file.  Also split the error message
in any error case here to be on two lines to lessen the likelihood of it
being too long to fit on just one.
1997-07-26 20:00:05 +00:00
Garrett Wollman
2ec04c7076 Implement HTTP 1.1's ``chunked'' Transfer-Encoding (ick). This hasn't
been extensively tested, but I now can successfully retrieve
<http://www.apache.org/index.html>, so I guess that's a victory of some
sort.

Also move the initialization of ``autherror'' to hopefully eliminate
the reported loop involving authentication.  Still need to implement
MD5 digest authentication.
1997-07-26 19:25:56 +00:00
Garrett Wollman
0c8cc99e5b Provide a new `-b' flag to work around some broken HTTP/TCP implementations
that can't deal with a half-closed connection.
1997-07-25 19:35:44 +00:00
Philippe Charnier
b28977d169 One newline should be enough. 1997-07-02 06:28:32 +00:00
Philippe Charnier
0bd47384ea Do not use argv[0] in usage(). 1997-07-01 06:37:34 +00:00
Andrey A. Chernov
5e04857ec1 Now understand password in ftp:// URLs 1997-05-31 14:45:41 +00:00
John-Mark Gurney
27e0fa20aa fix a bug in processing of FTP_TIMEOUT environment variable.
Closes PR#2947

Submitted-by: Peter Childs <pjchilds@imforei.apana.org.au>
1997-03-11 15:13:28 +00:00
John-Mark Gurney
817eca811d fix restarting http transfers and understanding response from server.
Slight modification of patch by wollman.

Closes PR#2870

Reviewed by:	wollman
Submitted by:	Marc Slemko <marcs@znep.com>
1997-03-06 20:01:32 +00:00
John-Mark Gurney
c1599df8b3 fix a couple problems with fetch:
. don't try to interpet a colon in the pathname as a port number
	. don't report an errno message when one don't exist
1997-03-06 10:01:54 +00:00
Bill Fenner
8a2f8e395a Fix FTP_PROXY to use user@host[@port] for FTP proxy and eliminate
undocumented FTP_PROXY_USER
Make FTP file errors contian hostname and path.
Pass the FTP port to libftp.
Partially un-HTMLify error messages returned from server
Handle "HTTP NNN" instead of "HTTP/V.vv NNN" response sent by
	pre-HTTP/1.0 servers

Reviewed by:		wollman
1997-03-05 18:57:16 +00:00
Wolfram Schneider
bc5d5816e7 These man page will appear in 2.2, not 3.0. 1997-02-22 23:43:32 +00:00
Peter Wemm
c115df18cd Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
John-Mark Gurney
429100430f Fix fetch so that all status information is sent to stderr, prevents
corruption of file being recieved to stdout.

Submitted-by: Kent Vander Velden <graphix@iastate.edu>

Closes PR#2739
1997-02-17 04:11:47 +00:00
John-Mark Gurney
88e8266d80 Modified the display() function to recognize when the output it going to a
file.  When it is don't do the percentage update, but still display the file
size and rate.

Closes PR#2725

Reviewed by:	wollman
1997-02-14 19:08:18 +00:00
Garrett Wollman
857292949c Fix remote request for HTTP proxies. Should close PR#2670. 1997-02-11 20:46:06 +00:00
Garrett Wollman
cb0cd746b5 Fix PR#2700: report correct transmission speed, and restart transfers
from the restart point, not the end of the file (blush!).

Submitted by:	John-Mark Gurney <jmg@nike.efn.org>
1997-02-10 18:49:42 +00:00