aboutsummaryrefslogtreecommitdiff
path: root/lib/libfetch
Commit message (Collapse)AuthorAgeFilesLines
* MFC r284346:Dimitry Andric2015-06-201-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following clang 3.7.0 warnings in lib/libfetch/http.c: lib/libfetch/http.c:1628:26: error: address of array 'purl->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = purl->user ? ~~~~~~^~~~ ~ lib/libfetch/http.c:1630:30: error: address of array 'purl->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = purl->pwd? ~~~~~~^~~~ lib/libfetch/http.c:1657:25: error: address of array 'url->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url->user ? ~~~~~^~~~ ~ lib/libfetch/http.c:1659:29: error: address of array 'url->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url->pwd ? ~~~~~^~~ ~ lib/libfetch/http.c:1669:25: error: address of array 'url->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url->user ? ~~~~~^~~~ ~ lib/libfetch/http.c:1671:29: error: address of array 'url->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url->pwd ? ~~~~~^~~ ~ Since url->user and url->pwd are arrays, they can never be NULL, so the checks can be removed. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D2673 Notes: svn path=/stable/7/; revision=284643
* MFH r221820, r221821, r221822: increase WARNSDag-Erling Smørgrav2012-11-059-148/+266
| | | | | | | | | | | | | | | | | MFH r221830: mark all descriptors close-on-exec MFH r225813: man page fixes MFH r225814: adjust copyright statement MFH r226537: latin1 -> utf8 MFH r230307, r230478: fix SIGINFO infinite loop and data loss MFH r233648: man page fixes MFH r234138: support percent-encoded user and password MFH r234837: avoid busy-loop on slow connections MFH r234838: don't reuse credentials when redirected to another host MFH r236193: avoid SIGPIPE on network connections MFH r240496: use libmd if and only if OpenSSL is not available Notes: svn path=/stable/7/; revision=242608
* MFC r241841:Eitan Adler2012-10-291-1/+5
| | | | | | | | | | Implement HTTP 305 redirect handling. PR: 172452 Approved by: cperciva (implicit) Notes: svn path=/stable/7/; revision=242292
* MFC r241840:Eitan Adler2012-10-292-2/+13
| | | | | | | | | | | | | Don't deny non-temporary redirects if the -A option is set (per the man page) [0] While here add support for draft-reschke-http-status-308-07 PR: 172451 [0] Approved by: cperciva (implicit) Notes: svn path=/stable/7/; revision=242290
* MFC r241839:Eitan Adler2012-10-251-1/+1
| | | | | | | | | | Be a bit more lenient in the maximum number of redirects allowed. Chrome and Firefox have a limit of 20. IE has a limit of 8. Approved by: cperciva (implicit) Notes: svn path=/stable/7/; revision=242033
* MFC r240495:Eitan Adler2012-09-281-2/+8
| | | | | | | | | | Adding missing return statements during error conditions. PR: kern/171187 Approved by: cperciva (implicit) Notes: svn path=/stable/7/; revision=241018
* Beware of blind MFCs...Dag-Erling Smørgrav2011-05-111-1/+1
| | | | | | | Noticed by: pluknet Notes: svn path=/stable/7/; revision=221774
* Sync with head: proxy authentication, SSL hang, cached connection crash.Dag-Erling Smørgrav2011-05-114-24/+96
| | | | Notes: svn path=/stable/7/; revision=221765
* Synch with head: avoid namespace collisions (r177447), plug resource leakDag-Erling Smørgrav2010-01-275-94/+859
| | | | | | | | | | in FTP code (r199801), add support for HTTP (r202613, r202623, r203028). Also record mergeinfo for previously merged patches (r174752, r174588). Approved by: re (kib) Notes: svn path=/stable/7/; revision=203071
* MFC 198339:Fabien Thomas2009-12-011-1/+1
| | | | | | | | | Fix the NO_PROXY handling. PR: 139751 Notes: svn path=/stable/7/; revision=200013
* MFC r186043, 186124, 186241Murray Stokely2009-01-094-12/+50
| | | | | | | | | | Add support for If-Modified-Since to fetch with new -i option. Consistently return 1 on error. Improve usage and SYNOPSIS. Notes: svn path=/stable/7/; revision=186920
* Don't fail mistakenly with -r when we already have the whole file.Ruslan Ermilov2008-10-241-0/+1
| | | | | | | Approved by: re (kib) Notes: svn path=/stable/7/; revision=184225
* MFC r178234: Fix one-byte buffer overflow in configuration file parsing.Colin Percival2008-08-301-1/+1
| | | | Notes: svn path=/stable/7/; revision=182493
* MFC libfetch from HEAD to RELENG_7Remko Lodder2008-03-074-9/+10
| | | | | | | | Approved by: imp (mentor, implicit), DES Glanced at by: des Notes: svn path=/stable/7/; revision=176899
* MFC: (1.101) replace fclose() with comment explaining why it's incorrect.Dag-Erling Smørgrav2008-01-241-1/+5
| | | | | | | Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=175625
* MFC: clean up namespace violations; correct is*() usage; NO_PROXY supportDag-Erling Smørgrav2008-01-188-345/+425
| | | | Notes: svn path=/stable/7/; revision=175441
* Enable FTP_COMBINE_CWDS.Dag-Erling Smørgrav2007-05-242-10/+2
| | | | Notes: svn path=/head/; revision=169960
* Bump library versions in preparation for 7.0.Daniel Eischen2007-05-211-1/+1
| | | | | | | Ok'd by: kan Notes: svn path=/head/; revision=169807
* Handle temporary redirects (HTTP status code 307)Dag-Erling Smørgrav2007-05-081-0/+2
| | | | | | | | | PR: kern/112515 Submitted by: Ryan C. Gordon <icculus@icculus.org> MFC after: 3 weeks Notes: svn path=/head/; revision=169386
* Add back the original behavior of changing the entire directory path atNate Lawson2007-04-222-2/+34
| | | | | | | | | | | | | once (CWD a/b/c vs. 3 CWDs). If an error occurs, we fall back to the default method of a single CWD per directory element. Since this is technically a violation of the basic FTP RFC, this behavior is under a compile-time option FTP_COMBINE_CWDS and is off by default. It should work with most Unix-based FTP daemons and can save latency. MFC after: 2 weeks Notes: svn path=/head/; revision=168960
* Respect MK_INET6_SUPPORT.Yaroslav Tykhiy2006-07-271-1/+4
| | | | Notes: svn path=/head/; revision=160737
* Respect FETCH_BIND_ADDRESS when opening the data connection.Dag-Erling Smørgrav2006-06-131-0/+5
| | | | | | | PR: misc/98872 Notes: svn path=/head/; revision=159566
* Fix a bug introduced in rev 1.92, where, when changing from one directoryDag-Erling Smørgrav2006-06-131-0/+2
| | | | | | | | | | | to another, the first CWD after a string of CDUPs would incorrectly include a slash before the directory name. Reported by: obrien PR: bin/83278 Notes: svn path=/head/; revision=159565
* Reimplementation of world/kernel build options. For details, see:Ruslan Ermilov2006-03-171-1/+3
| | | | | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine) Notes: svn path=/head/; revision=156813
* In order to maintain interoperability with certain broken FTP servers,Dag-Erling Smørgrav2006-01-191-2/+18
| | | | | | | | | | ignore a MODE failure if and only if the mode we attempted to set was S (which is supposed to be the default). PR: bin/91973 Notes: svn path=/head/; revision=154550
* Fix misspelling in Poul-Henning Kamp's email address under AUTHORS, fromTom McLaughlin2005-11-301-1/+1
| | | | | | | | | pkh@ to phk@. Approved by: ade Notes: svn path=/head/; revision=152941
* Ignore HTTP_PROXY if it is defined but empty. This was already handledDag-Erling Smørgrav2005-08-241-1/+1
| | | | | | | | | | | | | correctly in the case of FTP_PROXY, because an empty FTP_PROXY has a specific meaning ("don't use any proxy at all for ftp, even if HTTP_PROXY is defined"), while an empty HTTP_PROXY has no meaning at all. PR: bin/85185 Submitted by: Conall O'Brien <conallob=freebsd@maths.tcd.ie> MFC after: 2 weeks Notes: svn path=/head/; revision=149414
* Change directory one level at a time, and use CDUP to back out. This is aDag-Erling Smørgrav2005-08-121-29/+152
| | | | | | | | | | work in progress; it partially fixed bin/83278 and is a prerequisite to fixing bin/83277. PR: bin/83277, bin/83278 Notes: svn path=/head/; revision=148986
* Bump the shared library version number of all libraries that have notKen Smith2005-07-221-1/+1
| | | | | | | | | | been bumped since RELENG_5. Reviewed by: ru Approved by: re (not needed for commit check but in principle...) Notes: svn path=/head/; revision=148297
* Set the TCP_NODELAY socket option and clear TCP_NOPUSH in order to flushKelly Yancey2005-03-021-2/+15
| | | | | | | | | | | any pending HTTP request rather than calling shutdown(2) with SHUT_WR. This makes libfetch (and thus fetch(1)) work again with Squid proxies configured to not allow half-closed connections. Reported by: Pawel Worach (pawel.worach AT telia DOT com) Notes: svn path=/head/; revision=143049
* Fix a memory leak: when freeing the connection structure, don't forget toDag-Erling Smørgrav2005-02-161-0/+1
| | | | | | | | | | free the connection buffer as well. PR: bin/76153 MFC after: 1 week Notes: svn path=/head/; revision=141970
* Set TCP_NOPUSH on HTTP requests, reducing the number of round-tripsKelly Yancey2005-02-161-1/+9
| | | | | | | | | necessary to establish each connection. MFC after: 2 weeks Notes: svn path=/head/; revision=141958
* Expand contractions.Ruslan Ermilov2005-02-131-2/+2
| | | | Notes: svn path=/head/; revision=141851
* Expand *n't contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141846
* NOCRYPT -> NO_CRYPTRuslan Ermilov2004-12-211-1/+1
| | | | Notes: svn path=/head/; revision=139113
* Update copyright years.Dag-Erling Smørgrav2004-09-218-8/+9
| | | | Notes: svn path=/head/; revision=135546
* Don't forget to allocate space for the terminating NUL when converting toDag-Erling Smørgrav2004-08-071-1/+1
| | | | | | | | | | | base 64. PR: misc/70022 Submitted by: Herve Masson <herve-bsdbt@mindstep.com> MFC after: 3 days Notes: svn path=/head/; revision=133280
* Join the 21st century: Cryptography is no longer an optional componentColin Percival2004-08-061-1/+0
| | | | | | | | | | | | | of releases. The -DNOCRYPT build option still exists for anyone who really wants to build non-cryptographic binaries, but the "crypto" release distribution is now part of "base", and anyone installing from a release will get cryptographic binaries. Approved by: re (scottl), markm Discussed on: freebsd-current, in late April 2004 Notes: svn path=/head/; revision=133196
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-1/+1
| | | | Notes: svn path=/head/; revision=131504
* Slight tweak to previous commit: don't forget to call _http_seterr() ifDag-Erling Smørgrav2004-02-111-0/+1
| | | | | | | we get a genuine 416 reply. Notes: svn path=/head/; revision=125697
* When restarting a transfer that has already completed, the server willDag-Erling Smørgrav2004-02-111-9/+41
| | | | | | | | | | reply with a 416 error code (requested range not satisfiable) because we ask it to start at the end of the file. Handle this gracefully by considering a 416 reply a success if the requested offset exactly matches the length of the file and the requested length is zero. Notes: svn path=/head/; revision=125696
* Re-wrap some comments.Dag-Erling Smørgrav2004-02-111-6/+7
| | | | Notes: svn path=/head/; revision=125695
* I don't normally use my middle name, so remove it from attributions inDag-Erling Smørgrav2004-01-251-2/+2
| | | | | | | | man pages (though not from copyright notices). While I'm here, add email addresses where appropriate. Notes: svn path=/head/; revision=124963
* preparation for RFC3493. EAI_NODATA was deprecated.Hajimu UMEMOTO2003-10-231-0/+2
| | | | Notes: svn path=/head/; revision=121423
* mdoc(7): Use the new feature of the .In macro.Ruslan Ermilov2003-09-081-4/+4
| | | | Notes: svn path=/head/; revision=119893
* Don't close a FILE * which we know is bogus.Dag-Erling Smørgrav2003-08-291-1/+0
| | | | Notes: svn path=/head/; revision=119557
* Some servers respond to RETR in active mode with 125 (connection alreadyDag-Erling Smørgrav2003-08-191-1/+1
| | | | | | | | | | | open) rather than 150 (opening connection). There's no reason why we shouldn't accept that. PR: misc/42172 MFC in: 3 days Notes: svn path=/head/; revision=119123
* Make sure the crypto versions of libfetch and fetch(1) appear inRuslan Ermilov2003-07-221-0/+1
| | | | | | | | | the "crypto" distribution. Approved by: des Notes: svn path=/head/; revision=117890
* Add an EXAMPLES section.Tom Rhodes2003-06-101-0/+22
| | | | | | | | PR: 43899 Reviewed by: des, ru Notes: svn path=/head/; revision=116169
* Assorted mdoc(7) fixes.Ruslan Ermilov2003-05-221-1/+1
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=115225