summaryrefslogtreecommitdiff
path: root/lib/libfetch/ftp.c
Commit message (Collapse)AuthorAgeFilesLines
* If the server's reply to the SIZE command is unparseable, reset us->sizeDag-Erling Smørgrav2001-04-071-0/+1
| | | | | | | to -1 so the caller will know it's invalid. This is an MFC candidate. Notes: svn path=/head/; revision=75292
* Use high port range by default, and replace the 'h' option with an 'l' optionDag-Erling Smørgrav2001-03-241-4/+4
| | | | | | | that forces the ftp code to use the low (default) port range instead. Notes: svn path=/head/; revision=74716
* Don't remember an EINTR, since the caller may want to restart the call.Dag-Erling Smørgrav2001-03-071-2/+4
| | | | Notes: svn path=/head/; revision=73934
* Support lower-case versions of the proxy environment variables.Dag-Erling Smørgrav2001-03-071-2/+3
| | | | | | | PR: bin/25494 Notes: svn path=/head/; revision=73932
* Use "anonymous" rather than "ftp" as login name for anonymous ftp.Dag-Erling Smørgrav2001-01-081-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. Notes: svn path=/head/; revision=70795
* Check the FTP_LOGIN environment variable before falling back onDag-Erling Smørgrav2000-12-221-0/+2
| | | | | | | FTP_ANONYMOUS_USER. Notes: svn path=/head/; revision=70273
* Somewhere along the line, I misunderstood the whole FTP_PASSIVE_MODE debateDag-Erling Smørgrav2000-12-061-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". Notes: svn path=/head/; revision=69670
* Fix old-style proxy specs: default to FTP if FTP_PROXY was set; only defaultDag-Erling Smørgrav2000-11-271-2/+6
| | | | | | | to HTTP if HTTP_PROXY was used instead. Notes: svn path=/head/; revision=69272
* Don't go haywire if the server closes the connection in the middle of aDag-Erling Smørgrav2000-11-221-1/+1
| | | | | | | multiline response (proper fix this time). Notes: svn path=/head/; revision=69044
* Revert previous commit, it was somewhat hasty.Dag-Erling Smørgrav2000-11-221-5/+1
| | | | Notes: svn path=/head/; revision=69043
* Don't go haywire if the server closes the connection during a multilineDag-Erling Smørgrav2000-11-221-1/+5
| | | | | | | response. Notes: svn path=/head/; revision=69041
* Use the documented (and historical) defaults. Centralize the decision logicDag-Erling Smørgrav2000-11-101-17/+4
| | | | | | | | | in order to avoid this bug in the future. Submitted by: se Notes: svn path=/head/; revision=68551
* Use CHECK_FLAGDag-Erling Smørgrav2000-10-291-11/+11
| | | | Notes: svn path=/head/; revision=67892
* Stricter error checking in the I/O functions.Dag-Erling Smørgrav2000-10-291-1/+25
| | | | Notes: svn path=/head/; revision=67890
* Fix this my way. David had absolutely no call overriding MAINTAINER withoutDag-Erling Smørgrav2000-10-281-3/+3
| | | | | | | even giving me 24 hours to read his mail and find the bug. Notes: svn path=/head/; revision=67810
* Repeat after me, "check to see that a pointer isn't NULL beforeDavid E. O'Brien2000-10-281-3/+3
| | | | | | | dereferenceing it". This fixes ``pkg_add -r''. Notes: svn path=/head/; revision=67807
* MFS: don't expect result code until you close the data connectionDag-Erling Smørgrav2000-10-271-3/+3
| | | | Notes: svn path=/head/; revision=67707
* Use funopen() instead of fdopen(). This fixes three problems:Dag-Erling Smørgrav2000-10-221-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. Notes: svn path=/head/; revision=67430
* Argh! Fix passive mode selection (again)Dag-Erling Smørgrav2000-10-171-2/+3
| | | | Notes: svn path=/head/; revision=67259
* Use the right user nameDag-Erling Smørgrav2000-10-131-3/+3
| | | | Notes: svn path=/head/; revision=67055
* Rework proxy handling so that proxies can be specified as URLs.Dag-Erling Smørgrav2000-10-121-74/+91
| | | | | | | As a side effect, remove a lot of duplicate and now redundant code. Notes: svn path=/head/; revision=67043
* Grok 125 replies to passive RETR. This fixes an interoperability bug withDag-Erling Smørgrav2000-08-211-1/+2
| | | | | | | | | Microsoft FTP Service. Reported by: asmodai, eivind Notes: svn path=/head/; revision=64883
* Don't fail if _ftp_stat() reports a protocol error, since that most likelyDag-Erling Smørgrav2000-07-271-0/+1
| | | | | | | | | | means that the server doesn't understand SIZE or MDTM, which should not be a hard failure. Submitted by: ume Notes: svn path=/head/; revision=63910
* If the server reports the size as 0, treat it as unknown. This works aroundDag-Erling Smørgrav2000-07-251-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. Notes: svn path=/head/; revision=63847
* Centralize the default port finding code.Dag-Erling Smørgrav2000-07-251-17/+17
| | | | | | | | Work around YA Apache bug: don't send port in Host: header if it's the default port. Notes: svn path=/head/; revision=63842
* The decision to use an HTTP proxy for FTP documents belongs in the FTP codeDag-Erling Smørgrav2000-07-211-1/+24
| | | | Notes: svn path=/head/; revision=63713
* Don't send port number to proxy unless it's not the standard FTP portDag-Erling Smørgrav2000-07-211-2/+6
| | | | Notes: svn path=/head/; revision=63712
* Fix the case where the file name is preceded by a lone slash.Dag-Erling Smørgrav2000-07-201-1/+1
| | | | Notes: svn path=/head/; revision=63585
* Don't take a failure to stat a file to mean that it doesn't exist, as it mayDag-Erling Smørgrav2000-07-181-1/+5
| | | | | | | | be a dynamically created file, e.g. a tarball on servers that support sending tarballs of directories. Notes: svn path=/head/; revision=63392
* Introduce fetchXGet*(), which combine the functionalities of fetchGet*() andDag-Erling Smørgrav2000-07-171-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. Notes: svn path=/head/; revision=63340
* Use a symbolic constant instead of hardcoding 999Dag-Erling Smørgrav2000-07-171-10/+11
| | | | Notes: svn path=/head/; revision=63336
* Use fetch_putln()Dag-Erling Smørgrav2000-07-111-11/+5
| | | | Notes: svn path=/head/; revision=62982
* Clean up the debugging outputDag-Erling Smørgrav2000-07-111-9/+1
| | | | Notes: svn path=/head/; revision=62964
* Make EPSV work again. Separate parsing code of 229 replies fromHajimu UMEMOTO2000-07-101-7/+14
| | | | | | | | | the code for 227 and 228. Submitted by: des Notes: svn path=/head/; revision=62888
* Don't assume the remote address in a 227 reply is enclosed in parentheses.Dag-Erling Smørgrav2000-07-081-2/+1
| | | | Notes: svn path=/head/; revision=62814
* Make restart work in active mode, too.Dag-Erling Smørgrav2000-06-291-0/+5
| | | | | | | | PR: bin/18688 Submitted by: Rudolf Cejka <cejkar@dcse.fee.vutbr.cz> Notes: svn path=/head/; revision=62256
* Handle multiline replies properly, instead of kinda-right.Dag-Erling Smørgrav2000-06-281-7/+16
| | | | Notes: svn path=/head/; revision=62215
* Back out wes' commit with extreme prejudice.Dag-Erling Smørgrav2000-06-201-143/+5
| | | | Notes: svn path=/head/; revision=61866
* Add implementation of fetchListFTP.Wes Peters2000-06-201-5/+143
| | | | | | | Reviewed by: silence Notes: svn path=/head/; revision=61838
* Honor FTP_PASSIVE_MODE so caller doesn't need to.Dag-Erling Smørgrav2000-05-261-0/+4
| | | | Notes: svn path=/head/; revision=60951
* Use $FTP_PASSWORD for FTP password. If $FTP_PASSWORD is notHajimu UMEMOTO2000-05-221-1/+11
| | | | | | | found, `yourname@yourhost' is used. Notes: svn path=/head/; revision=60791
* IPv6 support.Hajimu UMEMOTO2000-05-201-35/+197
| | | | Notes: svn path=/head/; revision=60737
* Better handling of some boundary conditions.Dag-Erling Smørgrav2000-05-191-4/+7
| | | | | | | Submitted by: ume Notes: svn path=/head/; revision=60707
* Initialize the struct url_stat at the beginning of fetchStatFTP().Dag-Erling Smørgrav2000-05-151-0/+3
| | | | Notes: svn path=/head/; revision=60582
* Add workaround for ftpds with the Y2K MDTM bugDag-Erling Smørgrav2000-05-111-7/+22
| | | | Notes: svn path=/head/; revision=60383
* Implement restart.Dag-Erling Smørgrav2000-05-071-14/+41
| | | | | | | | Use sizeof more consistently. Outline sanity checking of server port spec. Notes: svn path=/head/; revision=60188
* Fix timestamp handling.Dag-Erling Smørgrav2000-01-261-5/+7
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=56635
* More old uncommitted patches: implement timeouts at the protocol level.Dag-Erling Smørgrav2000-01-071-97/+119
| | | | | | | Currently only supported for ftp connections. Notes: svn path=/head/; revision=55557
* Patches I've had lying around for several months:Dag-Erling Smørgrav2000-01-071-14/+43
| | | | | | | | | | * Add the 'h' ftp flag (allocate local port in high range) * Add the 'd' flag (use direct connection even if proxy is defined) * Make sure flags != NULL before calling strchr(). * Minor changes to some comments. Notes: svn path=/head/; revision=55544
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476