Commit Graph

176 Commits

Author SHA1 Message Date
markm
76fe441a7b Do not use __progname directly (except in [gs]etprogname(3)).
Also, make an internal _getprogname() that is used only inside
libc. For libc, getprogname(3) is a weak symbol in case a
function of the same name is defined in userland.
2002-03-29 22:43:43 +00:00
phk
432db57cce Modernize my email address 2002-03-25 13:53:46 +00:00
des
36254aa73f Switch to a self-starting allocation scheme. 2002-02-05 22:15:16 +00:00
des
ec29926e4d Reindent, and add parentheses to return statements. Some functions in
ftp.c and http.c now have exceedingly long lines due to deep nesting;
this will be corrected by reorganizing the code in a later revision.
2002-02-05 22:13:51 +00:00
des
95a4ae2830 Eliminate a redundant loop. 2002-02-05 21:32:16 +00:00
des
69f2f16cb4 Check the return value from read() when reading the CR/LF at the end of a
chunk.

PR:		bin/33608
MFC after:	2 weeks
2002-01-20 19:53:12 +00:00
des
9f6167dc5a Mark uploads as O_WRONLY, not O_RDONLY.
PR:		misc/34043
MFC after:	2 weeks
2002-01-20 19:52:25 +00:00
des
cfe419eb21 Remove long-obsolete README. 2002-01-01 16:27:26 +00:00
des
99683cbbd4 In verbose mode, display the full error message from the server, stripping
it of HTML tags and comments.

PR:		bin/32989
MFC after:	1 week
2002-01-01 16:25:29 +00:00
des
e37508b70c Remove VT100 escapes from debugging messages now that they're enabled by
default.

PR:		32988
MFC after:	3 days
2002-01-01 14:48:09 +00:00
des
b073ce5f0e Don't build with NDEBUG.
PR:		bin/32615
MFC after:	1 week
2001-12-09 15:06:38 +00:00
des
01882c47bb Conditionalize some debugging code that didn't use the DEBUG macro.
MFC after:	1 week
2001-12-09 15:05:58 +00:00
des
a9520ca9d7 Introduce a fetchDebug global. Change the DEBUG macro so it only runs the
debugging code if fetchDebug is set.

PR:		bin/32615
MFC after:	1 week
2001-12-09 15:05:19 +00:00
des
ff6a5a5c28 Properly handle being redirected to an FTP URL.
Also fix a couple of not-so-minor bugs:
 - missing case for HTTP_SEE_OTHER
 - incorrect definition of HTTP_NEED_PROXY_AUTH

PR:		20259
MFC after:	2 weeks
2001-12-04 01:12:51 +00:00
des
8cabee0ca4 Add prototype for _ftp_request(). 2001-12-04 01:10:34 +00:00
des
5d89c5ae6e Reorganize to reduce code duplication. 2001-12-04 01:09:19 +00:00
des
38d04ef419 Add NO_WERROR so the build won't die because of discarded qualifiers 2001-10-19 10:08:38 +00:00
des
f59dae6318 Back out part of previous commit which was gcc-centric 2001-10-19 10:08:05 +00:00
des
f8774d9490 Tons of type, style and warning fixes that have been rotting in my tree for
ages - some of which wouldn't be necessary if gcc wasn't broken or TPTB were
willing to do something (-fno-builtin) about it.
2001-10-18 08:29:26 +00:00
ru
623da62a5a mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
dillon
9e8adf09a9 Add __FBSDID()s to libfetch 2001-09-30 21:36:09 +00:00
des
a0569e9940 Use fseeko() instead of fseek() (u->offset is already an off_t), and mark
some function arguments as unused.
2001-09-05 12:22:28 +00:00
brian
903d158fae Handle snprintf() returning < 0 (not just -1)
MFC after:	2 weeks
2001-08-20 15:44:17 +00:00
brian
3b24d8f2af Handle snrintf overflows.
Spotted by: bde
2001-08-20 13:44:13 +00:00
brian
4e059b7f96 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 12:50:21 +00:00
se
742d7aada7 The fix for schemeless and hostless URLs (rev. 1.27) broke the schemeless
proxy specification, which seems to be valid according to the man page.

Change the logic to consider "hostname:port" a hostname and port instead
of a file URL.

Approved by:	des
2001-07-28 21:28:14 +00:00
des
35acbfe0b3 Unbreak parsing URLs that have a host part but no document part.
While we're here, fix a snprintf() usage warning.
2001-07-17 20:22:33 +00:00
dd
a145482cf6 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
dd
eaa6ee03b8 mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
des
0ca9dbc9d1 Handle shemeless, hostless URLs correctly. 2001-07-08 15:59:15 +00:00
ru
9ca51e2245 mdoc(7) police: fixed markup and typo. 2001-07-05 11:24:26 +00:00
des
f47c06a197 Don't call _ftp_closefn() upon EOF in _ftp_readfn(); just return 0. This
fixes a bug in pkg_add(1) (which nobody noticed because of another bug).
2001-06-11 14:12:46 +00:00
des
1d4297a2b2 Implement a HTTP_USER_AGENT environment variable.
PR:		27669
Submitted by:	Eoin Lawless <eoin@maths.tcd.ie>
2001-05-27 11:00:36 +00:00
des
77734dca3c Document the authentication callback interface.
Update RFC references (should have done that ages ago...)
2001-05-26 19:38:34 +00:00
des
7be28011c0 Bump major number. 2001-05-26 19:37:26 +00:00
des
4f0b341263 Add rudimentary support for an authentication callback function. 2001-05-26 19:37:15 +00:00
des
4edf66ad45 MAXPATHLEN -> PATH_MAX 2001-05-26 19:36:49 +00:00
des
71613237c6 Plug memory leak.
PR:		27506
2001-05-26 17:23:38 +00:00
des
9af44bee15 Add some error codes that were added in RFC2616. 2001-05-23 18:52:02 +00:00
archie
21cf7b313e Apply 'const' liberally.
Fix some other minor glitches.
2001-04-24 00:06:21 +00:00
dd
02c02ffeef Grammar police: "its", not "it's", is the possessive form of "it". 2001-04-15 19:53:47 +00:00
des
a14b691e19 If the server's reply to the SIZE command is unparseable, reset us->size
to -1 so the caller will know it's invalid.  This is an MFC candidate.
2001-04-07 15:26:31 +00:00
ru
25ef23ac1c MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
des
bfaef3b3b9 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
79952149e8 Don't remember an EINTR, since the caller may want to restart the call. 2001-03-07 05:12:14 +00:00
des
1804e2a818 Support lower-case versions of the proxy environment variables.
PR:		bin/25494
2001-03-07 04:45:55 +00:00
ru
1476a16d46 mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
ru
3d8401c62e Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
des
4a1dcddb01 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
0c87c94a31 Back out previous (accidental) commit. 2001-01-08 13:17:21 +00:00