Commit Graph

133 Commits

Author SHA1 Message Date
des
48193cad2a Use high port range by default, and replace the 'h' option with an 'l' option
that forces the ftp code to use the low (default) port range instead.
2001-03-24 00:28:57 +00:00
des
f37ee25c50 Don't remember an EINTR, since the caller may want to restart the call. 2001-03-07 05:12:14 +00:00
des
e43579a28c Support lower-case versions of the proxy environment variables.
PR:		bin/25494
2001-03-07 04:45:55 +00:00
ru
cd914ddc3c mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
ru
0a2b2f2e94 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
des
1920d733a0 The user name for anonymous ftp is now "anonymous".
Remove the period after the last man page reference.
Add a reference to RFC1635, and sort the RFC references by number.
2001-01-08 13:46:40 +00:00
des
90027ffe7c Back out previous (accidental) commit. 2001-01-08 13:17:21 +00:00
des
b6ed88b8e5 Use "anonymous" rather than "ftp" as login name for anonymous ftp.
Rather than have a separate (misnamed) FTP_ANONYMOUS_PASSWORD constant, use
FTP_ANONYMOUS_USER (i.e. "anonymous") to construct the anonymous ftp password
if getlogin() fails.
2001-01-08 13:15:14 +00:00
des
ffc0312994 Document FTP_LOGIN. 2000-12-22 18:03:21 +00:00
des
6a61145ffa Check the FTP_LOGIN environment variable before falling back on
FTP_ANONYMOUS_USER.
2000-12-22 18:01:40 +00:00
des
445f3d71a2 Avoid a segfault (due to an unitialized pointer) when parsing URLs that have
no scheme or host part.
2000-12-13 11:21:09 +00:00
des
236084042b Somewhere along the line, I misunderstood the whole FTP_PASSIVE_MODE debate
and had libfetch selecting passive mode even when FTP_PASSIVE_MODE was not
set at all, which is really quite surprising unless you know about it. So
change it to the agreed default behaviour of selecting passive mode if
FTP_PASSIVE_MODE is set, but not "no".
2000-12-06 09:23:27 +00:00
des
9d504a24a1 Remove some obsolete comments. 2000-12-01 11:05:15 +00:00
des
0ed4ed6d1d Clean up the whitespace encoding code. 2000-12-01 11:04:57 +00:00
des
131d8f54b8 Add SCHEME_HTTPS. 2000-12-01 11:04:43 +00:00
des
5ff5d9005c Fix old-style proxy specs: default to FTP if FTP_PROXY was set; only default
to HTTP if HTTP_PROXY was used instead.
2000-11-27 13:42:56 +00:00
des
ace820bc4d Don't try to get the proxy port number from /etc/services. 2000-11-27 13:41:55 +00:00
des
4176985456 Don't go haywire if the server closes the connection in the middle of a
multiline response (proper fix this time).
2000-11-22 14:50:46 +00:00
des
e6faf62e13 Revert previous commit, it was somewhat hasty. 2000-11-22 14:44:48 +00:00
des
ff170ab02c Don't go haywire if the server closes the connection during a multiline
response.
2000-11-22 14:30:28 +00:00
ru
e39a2d7511 log 2000-11-22 09:23:54 +00:00
ru
046cd06ea5 Spell the des's name correctly. 2000-11-14 13:19:26 +00:00
ru
b42832df66 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
des
cca3dce9a3 Use the documented (and historical) defaults. Centralize the decision logic
in order to avoid this bug in the future.

