summaryrefslogtreecommitdiff
path: root/lib/libfetch
Commit message (Collapse)AuthorAgeFilesLines
...
* Document FTP_LOGIN.Dag-Erling Smørgrav2000-12-221-0/+2
| | | | Notes: svn path=/head/; revision=70274
* 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
* Avoid a segfault (due to an unitialized pointer) when parsing URLs that haveDag-Erling Smørgrav2000-12-131-0/+2
| | | | | | | no scheme or host part. Notes: svn path=/head/; revision=69975
* Somewhere along the line, I misunderstood the whole FTP_PASSIVE_MODE debateDag-Erling Smørgrav2000-12-062-4/+4
| | | | | | | | | | 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
* Remove some obsolete comments.Dag-Erling Smørgrav2000-12-011-13/+0
| | | | Notes: svn path=/head/; revision=69466
* Clean up the whitespace encoding code.Dag-Erling Smørgrav2000-12-011-5/+6
| | | | Notes: svn path=/head/; revision=69465
* Add SCHEME_HTTPS.Dag-Erling Smørgrav2000-12-011-0/+1
| | | | Notes: svn path=/head/; revision=69464
* 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 try to get the proxy port number from /etc/services.Dag-Erling Smørgrav2000-11-271-4/+0
| | | | Notes: svn path=/head/; revision=69271
* 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
* logRuslan Ermilov2000-11-221-1/+2
| | | | Notes: svn path=/head/; revision=69026
* Spell the des's name correctly.Ruslan Ermilov2000-11-141-2/+2
| | | | Notes: svn path=/head/; revision=68718
* Use Fx macro wherever possible.Ruslan Ermilov2000-11-141-1/+3
| | | | Notes: svn path=/head/; revision=68716
* Use the documented (and historical) defaults. Centralize the decision logicDag-Erling Smørgrav2000-11-104-37/+45
| | | | | | | | | 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-294-22/+22
| | | | 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
* Add CHECK_FLAGS, a macro for (safely) checking if a particular flag is set.Dag-Erling Smørgrav2000-10-291-0/+5
| | | | Notes: svn path=/head/; revision=67887
* Document FTP_PASSIVE_MODE and FTP_PASSWORD.Dag-Erling Smørgrav2000-10-291-1/+8
| | | | | | | | PR: docs/20626 Submitted by: nik Notes: svn path=/head/; revision=67871
* 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
* Install per function manpages so one doesn't mistakenly think we don'tDavid E. O'Brien2000-10-281-0/+8
| | | | | | | have manpages for libfetch's functions. Notes: svn path=/head/; revision=67809
* 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
* If the scheme is HTTP or HTTPS, percent-escape whitespace in the documentDag-Erling Smørgrav2000-10-211-1/+21
| | | | | | | | | part. Submitted by: green Notes: svn path=/head/; revision=67419
* 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
* Document recent changes in URL parsing and proxy handlingDag-Erling Smørgrav2000-10-121-10/+20
| | | | Notes: svn path=/head/; revision=67045
* ftp.c needs _http_request()Dag-Erling Smørgrav2000-10-121-0/+11
| | | | Notes: svn path=/head/; revision=67044
* Rework proxy handling so that proxies can be specified as URLs.Dag-Erling Smørgrav2000-10-122-206/+156
| | | | | | | As a side effect, remove a lot of duplicate and now redundant code. Notes: svn path=/head/; revision=67043
* Relax URL syntax so that schemeless URLs are supported.Dag-Erling Smørgrav2000-10-121-24/+23
| | | | Notes: svn path=/head/; revision=67042
* Add macros for the names of the URL schemes we support.Dag-Erling Smørgrav2000-10-121-0/+5
| | | | Notes: svn path=/head/; revision=67041
* Make the ENVIRONMENT section more legible, and mention that HTTP_AUTH isDag-Erling Smørgrav2000-10-121-4/+10
| | | | | | | colon-separated. Notes: svn path=/head/; revision=67028
* Work around buggy servers such as NCSA httpd which send an incompleteDag-Erling Smørgrav2000-09-241-9/+18
| | | | | | | HTTP-Version on the Status-Line (see RFC2616 sections 3.1 and 6.1). Notes: svn path=/head/; revision=66325
* Document the FTP_PROXY and HTTP_PROXY variables better.Dag-Erling Smørgrav2000-08-311-0/+4
| | | | Notes: svn path=/head/; revision=65291
* 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
* Fix signedness bogon.Dag-Erling Smørgrav2000-08-021-7/+6
| | | | Notes: svn path=/head/; revision=64129
* 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-253-33/+43
| | | | | | | | Work around YA Apache bug: don't send port in Host: header if it's the default port. Notes: svn path=/head/; revision=63842
* Ignore environment variables that are set but empty.Dag-Erling Smørgrav2000-07-211-40/+81
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=63716
* Document the proxy support better.Dag-Erling Smørgrav2000-07-211-2/+15
| | | | Notes: svn path=/head/; revision=63715
* The decision to use an HTTP proxy for FTP documents belongs in the FTP codeDag-Erling Smørgrav2000-07-212-13/+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 try to skip to the requested offset if the server returns more dataDag-Erling Smørgrav2000-07-191-8/+10
| | | | | | | | | than requested. Instead, inform the caller of the real offset by modifying the offset field in the original struct url, and let him decide how to handle the situation. Notes: svn path=/head/; revision=63567
* 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-176-113/+236
| | | | | | | | | 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
* Don't forget to set file descriptor to -1 after closing it, since the codeDag-Erling Smørgrav2000-07-171-1/+1
| | | | | | | | | | outside the loop inspects it to determine whether or not we succeeded in retrieving the requested document. This fixes a bug where fetchGetHTTP() would return a FILE with an invalid file descriptor if it hit the redirect limit without locating the requested document. Notes: svn path=/head/; revision=63337