Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update copyright years. | des | 2004-09-21 | 1 | -1/+1 |
| | |||||
* | Don't close a FILE * which we know is bogus. | des | 2003-08-29 | 1 | -1/+0 |
| | |||||
* | Some servers respond to RETR in active mode with 125 (connection already | des | 2003-08-19 | 1 | -1/+1 |
| | | | | | | | | open) rather than 150 (opening connection). There's no reason why we shouldn't accept that. PR: misc/42172 MFC in: 3 days | ||||
* | The flags passed in to _ftp_get_proxy may be null | mtm | 2003-03-19 | 1 | -1/+1 |
| | | | | Approved by: des, markm (mentor)(implicit) | ||||
* | Don't parse the proxy URL unless we're actually going to use it. No real | des | 2003-03-11 | 1 | -5/+10 |
| | | | | functional difference, but debugging output will be less confusing. | ||||
* | style(9): add parentheses to sizeof even when not strictly required. | des | 2003-01-28 | 1 | -6/+6 |
| | | | | MFC after: 3 days | ||||
* | Hook in the .netrc code + don't use pointers as if they were booleans. | des | 2003-01-22 | 1 | -4/+6 |
| | |||||
* | The FTP connection caching needs a better interface -- connections are | njl | 2002-10-25 | 1 | -0/+4 |
| | | | | | | | | | | | | | closed through _fetch_close() which is the only one who knows the connection REALLY was closed (since ref -> 0). However, FTP keeps its own local cached_connection and checks if it is valid by comparing it to NULL. This is bogus since it may have been freed elsewhere by _fetch_close(). This change checks if we are closing the cached_connection and the ref is 1 (soon to be 0). If so, set cached_connection to NULL so we don't accidentally reuse it. The REAL fix should be to move connection caching to the common.c level (_fetch_* functions) and NULL the cache(s) in _fetch_close(). Then all layers could benefit from caching. | ||||
* | When recycling a cached connection, increment the reference count so that | tjr | 2002-10-20 | 1 | -1/+1 |
| | | | | | the heap block does not get freed and reused. This should fix the pkg_add -r crashes that have been happening for months. | ||||
* | Make _fetch_connect() always set the error code. | fenner | 2002-09-17 | 1 | -3/+2 |
| | | | | Tell ftp that _fetch_connect() always sets the error code (http already knew) | ||||
* | 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 |