Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attach | ume | 2002-07-02 | 1 | -0/+1 |
| | | | | | | | scope identifier). Approved by: des MFC after: 3 weeks | ||||
* | Add a reference count to struct fetchconn so we don't prematurely close and | des | 2002-06-11 | 1 | -1/+1 |
| | | | | free a cached FTP connection. | ||||
* | Wrap everything in struct connection, and enforce timeouts everywhere | des | 2002-06-05 | 1 | -15/+17 |
| | | | | | (except for DNS operations). Always use funopen() for HTTP, to support both timeouts and SSL. | ||||
* | First step towards SSL support: wrap connections in a 'struct connection' | des | 2002-06-05 | 1 | -92/+89 |
| | | | | | | | | | | which contains the socket descriptor, the input buffer and (yet unused) SSL state variables. This has the neat side effect of greatly improving reentrance (though we're not *quite* there yet) and opening the door to HTTP connection caching. This commit is inspired by email conversations with and patches from Henry Whincup <henry@techiebod.com> last fall. | ||||
* | Modernize my email address | phk | 2002-03-25 | 1 | -1/+1 |
| | |||||
* | Reindent, and add parentheses to return statements. Some functions in | des | 2002-02-05 | 1 | -689/+694 |
| | | | | | 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. | ||||
* | Mark uploads as O_WRONLY, not O_RDONLY. | des | 2002-01-20 | 1 | -2/+6 |
| | | | | | PR: misc/34043 MFC after: 2 weeks | ||||
* | Remove VT100 escapes from debugging messages now that they're enabled by | des | 2002-01-01 | 1 | -3/+2 |
| | | | | | | | default. PR: 32988 MFC after: 3 days | ||||
* | Reorganize to reduce code duplication. | des | 2001-12-04 | 1 | -64/+32 |
| | |||||
* | Tons of type, style and warning fixes that have been rotting in my tree for | des | 2001-10-18 | 1 | -29/+29 |
| | | | | | ages - some of which wouldn't be necessary if gcc wasn't broken or TPTB were willing to do something (-fno-builtin) about it. | ||||
* | Add __FBSDID()s to libfetch | dillon | 2001-09-30 | 1 | -2/+3 |
| | |||||
* | Handle snprintf() returning < 0 (not just -1) | brian | 2001-08-20 | 1 | -1/+1 |
| | | | | MFC after: 2 weeks | ||||
* | Handle snrintf overflows. | brian | 2001-08-20 | 1 | -0/+2 |
| | | | | Spotted by: bde | ||||
* | Handle snprintf() returning -1. | brian | 2001-08-20 | 1 | -1/+2 |
| | | | | MFC after: 2 weeks | ||||
* | Don't call _ftp_closefn() upon EOF in _ftp_readfn(); just return 0. This | des | 2001-06-11 | 1 | -1/+1 |
| | | | | fixes a bug in pkg_add(1) (which nobody noticed because of another bug). | ||||
* | Add rudimentary support for an authentication callback function. | des | 2001-05-26 | 1 | -41/+45 |
| | |||||
* | Plug memory leak. | des | 2001-05-26 | 1 | -6/+3 |
| | | | | PR: 27506 | ||||
* | Apply 'const' liberally. | archie | 2001-04-24 | 1 | -17/+19 |
| | | | | Fix some other minor glitches. | ||||
* | If the server's reply to the SIZE command is unparseable, reset us->size | des | 2001-04-07 | 1 | -0/+1 |
| | | | | to -1 so the caller will know it's invalid. This is an MFC candidate. | ||||
* | Use high port range by default, and replace the 'h' option with an 'l' option | des | 2001-03-24 | 1 | -4/+4 |
| | | | | that forces the ftp code to use the low (default) port range instead. | ||||
* | Don't remember an EINTR, since the caller may want to restart the call. | des | 2001-03-07 | 1 | -2/+4 |
| | |||||
* | Support lower-case versions of the proxy environment variables. | des | 2001-03-07 | 1 | -2/+3 |
| | | | | PR: bin/25494 | ||||
* | Use "anonymous" rather than "ftp" as login name for anonymous ftp. | des | 2001-01-08 | 1 | -3/+2 |
| | | | | | | 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. | ||||
* | Check the FTP_LOGIN environment variable before falling back on | des | 2000-12-22 | 1 | -0/+2 |
| | | | | FTP_ANONYMOUS_USER. | ||||
* | Somewhere along the line, I misunderstood the whole FTP_PASSIVE_MODE debate | des | 2000-12-06 | 1 | -1/+1 |
| | | | | | | | 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". | ||||
* | Fix old-style proxy specs: default to FTP if FTP_PROXY was set; only default | des | 2000-11-27 | 1 | -2/+6 |
| | | | | to HTTP if HTTP_PROXY was used instead. | ||||
* | Don't go haywire if the server closes the connection in the middle of a | des | 2000-11-22 | 1 | -1/+1 |
| | | | | multiline response (proper fix this time). | ||||
* | Revert previous commit, it was somewhat hasty. | des | 2000-11-22 | 1 | -5/+1 |
| | |||||
* | Don't go haywire if the server closes the connection during a multiline | des | 2000-11-22 | 1 | -1/+5 |
| | | | | response. | ||||
* | Use the documented (and historical) defaults. Centralize the decision logic | des | 2000-11-10 | 1 | -17/+4 |
| | | | | | | in order to avoid this bug in the future. Submitted by: se | ||||
* | Use CHECK_FLAG | des | 2000-10-29 | 1 | -11/+11 |
| | |||||
* | Stricter error checking in the I/O functions. | des | 2000-10-29 | 1 | -1/+25 |
| | |||||
* | Fix this my way. David had absolutely no call overriding MAINTAINER without | des | 2000-10-28 | 1 | -3/+3 |
| | | | | even giving me 24 hours to read his mail and find the bug. | ||||
* | Repeat after me, "check to see that a pointer isn't NULL before | obrien | 2000-10-28 | 1 | -3/+3 |
| | | | | dereferenceing it". This fixes ``pkg_add -r''. | ||||
* | MFS: don't expect result code until you close the data connection | des | 2000-10-27 | 1 | -3/+3 |
| | |||||
* | Use funopen() instead of fdopen(). This fixes three problems: | des | 2000-10-22 | 1 | -4/+118 |
| | | | | | | | | | | | | | | - 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. | ||||
* | Argh! Fix passive mode selection (again) | des | 2000-10-17 | 1 | -2/+3 |
| | |||||
* | Use the right user name | des | 2000-10-13 | 1 | -3/+3 |
| | |||||
* | Rework proxy handling so that proxies can be specified as URLs. | des | 2000-10-12 | 1 | -74/+91 |
| | | | | As a side effect, remove a lot of duplicate and now redundant code. | ||||
* | Grok 125 replies to passive RETR. This fixes an interoperability bug with | des | 2000-08-21 | 1 | -1/+2 |
| | | | | | | Microsoft FTP Service. Reported by: asmodai, eivind | ||||
* | Don't fail if _ftp_stat() reports a protocol error, since that most likely | des | 2000-07-27 | 1 | -0/+1 |
| | | | | | | | means that the server doesn't understand SIZE or MDTM, which should not be a hard failure. Submitted by: ume | ||||
* | If the server reports the size as 0, treat it as unknown. This works around | des | 2000-07-25 | 1 | -3/+2 |
| | | | | | | | | | 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. | ||||
* | Centralize the default port finding code. | des | 2000-07-25 | 1 | -17/+17 |
| | | | | | Work around YA Apache bug: don't send port in Host: header if it's the default port. | ||||
* | The decision to use an HTTP proxy for FTP documents belongs in the FTP code | des | 2000-07-21 | 1 | -1/+24 |
| | |||||
* | Don't send port number to proxy unless it's not the standard FTP port | des | 2000-07-21 | 1 | -2/+6 |
| | |||||
* | Fix the case where the file name is preceded by a lone slash. | des | 2000-07-20 | 1 | -1/+1 |
| | |||||
* | Don't take a failure to stat a file to mean that it doesn't exist, as it may | des | 2000-07-18 | 1 | -1/+5 |
| | | | | | be a dynamically created file, e.g. a tarball on servers that support sending tarballs of directories. | ||||
* | Introduce fetchXGet*(), which combine the functionalities of fetchGet*() and | des | 2000-07-17 | 1 | -94/+134 |
| | | | | | | fetchStat*(). In most cases, either fetchGet*() or fetchXGet*() is a wrapper around the other; in all cases, calling fetchGet*() is identical to calling fetchXGet*() with the second argument set to NULL. | ||||
* | Use a symbolic constant instead of hardcoding 999 | des | 2000-07-17 | 1 | -10/+11 |
| | |||||
* | Use fetch_putln() | des | 2000-07-11 | 1 | -11/+5 |
| |