summaryrefslogtreecommitdiff
path: root/lib/libfetch
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix signed/unsigned comparison warning/error from 'make release'John W. De Boskey2003-01-281-4/+4
| | | | Notes: svn path=/head/; revision=109960
* Document .netrc support.Dag-Erling Smørgrav2003-01-221-0/+8
| | | | Notes: svn path=/head/; revision=109701
* Hook in the .netrc code + don't use pointers as if they were booleans.Dag-Erling Smørgrav2003-01-221-4/+6
| | | | Notes: svn path=/head/; revision=109697
* Experimental support for .netrc.Dag-Erling Smørgrav2003-01-222-0/+92
| | | | Notes: svn path=/head/; revision=109695
* Initialization paranoia.Dag-Erling Smørgrav2003-01-221-0/+8
| | | | Notes: svn path=/head/; revision=109694
* A negative offset means "get it all".Dag-Erling Smørgrav2003-01-221-2/+2
| | | | Notes: svn path=/head/; revision=109693
* Set auto-retry mode to avoid some spurious errors.Dag-Erling Smørgrav2003-01-031-0/+1
| | | | | | | | Submitted by: Andre Albsmeier <andre.albsmeier@siemens.com> MFC after: 7 days Notes: svn path=/head/; revision=108579
* english(4) police.Jens Schweikhardt2002-12-271-2/+2
| | | | Notes: svn path=/head/; revision=108317
* Reduce WARNS level to 3 in the non-crypto case to fix make release on sparc64.Jake Burkholder2002-12-041-1/+1
| | | | | | | | | | This may only be turning up now to changes in the cpp predefines for sparc64, which may be turning on more strict alignment checking. Approved by: re Notes: svn path=/head/; revision=107570
* Implement and document support for an HTTP_REFERER environment variable.Dag-Erling Smørgrav2002-11-282-12/+26
| | | | | | | | | | PR: 28171 Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> Approved by: re (bmah) MFC after: 1 week Notes: svn path=/head/; revision=107372
* Fix two typos.Bill Fenner2002-11-081-2/+2
| | | | Notes: svn path=/head/; revision=106656
* Use __func__ and break a long line.Dag-Erling Smørgrav2002-10-301-5/+4
| | | | Notes: svn path=/head/; revision=106207
* Fix a bug in fenner's _fetch_writev() patch (rev 1.36)Dag-Erling Smørgrav2002-10-301-1/+6
| | | | | | | Submitted by: fenner Notes: svn path=/head/; revision=106205
* Recognize the (incorrect) error code a MediaHawk server sends in reply toDag-Erling Smørgrav2002-10-301-0/+1
| | | | | | | | | unrecognized commands such as MDTM. Requested by: Stephen Roome <stephen_roome@pepcross.com> Notes: svn path=/head/; revision=106190
* Clarify my feelings towards fetch / libfetch.Dag-Erling Smørgrav2002-10-301-1/+0
| | | | Notes: svn path=/head/; revision=106187
* Recommit the non-broken parts of 1.34 and 1.37.Dag-Erling Smørgrav2002-10-301-6/+11
| | | | | | | Change the type and name of a variable introduced in 1.33. Notes: svn path=/head/; revision=106186
* Don't forget to set the error flag when _fetch_read() returns -1.Dag-Erling Smørgrav2002-10-301-2/+6
| | | | Notes: svn path=/head/; revision=106185
* Reinstate revs 1.35-36 and 1.38. Revisions 1.34 and 1.37 were specificallyWarner Losh2002-10-301-12/+38
| | | | | | | | | | | the root cause of the bus errors I was experiencing. Submitted by: fenner Tested by: obrien Prompted by: peter Notes: svn path=/head/; revision=106175
* Fix `pkg_add -r' by backing out revs 1.34-1.38.David E. O'Brien2002-10-291-52/+19
| | | | | | | | Revs 1.37-8 produce a bus error in some environments. Revs 1.34-6 do not bus error, but write corrupted files. Notes: svn path=/head/; revision=106137
* libfetch is now WARNS5 clean in the non-SSL case.Dag-Erling Smørgrav2002-10-281-1/+1
| | | | Notes: svn path=/head/; revision=106084
* Fix an off-by-one error (> where >= should have been used) which causedDag-Erling Smørgrav2002-10-281-6/+5
| | | | | | | | | | | | _fetch_writev() to incorrectly report EPIPE in certain cases. Also fix a number of const warnings by using __DECONST(), plus a signed / unsigned comparison by casting the rhs to ssize_t. Submitted by: fenner, Craig Rodrigues <rodrigc@attbi.com> Notes: svn path=/head/; revision=106081
* Up WARNS to 3 if not building with crypto.Bill Fenner2002-10-281-1/+3
| | | | | | | Approved by: des Notes: svn path=/head/; revision=106068
* Slight amendment to rev 1.34: instead of considering any short read anDag-Erling Smørgrav2002-10-271-6/+8
| | | | | | | | | error, only report an error if no data was read at all (unless len was 0 to start with). Otherwise, the final read of practically any transfer will end in a fatal error. Notes: svn path=/head/; revision=106049
* Introduce _fetch_writev(), which is the conn_t version of writev(2). InDag-Erling Smørgrav2002-10-272-7/+38
| | | | | | | | | | | | | | | | | the SSL case, it is no different from the old _fetch_write(), but in the non-SSL case it uses writev(2) to send the entire vector as a single packet (provided it can fit in one packet). Implement _fetch_write() and _fetch_putln() in terms of _fetch_writev(). This should improve performance in the non-SSL case (by reducing protocol overhead) and solve the problem where too-smart-for-their-own-good firewalls reject FTP packets that do not end in CRLF. PR: bin/44123 Submitted by: fenner Notes: svn path=/head/; revision=106046
* Eliminate two cases of undefined behaviour: total in _fetch_write() wasDag-Erling Smørgrav2002-10-272-0/+2
| | | | | | | | | | | not initialized before use, and _http_growbuf() did not return a value on success. Reported by: Peter Edwards <pmedwards@eircom.net> MFC after: 2 weeks Notes: svn path=/head/; revision=106044
* Back out the previous commit, and fix the bug rather than try to hide itsDag-Erling Smørgrav2002-10-271-10/+18
| | | | | | | | | | symptoms: make timeouts and short transfers fatal, and set errno to an appropriate value (ETIMEDOUT for a timeout, EPIPE for a short transfer). MFC after: 2 weeks Notes: svn path=/head/; revision=106040
* The FTP connection caching needs a better interface -- connections areNate Lawson2002-10-251-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. Notes: svn path=/head/; revision=105903
* Use a warns setting we can catch regressions with.David E. O'Brien2002-10-201-3/+1
| | | | Notes: svn path=/head/; revision=105592
* When recycling a cached connection, increment the reference count so thatTim J. Robbins2002-10-201-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. Notes: svn path=/head/; revision=105511
* HTTP authentication got broken in rev. 1.49.Ruslan Ermilov2002-10-031-4/+4
| | | | Notes: svn path=/head/; revision=104404
* Zap now-unused SHLIB_MINORPeter Wemm2002-09-281-1/+0
| | | | Notes: svn path=/head/; revision=104073
* Fix an infinite loop when _fetch_read() can return 0 (if theAlfred Perlstein2002-09-201-1/+5
| | | | | | | | connection is broken), take this into account and return at this point. Notes: svn path=/head/; revision=103718
* Make _fetch_connect() always set the error code.Bill Fenner2002-09-172-4/+5
| | | | | | | Tell ftp that _fetch_connect() always sets the error code (http already knew) Notes: svn path=/head/; revision=103459
* Surround prototypes with __BEGIN_DECLS / __END_DECLS.Dag-Erling Smørgrav2002-07-221-0/+4
| | | | | | | | PR: misc/40399 MFC after: 3 days Notes: svn path=/head/; revision=100510
* Cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attachHajimu UMEMOTO2002-07-021-0/+1
| | | | | | | | | | scope identifier). Approved by: des MFC after: 3 weeks Notes: svn path=/head/; revision=99253
* Reintroduce debugging code that somehow got lost in a previous revision.Dag-Erling Smørgrav2002-06-241-0/+2
| | | | Notes: svn path=/head/; revision=98748
* Fix incorrect library ordering. I thought I'd committed this already...Dag-Erling Smørgrav2002-06-211-2/+2
| | | | Notes: svn path=/head/; revision=98550
* Don't try to dereference conn when we know it's NULL.Dag-Erling Smørgrav2002-06-191-2/+5
| | | | Notes: svn path=/head/; revision=98422
* Add a reference count to struct fetchconn so we don't prematurely close andDag-Erling Smørgrav2002-06-113-1/+22
| | | | | | | free a cached FTP connection. Notes: svn path=/head/; revision=98117
* libfetch now depends on libcrypto and libssl.Ruslan Ermilov2002-06-061-5/+6
| | | | Notes: svn path=/head/; revision=97930
* Make SSL support conditional on NOCRYPT.Dag-Erling Smørgrav2002-06-054-0/+21
| | | | Notes: svn path=/head/; revision=97891
* During buildworld, "regular" libraries are built before crypto stuff, soDag-Erling Smørgrav2002-06-051-2/+2
| | | | | | | | libfetch can't depend on lib{crypto,ssl}. Move the dependency to fetch until we can figure out how to fix this. Notes: svn path=/head/; revision=97888
* Add SSL support + slight cleanup.Dag-Erling Smørgrav2002-06-054-20/+78
| | | | | | | Submitted by: Henry Whincup <henry@techiebod.com> (in principle) Notes: svn path=/head/; revision=97868
* Wrap everything in struct connection, and enforce timeouts everywhereDag-Erling Smørgrav2002-06-054-113/+204
| | | | | | | | (except for DNS operations). Always use funopen() for HTTP, to support both timeouts and SSL. Notes: svn path=/head/; revision=97866
* Add the necessary dependencies for SSL.Dag-Erling Smørgrav2002-06-051-0/+2
| | | | Notes: svn path=/head/; revision=97862
* Rename struct cookie to struct httpio to avoid confusion (it's not an HTTPDag-Erling Smørgrav2002-06-051-50/+50
| | | | | | | cookie) and increase symmetry with equivalent FTP code. Notes: svn path=/head/; revision=97859
* Add comments to struct cookie.Dag-Erling Smørgrav2002-06-051-8/+8
| | | | Notes: svn path=/head/; revision=97858
* Fix a bug I introduced in the chunk decoder in the previous commit..Dag-Erling Smørgrav2002-06-051-1/+1
| | | | Notes: svn path=/head/; revision=97857
* First step towards SSL support: wrap connections in a 'struct connection'Dag-Erling Smørgrav2002-06-054-196/+255
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=97856
* Do not use __progname directly (except in [gs]etprogname(3)).Mark Murray2002-03-291-3/+1
| | | | | | | | | Also, make an internal _getprogname() that is used only inside libc. For libc, getprogname(3) is a weak symbol in case a function of the same name is defined in userland. Notes: svn path=/head/; revision=93399