summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
AgeCommit message (Collapse)Author
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@
2009-06-13- stat is not fatal, since we want resume not to fail for non-existentMartynas Venckus
file transfers in all cases - do it a bit earlier and use HTTP/1.0 if we won't send the range header - change resume -> restart_point where it is intended ok halex@, millert@
2009-06-06make it possible to abort transfers of broken ftp servers. firstMartynas Venckus
interrupt will do the standard abort procedure per rfc959. second interrupt will force the abort, and close the connection. done after email from halex@ couple of months ago. liked by many "I like this a lot" marco@. ok halex@, millert@, phessler@
2009-06-06it fetches multiple urls; so usage was wrong. ok sthen@Martynas Venckus
2009-06-04silently ignore -a if a username is supplied in the urlAlexander Hall
"looks sensible" deraadt@, "fine by me" martynas@ also removed an indeed misplaced/outdated comment per martynas@ request
2009-06-04set anonftp a little later; in autofetcher itself. after weMartynas Venckus
actually know that that login is not provided in url; and we should guess it. fixes a bug reported by halex@ where it tried to login as 'ftp' after unsuccessful logins; ok theo, halex@, krw@
2009-05-10couple of fixes for fetch:Martynas Venckus
- don't spam ftp server with four anonftp logins; if ftp_login has already failed in setpeer we give up. also makes install script nicer; req'd by theo - fix autologin = no case which never really worked in fetch since it did not check for autologin before logging in... part 1: ok theo, krw@ part 2: "looks right" millert@, ok sthen@
2009-05-10show which username login failed for; ok martynasTheo de Raadt
2009-05-05make it clean removing the ifdef SMALL maze. separate cmds andMartynas Venckus
small stuff. make it a fetcher. shrinks quite a bit agreed by millert@, krw@ ok theo, sthen@
2009-04-27in silent mode, shut up connect to address warning since it spamsMartynas Venckus
install media if, e.g. ipv6 is not present discussed with theo, sthen@, millert@, todd@
2009-04-27remove uploading and macros support from install media; to saveMartynas Venckus
some space discussed with theo, todd@, millert@ tested and looked over by sthen@
2009-04-27toast the rcsid strings which just get in the wayTheo de Raadt
2009-04-27embellish usage now that -T has been removed.Igor Sobrado
2009-04-26figure out titles automatically by using remote file name. removeMartynas Venckus
-T and just show titles by default for non-verbose transfers; discussed with, ok theo, sthen@
2009-04-26make two similar text strings identical; improves consistency and shrinksStuart Henderson
the text segment slightly (though due to padding it does not change the size of the binary). ok martynas@
2009-04-25guard NOOP code (that tries to send remaining NOOP string) afterMartynas Venckus
server closes connection during any get/put transfer. it dereferences cout, which will be NULL, oops originally reported on misc@. pirofti@ can't reproduce it again since the server has been fixed tested by simulating the very same failure sthen@ and pirofti@ agree that my analysis is correct ok sthen@
2009-04-13add a "-T title" option to ftp; this is is used in progress bar mode toTheo de Raadt
show which filename is being used. ok krw, mdoc repair from jmc
2009-01-27on some servers LIST defaults to LIST -a. ignore pseudo-directoriesMartynas Venckus
so that recursive transfers don't cause a loop. problem reported and tested by Jesus Sanchez. string compare inlining and looks good to millert@
2009-01-05since socks5 has been removed from ports recently, switch ftp toMartynas Venckus
dante instead. "makes sense" sthen@, ajacoutot@, "no objections" millert@; "i agree" jakob@. tested by Simon Kuhnle and myself
2008-12-07time_t is signed, so use INT_MAX rather than UINT_MAX when parsing a time_tChad Loder
with strtonum
2008-10-21add rcs idMartynas Venckus
2008-10-16- resume http transfers [-C], if local file does not existMartynas Venckus
- resume ftp transfers [-C, reget, mget], if local file does not exist ok theo
2008-10-16use O_CREAT in -C mode too, for in case it is not there the first timeTheo de Raadt
from frantisek holop, ok millert
2008-09-26support proxies with password.Marc Espie
adapted from a patch by nikns, with tweaks by millert. took forever to test for real... okay miod@, henning@, millert@
2008-09-18unbreak for gcc2 archs; declaration before code!Todd T. Fries
2008-09-08- simplify mget(): remove the duplicate code and just use getit(),Martynas Venckus
as a result it can do nice things getit() does such as: - -n: use 'newer' for transfers (fetches files that are newer on the server, than locally), this can be used for e.g. mirroring (mget -cnr 4.* would fetch missing files, continue interrupted transfers, and replace newer files of 4.X dirs) - -d: spedify depth of the recurrence. e.g. 'mget -rd 2 patches' in pub/openbsd would fetch only archive files, not going further into dirs - use static restartit, max_depth instead of doing the magic tested/requested&ok merdely@; ok pyr@, millert@ man page tweaks&ok jmc@