summaryrefslogtreecommitdiff
path: root/lib/libfetch
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Use a symbolic constant instead of hardcoding 999Dag-Erling Smørgrav2000-07-171-10/+11
| | | | Notes: svn path=/head/; revision=63336
* Don't forget to declare fetchRestartCalls.Dag-Erling Smørgrav2000-07-171-0/+1
| | | | Notes: svn path=/head/; revision=63335
* Introduce the (undocumented) variable fetchRestartCalls, which controls whetherDag-Erling Smørgrav2000-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. Notes: svn path=/head/; revision=63334
* Remove fetchContentType(), which disappeared in the HTTP rewrite.Dag-Erling Smørgrav2000-07-171-1/+0
| | | | Notes: svn path=/head/; revision=63333
* #ifdef DEBUG -> #ifndef NDEBUGDag-Erling Smørgrav2000-07-161-2/+2
| | | | | | | Pointed out by: ache Notes: svn path=/head/; revision=63281
* Reinsert the MIT copyright, which applies to the base64 code and wasDag-Erling Smørgrav2000-07-161-0/+32
| | | | | | | left out by accident during the rewrite. Notes: svn path=/head/; revision=63236
* Fix a bug (misplaced continue) that caused redirects to fail. Lots of codeDag-Erling Smørgrav2000-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 Notes: svn path=/head/; revision=63069
* Fully document the HTTP authorization feature.Dag-Erling Smørgrav2000-07-121-12/+18
| | | | | | | Update the BUGS section to reflect the HTTP rewrite. Notes: svn path=/head/; revision=63013
* Extensive rewrite of the HTTP code. The new code is significantly cleaner andDag-Erling Smørgrav2000-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. Notes: svn path=/head/; revision=63012
* Use fetch_putln()Dag-Erling Smørgrav2000-07-111-11/+5
| | | | Notes: svn path=/head/; revision=62982
* Add _fetch_putln()Dag-Erling Smørgrav2000-07-112-6/+30
| | | | Notes: svn path=/head/; revision=62981
* Document that basic authorization now kinda works.Dag-Erling Smørgrav2000-07-111-16/+20
| | | | Notes: svn path=/head/; revision=62966
* Rework the authorization code.Dag-Erling Smørgrav2000-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. Notes: svn path=/head/; revision=62965
* Clean up the debugging outputDag-Erling Smørgrav2000-07-112-12/+3
| | | | Notes: svn path=/head/; revision=62964
* Free chunks obtained by getaddrinfo(3).Hajimu UMEMOTO2000-07-101-0/+1
| | | | | | | Approved by: des Notes: svn path=/head/; revision=62911
* 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
* Fix basic authentication, and add proxy authentication.Dag-Erling Smørgrav2000-07-081-19/+45
| | | | | | | Submitted by: se Notes: svn path=/head/; revision=62811
* 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
* Don't incorrectly report a protocol error when we get a 302 and redirectsDag-Erling Smørgrav2000-06-211-2/+5
| | | | | | | are disabled. Notes: svn path=/head/; revision=61896
* 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
* Hackish support for 302 redirect.Dag-Erling Smørgrav2000-05-261-24/+59
| | | | Notes: svn path=/head/; revision=60954
* Honor FTP_PASSIVE_MODE so caller doesn't need to.Dag-Erling Smørgrav2000-05-261-0/+4
| | | | Notes: svn path=/head/; revision=60951
* Output newline after debugging messageDag-Erling Smørgrav2000-05-251-0/+1
| | | | Notes: svn path=/head/; revision=60928
* Add (and document) fetchMakeURL()Dag-Erling Smørgrav2000-05-253-3/+51
| | | | Notes: svn path=/head/; revision=60927
* Dump com_err, it's a stinking crock of shit.Dag-Erling Smørgrav2000-05-257-127/+49
| | | | Notes: svn path=/head/; revision=60924
* 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-207-68/+278
| | | | Notes: svn path=/head/; revision=60737
* Better handling of some boundary conditions.Dag-Erling Smørgrav2000-05-192-4/+9
| | | | | | | Submitted by: ume Notes: svn path=/head/; revision=60707
* Make HTTP_PROXY work for FTP.Hajimu UMEMOTO2000-05-152-13/+45
| | | | | | | | Reported by: Ben Smithurst <ben@scientia.demon.co.uk> Reviewed by: des Notes: svn path=/head/; revision=60587
* Document struct url.Dag-Erling Smørgrav2000-05-151-0/+32
| | | | | | | Document the default values for fetchStat*(). Notes: svn path=/head/; revision=60585
* Initialize the struct url_stat at the beginning of _fetch_stat_file().Dag-Erling Smørgrav2000-05-151-0/+2
| | | | Notes: svn path=/head/; revision=60584
* Initialize the struct url_stat at the beginning of fetchStatFTP().Dag-Erling Smørgrav2000-05-151-0/+3
| | | | Notes: svn path=/head/; revision=60582
* Remove unused 'verbose'.Dag-Erling Smørgrav2000-05-151-6/+6
| | | | | | | Initialize the struct url_stat at the beginning of fetchStatHTTP(). Notes: svn path=/head/; revision=60581