summaryrefslogtreecommitdiffstats
path: root/lib/libfetch
Commit message (Collapse)AuthorAgeFilesLines
* Use the documented (and historical) defaults. Centralize the decision logicdes2000-11-104-37/+45
| | | | | | in order to avoid this bug in the future. Submitted by: se
* Use CHECK_FLAGdes2000-10-294-22/+22
|
* Stricter error checking in the I/O functions.des2000-10-291-1/+25
|
* Add CHECK_FLAGS, a macro for (safely) checking if a particular flag is set.des2000-10-291-0/+5
|
* Document FTP_PASSIVE_MODE and FTP_PASSWORD.des2000-10-291-1/+8
| | | | | PR: docs/20626 Submitted by: nik
* Fix this my way. David had absolutely no call overriding MAINTAINER withoutdes2000-10-281-3/+3
| | | | even giving me 24 hours to read his mail and find the bug.
* Install per function manpages so one doesn't mistakenly think we don'tobrien2000-10-281-0/+8
| | | | have manpages for libfetch's functions.
* Repeat after me, "check to see that a pointer isn't NULL beforeobrien2000-10-281-3/+3
| | | | dereferenceing it". This fixes ``pkg_add -r''.
* MFS: don't expect result code until you close the data connectiondes2000-10-271-3/+3
|
* Use funopen() instead of fdopen(). This fixes three problems:des2000-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.
* If the scheme is HTTP or HTTPS, percent-escape whitespace in the documentdes2000-10-211-1/+21
| | | | | | part. Submitted by: green
* Argh! Fix passive mode selection (again)des2000-10-171-2/+3
|
* Use the right user namedes2000-10-131-3/+3
|
* Document recent changes in URL parsing and proxy handlingdes2000-10-121-10/+20
|
* ftp.c needs _http_request()des2000-10-121-0/+11
|
* Rework proxy handling so that proxies can be specified as URLs.des2000-10-122-206/+156
| | | | As a side effect, remove a lot of duplicate and now redundant code.
* Relax URL syntax so that schemeless URLs are supported.des2000-10-121-24/+23
|
* Add macros for the names of the URL schemes we support.des2000-10-121-0/+5
|
* Make the ENVIRONMENT section more legible, and mention that HTTP_AUTH isdes2000-10-121-4/+10
| | | | colon-separated.
* Work around buggy servers such as NCSA httpd which send an incompletedes2000-09-241-9/+18
| | | | HTTP-Version on the Status-Line (see RFC2616 sections 3.1 and 6.1).
* Document the FTP_PROXY and HTTP_PROXY variables better.des2000-08-311-0/+4
|
* Grok 125 replies to passive RETR. This fixes an interoperability bug withdes2000-08-211-1/+2
| | | | | | Microsoft FTP Service. Reported by: asmodai, eivind
* Fix signedness bogon.des2000-08-021-7/+6
|
* Don't fail if _ftp_stat() reports a protocol error, since that most likelydes2000-07-271-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 arounddes2000-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.
* Centralize the default port finding code.des2000-07-253-33/+43
| | | | | Work around YA Apache bug: don't send port in Host: header if it's the default port.
* Ignore environment variables that are set but empty.des2000-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.
* Document the proxy support better.des2000-07-211-2/+15
|
* The decision to use an HTTP proxy for FTP documents belongs in the FTP codedes2000-07-212-13/+24
|
* Don't send port number to proxy unless it's not the standard FTP portdes2000-07-211-2/+6
|
* Fix the case where the file name is preceded by a lone slash.des2000-07-201-1/+1
|
* Don't try to skip to the requested offset if the server returns more datades2000-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.
* Don't take a failure to stat a file to mean that it doesn't exist, as it maydes2000-07-181-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*() anddes2000-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.
* Don't forget to set file descriptor to -1 after closing it, since the codedes2000-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.
* Use a symbolic constant instead of hardcoding 999des2000-07-171-10/+11
|
* Don't forget to declare fetchRestartCalls.des2000-07-171-0/+1
|
* Introduce the (undocumented) variable fetchRestartCalls, which controls whetherdes2000-07-172-2/+3
| | | | | | | or not interrupted system calls will be restarted. This fixes a bug where fetch(1) would hang (potentially forever) if a server stopped responding, because the signal handler would absorb the user's efforts to interrupt the transfer.
* Remove fetchContentType(), which disappeared in the HTTP rewrite.des2000-07-171-1/+0
|
* #ifdef DEBUG -> #ifndef NDEBUGdes2000-07-161-2/+2
| | | | Pointed out by: ache
* Reinsert the MIT copyright, which applies to the base64 code and wasdes2000-07-161-0/+32
| | | | left out by accident during the rewrite.
* Fix a bug (misplaced continue) that caused redirects to fail. Lots of codedes2000-07-131-16/+29
| | | | | | | | moved around, but the acutal functional changes are small. Add support for site-internal redirects (where the Location: header gives a path instead of an absolute URI) Pointed out by: kuriyama
* Fully document the HTTP authorization feature.des2000-07-121-12/+18
| | | | Update the BUGS section to reflect the HTTP rewrite.
* Extensive rewrite of the HTTP code. The new code is significantly cleaner anddes2000-07-121-446/+685
| | | | | | | | more robust, and somewhat more efficient. It also handles authorization and redirects properly, and supports timeouts like the FTP code. Many thanks to Umemoto-san for his assistance with IPv6 support, both here and in other parts of libfetch.
* Use fetch_putln()des2000-07-111-11/+5
|
* Add _fetch_putln()des2000-07-112-6/+30
|
* Document that basic authorization now kinda works.des2000-07-111-16/+20
|
* Rework the authorization code.des2000-07-111-78/+83
| | | | | | Only send absolute URI if connected to a proxy, since Apache doesn't always understand absolute URIs. Clean up some of the debugging output.
* Clean up the debugging outputdes2000-07-112-12/+3
|
* Free chunks obtained by getaddrinfo(3).ume2000-07-101-0/+1
| | | | Approved by: des
OpenPOWER on IntegriCloud