summaryrefslogtreecommitdiffstats
path: root/lib/libfetch
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug related to connection caching which could cause a crash afterdes2011-01-171-0/+1
| | | | | | | | a STAT command. PR: kern/153748 (different patch) Submitted by: Mark Johnston <markjdb@gmail.com> MFC after: 2 weeks
* Move variable declarations into the conditional block where they areemaste2010-10-241-1/+1
| | | | | | | used, to fix warning if WITH_SSL is not set. Submitted by: Sean Bruno MFC after: 1 week
* Redo fetch_read() using non-blocking sockets. This is necessary todes2010-07-281-20/+89
| | | | | | | | | avoid a hang in the SSL case if the server sends a close notification before we are done reading. In the non-SSL case, it can provide a minor (but probably not noticeable) performance improvement for small transfers. MFC after: 3 weeks
* Fix a couple of embarrassing mistakes in the previous commit.des2010-07-281-2/+2
| | | | Submitted by: Dimitry Andric <dimitry@andric.com>
* If the A flag is supplied, http_request() will attempt the request onlydes2010-07-011-2/+4
| | | | | | | | | | | once, even if authentication is required, instead of retrying with the proper credentials. Fix this by bumping the countdown if the origin or proxy server requests authentication so that the initial unauthenticated request does not count as an attempt. PR: 148087 Submitted by: Tom Evans <tevans.uk@googlemail.com> MFC after: 2 weeks
* Document HTTP digest authentication support.des2010-01-261-8/+14
| | | | | | Mention some prominent past contributors: Hajimu Umemoto (ipv6), Henry Whincup (https), Jukka Ukkonen (if-modified-since) and Jean-François Dockes (digest auth)
* Add missing DPADD and fix whitespace.des2010-01-191-2/+3
| | | | Submitted by: ru
* Add HTTP digest authentication.des2010-01-192-67/+819
| | | | | Submitted by: Jean-Francois Dockes <jf@dockes.org> Forgotten by: des (repeatedly)
* Fix a socket leak in ftp_request() after that a connection is established.attilio2009-11-251-3/+9
| | | | | | | Submitted by: Sandvine Incorporated Reviewed by: des, emaste Sponsored by: Sandvine Incorporated MFC: 1 week
* PR: 139751fabient2009-10-211-1/+1
| | | | | | Approved by: des Obtained from: Xavier Heiny <xavier.heiny@netasq.com> MFC after: 3 weeks
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-191-1/+1
| | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
* 1. Update fetch to consistently return 1 on error, as the man page states,murray2008-12-171-8/+0
| | | | | | | | | | | | | | | | | | | | | | rather than usually returning 1 but in a few instances using a sysexits(3) return value. 2. Remove a few unused variables from libfetch. PR: docs/122470 (1, only) Reviewed by: des > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M usr.bin/fetch/fetch.c M lib/libfetch/fetch.c
* Add support for HTTP 1.1 If-Modified-Since behavior.murray2008-12-153-4/+50
| | | | | | | | | | | | | | fetch(1) accepts a new argument -i <file> that if specified will cause the file to be downloaded only if it is more recent than the mtime of <file>. libfetch(3) accepts the mtime in the url structure and a flag to indicate when this behavior is desired. PR: bin/87841 Submitted by: Jukka A. Ukkonen <jau@iki.fi> (partially) Reviewed by: des, ru MFC after: 3 weeks
* Don't fail mistakenly with -r when we already have the whole file.ru2008-10-241-0/+1
| | | | Reviewed by: des
* Fix one-byte buffer overflow: NUL gets written to the buffer, but isn'tcperciva2008-04-151-1/+1
| | | | | | | | | | | counted in the width specification in scanf. This is not a security problem, since this function is only used to parse a user's configuration file. Submitted by: Joerg Sonnenberger Obtained from: dragonflybsd MFC after: 1 week
* s/wait/delta/ to avoid namespace collision.des2008-03-201-16/+16
| | | | MFC after: 2 weeks
* Use memcpy(3) instead of the BSD-specific bcopy(3).des2008-02-083-6/+6
| | | | | Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de> MFC after: 2 weeks
* s/MAXPATHLEN/PATH_MAX/ to reflect five-year old change to the code :)des2008-02-081-1/+1
| | | | | Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de> MFC after: 2 weeks
* Add necessary cast for tolower() argument.des2008-02-061-2/+3
| | | | | Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de> MFC after: 1 week
* Fix a regression introduced in rev 1.99: replace fclose(f) with a commentdes2008-01-231-1/+5
| | | | | | explaining why f cannot possibly be a valid FILE * at this point. MFC after: 1 day
* Add missing dependencies on Makefile (fixes NO_CLEAN builds).ru2007-12-191-4/+4
|
* As several people pointed out, I did all the ctype casts the wrongdes2007-12-194-28/+36
| | | | | | | way (not for the first time...) Noticed by: bde, ru ++ MFC after: 1 week
* Document NO_PROXY / no_proxy.des2007-12-181-1/+17
| | | | MFC after: 3 weeks
* Add support for the NO_PROXY / no_proxy environment variable as used bydes2007-12-184-8/+63
| | | | | | | | | lynx, curl etc. Note that this patch differs significantly from that in the PR, as the submitter refined it after submitting the PR. PR: 110388 Submitted by: Alexander Pohoyda <alexander.pohoyda@gmx.net> MFC after: 3 weeks
* Old patch I had lying around: correctly cast the argument to is*().des2007-12-183-24/+25
| | | | | | IWBNI gcc could warn about this the way it warns about printf() abuse. MFC after: 1 week
* Clean up namespace violations.des2007-12-147-314/+314
| | | | MFC after: 1 week
* Enable FTP_COMBINE_CWDS.des2007-05-242-10/+2
|
* Bump library versions in preparation for 7.0.deischen2007-05-211-1/+1
| | | | Ok'd by: kan
* Handle temporary redirects (HTTP status code 307)des2007-05-081-0/+2
| | | | | | PR: kern/112515 Submitted by: Ryan C. Gordon <icculus@icculus.org> MFC after: 3 weeks
* Add back the original behavior of changing the entire directory path atnjl2007-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
* Respect MK_INET6_SUPPORT.yar2006-07-271-1/+4
|
* Respect FETCH_BIND_ADDRESS when opening the data connection.des2006-06-131-0/+5
| | | | PR: misc/98872
* Fix a bug introduced in rev 1.92, where, when changing from one directorydes2006-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
* Reimplementation of world/kernel build options. For details, see:ru2006-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)
* In order to maintain interoperability with certain broken FTP servers,des2006-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
* Fix misspelling in Poul-Henning Kamp's email address under AUTHORS, fromtmclaugh2005-11-301-1/+1
| | | | | | pkh@ to phk@. Approved by: ade
* Ignore HTTP_PROXY if it is defined but empty. This was already handleddes2005-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
* Change directory one level at a time, and use CDUP to back out. This is ades2005-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
* Bump the shared library version number of all libraries that have notkensmith2005-07-221-1/+1
| | | | | | | been bumped since RELENG_5. Reviewed by: ru Approved by: re (not needed for commit check but in principle...)
* Set the TCP_NODELAY socket option and clear TCP_NOPUSH in order to flushkbyanc2005-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)
* Fix a memory leak: when freeing the connection structure, don't forget todes2005-02-161-0/+1
| | | | | | | free the connection buffer as well. PR: bin/76153 MFC after: 1 week
* Set TCP_NOPUSH on HTTP requests, reducing the number of round-tripskbyanc2005-02-161-1/+9
| | | | | | necessary to establish each connection. MFC after: 2 weeks
* Expand contractions.ru2005-02-131-2/+2
|
* Expand *n't contractions.ru2005-02-131-1/+1
|
* NOCRYPT -> NO_CRYPTru2004-12-211-1/+1
|
* Update copyright years.des2004-09-218-8/+9
|
* Don't forget to allocate space for the terminating NUL when converting todes2004-08-071-1/+1
| | | | | | | | base 64. PR: misc/70022 Submitted by: Herve Masson <herve-bsdbt@mindstep.com> MFC after: 3 days
* Join the 21st century: Cryptography is no longer an optional componentcperciva2004-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
* Mechanically kill hard sentence breaks.ru2004-07-021-1/+1
|
* Slight tweak to previous commit: don't forget to call _http_seterr() ifdes2004-02-111-0/+1
| | | | we get a genuine 416 reply.
OpenPOWER on IntegriCloud