]> sjero.net Git - wget/blob - TODO
[svn] Add more annotations to the TODO list.
[wget] / TODO
1                                  Hey Emacs, this is -*- outline -*- mode
2
3 This is the to-do list for GNU Wget.  There is no timetable of when we
4 plan to implement these features -- this is just a list of features
5 we'd like to see in Wget, as well as a list of problems that need
6 fixing.  Patches to implement these items are likely to be accepted,
7 especially if they follow the coding convention outlined in PATCHES
8 and if they patch the documentation as well.
9
10 The items are not listed in any particular order (except that
11 recently-added items may tend towards the top).  Not all of these
12 represent user-visible changes.
13
14 * Change the file name generation logic so that redirects can't dictate
15   file names (but redirects should still be followed).  By default, file
16   names should be generated only from the URL the user provided.  However,
17   with an appropriate flag, Wget will allow the remote server to specify
18   the file name, either through redirection (as is always the case now)
19   or via the increasingly popular header `Content-Disposition: XXX;
20   filename="FILE"'.  The file name should be generated and displayed
21   *after* processing the server's response, not before, as it is done now.
22   This will allow trivial implementation of -nc, of O_EXCL when opening
23   the file, --html-extension will stop being a horrible hack, and so on.
24
25 * -O should be respected, with no exceptions.  It should work in
26   conjunction with -N and -k.  (This is hard to achieve in the current
27   code base.)  Ancillary files, such as directory listings and such,
28   should be downloaded either directly to memory, or to /tmp.
29
30 * Implement digest and NTLM authorization for proxies.  This is harder
31   than it seems because it requires some rethinking of the HTTP code.
32
33 * Rethink the interaction between recur.c (the recursive download code)
34   and HTTP/FTP code.  Ideally, the downloading code should have a way
35   to retrieve a file and, optionally, to specify a list of URLs for
36   continuing the "recursive" download.  FTP code will surely benefit
37   from such a restructuring because its current incarnation is way too
38   smart for its own good.
39
40 * Both HTTP and FTP connections should be first-class objects that can
41   be reused after a download is done.  Currently information about both
42   is kept implicitly on the stack, and forgotten after each download.
43
44 * Restructure the FTP code to remove massive amounts of code duplication
45   and repetition.  Remove all the "intelligence" and make it work as
46   outlined in the previous bullet.
47
48 * Add support for SFTP.  Teach Wget about newer features of FTP servers
49   in general.
50
51 * Use FTP features for checking MD5 sums and implementing truly robust
52   downloads.
53
54 * Wget shouldn't delete rejected files that were not downloaded, but
55   just found on disk because of `-nc'.  For example, `wget -r -nc
56   -A.gif URL' should allow the user to get all the GIFs without
57   removing any of the existing HTML files.
58
59 * Be careful not to lose username/password information given for the
60   URL on the command line.  For example,
61   wget -r http://username:password@server/path/ should send that
62   username and password to all content under /path/ (this is apparently
63   what browsers do).
64
65 * Don't send credentials using "Basic" authorization before the server
66   has a chance to tell us that it supports Digest or NTLM!
67
68 * Add a --range parameter allowing you to explicitly specify a range
69   of bytes to get from a file over HTTP (FTP only supports ranges
70   ending at the end of the file, though forcibly disconnecting from
71   the server at the desired endpoint would work).  For example,
72   --range=n-m would specify inclusive range (a la the Range header),
73   and --range=n:m would specify exclusive range (a la Python's
74   slices).  -c should work with --range by assuming the range is
75   partially downloaded on disk, and contuing from there (effectively
76   requesting a smaller range).
77
78 * If multiple FTP URLs are specified that are on the same host, Wget should
79   re-use the connection rather than opening a new one for each file.
80   This should be easy provided the above restructuring of FTP code that
81   would include the FTP connection becoming a first-class objects.
82
83 * Try to devise a scheme so that, when password is unknown, Wget asks
84   the user for one.
85
86 * If -c used with -N, check to make sure a file hasn't changed on the server
87   before "continuing" to download it (preventing a bogus hybrid file).
88
89 * Generalize --html-extension to something like --mime-extensions and
90   have it look at mime.types/mimecap file for preferred extension.
91   Non-HTML files with filenames changed this way would be
92   re-downloaded each time despite -N unless .orig files were saved for
93   them.  Since .orig would contain the same data as non-.orig, the
94   latter could be just a link to the former.  Another possibility
95   would be to implement a per-directory database called something like
96   .wget_url_mapping containing URLs and their corresponding filenames.
97
98 * When spanning hosts, there's no way to say that you are only interested in
99   files in a certain directory on _one_ of the hosts (-I and -X apply to all).
100   Perhaps -I and -X should take an optional hostname before the directory?
101
102 * --retr-symlinks should cause wget to traverse links to directories too.
103
104 * Make wget return non-zero status in more situations, like incorrect HTTP auth.
105   Create and document different exit statuses for different errors.
106
107 * Make -K compare X.orig to X and move the former on top of the latter if 
108   they're the same, rather than leaving identical .orig files laying around.
109
110 * Make `-k' check for files that were downloaded in the past and convert links 
111   to them in newly-downloaded documents.
112
113 * Devise a way for options to have effect on a per-URL basis.  This is very
114   natural for some options, such as --post-data.  It could be implemented
115   simply by having more than one struct options.
116
117 * Add option to clobber existing file names (no `.N' suffixes).
118
119 * Add option to only list wildcard matches without doing the download.  The same
120   could be generalized to support something like apt's --print-uri.
121
122 * Handle MIME types correctly.  There should be an option to (not)
123   retrieve files based on MIME types, e.g. `--accept-types=image/*'.
124
125 * Allow time-stamping by arbitrary date.  For example,
126   wget --if-modified-after DATE URL.
127
128 * Make quota apply to single files, preferrably so that the download of an
129   oversized file is not attempted at all.
130
131 * When updating an existing mirror, download to temporary files (such as .in*)
132   and rename the file after the download is done.
133
134 * Add an option to delete or move no-longer-existent files when mirroring.
135
136 * Implement uploading (--upload=FILE URL?) in FTP and HTTP.  A beginning of
137   this is available in the form of --post-file, but it should be expanded to
138   be really useful.
139
140 * Make HTTP timestamping use If-Modified-Since facility.
141
142 * Add more protocols (such as news or possibly some of the streaming
143   protocols), implementing them in a modular fashion.
144
145 * Add a "rollback" option to have continued retrieval throw away a
146   configurable number of bytes at the end of a file before resuming
147   download.  Apparently, some stupid proxies insert a "transfer
148   interrupted" string we need to get rid of.