Submitted by:	se
2000-11-10 08:43:40 +00:00
des
09145c8747 Use CHECK_FLAG 2000-10-29 15:56:10 +00:00
des
74f9f6c46f Stricter error checking in the I/O functions. 2000-10-29 15:52:05 +00:00
des
35556e7484 Add CHECK_FLAGS, a macro for (safely) checking if a particular flag is set. 2000-10-29 15:45:31 +00:00
des
99fca0398c Document FTP_PASSIVE_MODE and FTP_PASSWORD.
PR:		docs/20626
Submitted by:	nik
2000-10-29 12:58:08 +00:00
des
9abb580b91 Fix this my way. David had absolutely no call overriding MAINTAINER without
even giving me 24 hours to read his mail and find the bug.
2000-10-28 20:53:02 +00:00
obrien
d359bd3310 Install per function manpages so one doesn't mistakenly think we don't
have manpages for libfetch's functions.
2000-10-28 20:32:39 +00:00
obrien
913cc9d6c8 Repeat after me, "check to see that a pointer isn't NULL before
dereferenceing it".  This fixes ``pkg_add -r''.
2000-10-28 20:27:11 +00:00
des
f59e8cd3e7 MFS: don't expect result code until you close the data connection 2000-10-27 11:37:21 +00:00
des
cbf0cce2f5 Use funopen() instead of fdopen(). This fixes three problems:
- ftpTimeout was not honored when reading actual data, as opposed to
   talking protocol

 - connection caching was broken because _ftp_cached_connect() would see
   the result of the transfer instead of the result of the NOOP.

 - if the RETR succeeded, but an error occurred later (as can happen
   when talking to a proxy), the error would not be detected.

There still remains to register an atexit(3) callback to close the cached
connection gracefully instead of just dropping it on the floor.
2000-10-22 12:07:28 +00:00
des
1fdbda80ba If the scheme is HTTP or HTTPS, percent-escape whitespace in the document
part.

Submitted by:	green
2000-10-21 14:58:18 +00:00
des
3152d59307 Argh! Fix passive mode selection (again) 2000-10-17 19:01:18 +00:00
des
f3bf0d07d7 Use the right user name 2000-10-13 09:36:46 +00:00
des
d584961de6 Document recent changes in URL parsing and proxy handling 2000-10-12 22:11:26 +00:00
des
886bfacb11 ftp.c needs _http_request() 2000-10-12 22:10:43 +00:00
des
28cb1cc8cc Rework proxy handling so that proxies can be specified as URLs.
As a side effect, remove a lot of duplicate and now redundant code.
2000-10-12 22:10:26 +00:00
des
2534251de6 Relax URL syntax so that schemeless URLs are supported. 2000-10-12 22:07:49 +00:00
des
ca9016684a Add macros for the names of the URL schemes we support. 2000-10-12 21:59:22 +00:00
des
b4b3c5e08f Make the ENVIRONMENT section more legible, and mention that HTTP_AUTH is
colon-separated.
2000-10-12 16:55:52 +00:00
des
5486e42184 Work around buggy servers such as NCSA httpd which send an incomplete
HTTP-Version on the Status-Line (see RFC2616 sections 3.1 and 6.1).
2000-09-24 12:22:12 +00:00
des
14f2280d6c Document the FTP_PROXY and HTTP_PROXY variables better. 2000-08-31 15:13:22 +00:00
des
e0a79a9f6a Grok 125 replies to passive RETR. This fixes an interoperability bug with
Microsoft FTP Service.

Reported by:	asmodai, eivind
2000-08-21 07:18:31 +00:00
des
9b71966edf Fix signedness bogon. 2000-08-02 11:25:21 +00:00
des
bd46c89e4f Don't fail if _ftp_stat() reports a protocol error, since that most likely
means that the server doesn't understand SIZE or MDTM, which should not be a
hard failure.

Submitted by:	ume
2000-07-27 08:48:48 +00:00
des
515e5bdd5d If the server reports the size as 0, treat it as unknown. This works around
a bug in some ftp servers (most notably ftp.vmunix.com) which report the
size of a file correctly in ascii mode, but report it as 0 in binary mode.

Reported by:	asmodai

Also remove an unneeded initialization.
2000-07-25 14:41:02 +00:00
des
3a09dd575f Centralize the default port finding code.
Work around YA Apache bug: don't send port in Host: header if it's the
default port.
2000-07-25 11:45:38 +00:00
des
d8951f60e7 Ignore environment variables that are set but empty.
Sort out the size / length confusion.  Always try to report the *real* file
size in the url_stat structure, no matter how much of it is actually being
sent, and try to detect inconsistencies between sizes.

Rearrange the request loop to avoid having to add meaningless code just to
silence compiler warnings.

Switch to a more sensible and consistent interface for the _http_parse*()
functions.
2000-07-21 11:02:43 +00:00