summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
AgeCommit message (Collapse)Author
2014-03-02only signed types work when comparing less than zero.Ted Unangst
reported by matthieu. ok deraadt
2014-02-26use a larger read buffer to speed things up, particularly during upgrades.Ted Unangst
ok deraadt
2014-01-29Unbreak ftp progress meter after the introduction of the '-D' flagDavid Coppa
ok tedu@
2014-01-23tweak previous;Jason McIntyre
2014-01-23Add -D shorttitle support, so that the progress meter can show some sortTheo de Raadt
of reason why it is processing a certain file. This will be used by the installer for that purpose. ok krw rpe
2013-12-24Add support for SSL/TLS server certificate validation, enabled byJeremie Courreges-Anglas
default. See the documentation for the `-S' switch. This also allows setting the preferred ciphers for the communication. Documentation bits ok'ed by jmc@, ok beck@ sthen@.
2013-12-20When writing a file, break out when we get a write(2) error, notJeremie Courreges-Anglas
just EPIPE, else we'll just reattempt the write with non-sensical values. From Maxime Villard (max at m00nbsd dot net).
2013-11-13protosTheo de Raadt
2013-11-13satisfy gcc in -Whiny modeTheo de Raadt
2013-11-12simple prototype repairsTheo de Raadt
2013-10-27If a constant string needs a name, use a static const array instead of aPhilip Guenther
pointer or non-const array, as that minimizes the symbols, maximizes the placement into read-only memory, and avoids warnings from gcc -Wformat=2 when they're used as format strings. ok deraadt@
2013-04-28Remove an obsolete paragraph in the BUGS section about using ftp(1) withLawrence Teo
4.2BSD servers. ok jmc nick tedu
2013-04-09Retry when SSL_read fails with SSL_ERROR_WANT_READ. Fixes the case whereStuart Henderson
an https server attempts renegotiation. ok jung@
2013-03-30Fixed a memory leak during HTTP header parsing.Tobias Stoeckmann
ok deraadt, halex, sthen
2013-02-19Add a STANDARDS section to list RFC's related to the FTP protocolLawrence Teo
(matches the STANDARDS section on the ftpd(8) man page); suggested by jmc@ in a discussion about this man page with Sebastian Rother and myself. ok jmc phessler
2013-02-15ARPANET -> InternetLawrence Teo
ok jmc
2013-01-06Remove empty[]. Unused after rev. 1.26.Martynas Venckus
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-10-15Add support for recursive ftp upload. The mput command of the ftpAlexander Bluhm
client got the -r switch and -d depth option. From Jan Klemkow <j.klemkow AT wemelug DOT de> OK haesbaert@
2012-08-26Make a few ftp(1) usage/man page changes related to BasicLawrence Teo
authentication: - Combine the http and https usage formats into a single http[s] format to make it more concise. - In the AUTO-FETCHING FILES section of the ftp(1) man page, mention that specifying "user" and "password" with HTTP and HTTPS URLs will log in using Basic authentication (if http_proxy is not defined). - When compiled with -DSMALL, fix ftp(1) usage so that "[user:password@]" is not shown for http[s] since Basic authentication is not supported with -DSMALL. Done with a lot of discussion with and help from jmc@ (thank you!). ok deraadt haesbaert jmc
2012-08-18Fix http resume without out auth, which I broke on the last commit,Christiano F. Haesbaert
spotted by bluhm. ok bluhm.
2012-08-14Add support for basic HTTP authentication as described on RFC 2617 andChristiano F. Haesbaert
RFC 3986. This allows the following idiom in ftp: ftp http[s]://user:pass@host/file With some pointers from halex a lot of testing and feedback from lteo, thanks a lot. ok lteo@
2012-05-19Reformat usage() to avoid the line wrap, and make it match the way itLawrence Teo
looks on the man page. ok haesbaert jmc henning
2012-04-30Add a -s flag to ftp(1) to let the user specify the source IP addressChristiano F. Haesbaert
of the connection. This is useful for testing ftp(1) over VPN tunnels. This -s flag is present in the other BSDs, including OS X. All work was done by Lawrence Teo, thanks (-:. ok myself mikeb
2012-04-23Handle HTTP Content-Length headers with trailing whitespace. ok martynas@Stuart Henderson
2010-09-03Make second parameter of poll() the correct type. Removes compile warning.lum
advice and ok martynas@
2010-08-25don't free proxyurl and cookie twice in the location code; with halex@Martynas Venckus
2010-07-26fix SYNOPSIS (yes, there are still some issues here);Jason McIntyre
2010-07-23Handle redirection to relative url's in the Location: header of httpAlexander Hall
responses. Yes, they are violating the rfc's. Yes they do exist anyway. Also fix a memory leak when url_encode fails to malloc, by simply err'ing out if so. feedback and ok phessler@
2010-07-15More delimiters that need quoting inside macros, hunted down by jmc@,Ingo Schwarze
who asked me to commit because he is just running out of the door.
2010-07-03make lint happyAlexander Hall
ok phessler@
2010-07-02#ifndef SMALL a few more things to save space on the ramdisksTheo de Raadt
2010-06-29fix output handling:Alexander Hall
- if a remote file by the name '-' is retrieved, that does not imply it should go to standard output... - make -o '' reset any previous -o action - properly handle multiple -o 's ok phessler@
2010-06-27Fix a crash when the directory entry isn't complete.Peter Hessler
found by Alexander Schrijver OK halex@
2010-06-03HTTP/1.1 requests must send a "Connection: close" header. Fixes the issue whereAlexander Hall
a download would stall at the end of the file for no apparent reason. ok sthen@, phessler@
2010-06-03When attempting to resume a download, against an HTTP server thatPeter Hessler
doesn't support resume, we restart the download from the beginning, like all other browsers. Diagnosed by sthen and halex, comment from sthen OK sthen@, halex@
2010-04-30shuffle some things around to deal with incomplete typesJonathan Gray
gcc4 gets upset about. based on suggestions from miod@, ok millert@
2010-04-26Fix a bug in auto-completion accidentally introduced when supportStefan Sperling
for auto-completion of filenames containing whitespace was added. This bug was tracked a decade ago in NetBSD as pr 7014. ok deraadt
2010-04-25ftpvis was not ok. fix it.Ted Unangst
2010-04-25Fix auto-completion of filenames containing whitespace.Stefan Sperling
Before this change whitespace wasn't escaped during completion which caused the ftp command to see multiple arguments where a single path was expected. Based on similar commit made to NetBSD's ftp in 1999. help and ok uwe tedu deraadt
2009-11-11do not walk off the prefix array, off by one; found by parfaitTheo de Raadt
ok jsg millert
2009-10-16factor psummary code of ftp.c to be generic, for all types ofMartynas Venckus
transfers. makes output between all transfers consistent; handles SIGINFO for non-ftp transfers too; shows statistics at the end: 7303400 bytes received in 96.00 seconds (74.29 KB/s) tweak / ok halex@, sthen@.
2009-08-26In "auto-fetch" mode without -o, the filename to save under is derivedStuart Henderson
from the URL. In cases where the URL supplied on the command-line returned an HTTP redirection, ftp(1) was changing the filename to one derived from the redirected URL. Change this to always use a name derived from the command-line URL. Avoids unexpected behaviour with URI-encoded redirection URLs as seen by matecocido on misc@, and avoids surprises when the redirection is to an unexpected filename. No change when -o is used. ok martynas@ deraadt@ "I totally approve" halex@
2009-08-09zap trailing whitespace;Jason McIntyre
2009-08-09document the "file:file" auto-fetching mode.Igor Sobrado
based on a conversation with martynas@; diff tweaked by jmc@ and martynas@ ok jmc@, martynas@
2009-08-06encode special or unsafe characters defined by rfc1738. as a result,Martynas Venckus
- urls passed to ftp containing special characters or unsafe characters (like, spaces, <>"#{}|\^~[]`%) work - redirects containing special characters or unsafe characters (like, spaces, <>"#{}|\^~[]`%) work reported & tested by ian@ (can fetch a distfile from sourceforge now) feedback + ok tedu@ & sthen@
2009-08-03tweak error message. url is valid per rfc1738 and can now beMartynas Venckus
fetchable with -o. so point to it too. requested by chris@ ok sthen@. better halex@
2009-07-27- make urls such as http://foo, http://foo/, or http://foo/bar/Martynas Venckus
fetchable, if -o outfile is passed. outfile will be used as a local filename - fix a bug where 'no file after host' code path never got entered; consider no file after dir invalid; as code intended proxy help&ok halex@; testing(including proxies,pkg_add)&ok sthen@; looks good to millert@
2009-07-18Don't assign NULL to an integer type, use 0 instead.Jonathan Gray
No binary change.
2009-06-29Fix the range of a #ifndef SMALL ... #endif not to include the "break;"Alexander Hall
needed not to make a status of 200 (OK) fall through to the redirect handling. This was not noticed since the later code would ignore the isredirect flag unless it also received a "Location: " header. ok martynas@