/* Reading/parsing the initialization file.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996-2005 Free Software Foundation, Inc.
This file is part of GNU Wget.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with Wget; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+along with Wget; if not, write to the Free Software Foundation, Inc.,
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
In addition, as a special exception, the Free Software Foundation
gives permission to link the code of its release of Wget with the
#include "recur.h" /* for INFINITE_RECURSION */
#include "convert.h" /* for convert_cleanup */
#include "res.h" /* for res_cleanup */
+#include "http.h" /* for http_cleanup */
+#include "retr.h" /* for output_stream */
/* We want tilde expansion enabled only when reading `.wgetrc' lines;
otherwise, it will be performed by the shell. This variable will
{ "connecttimeout", &opt.connect_timeout, cmd_time },
{ "continue", &opt.always_rest, cmd_boolean },
{ "convertlinks", &opt.convert_links, cmd_boolean },
+ { "contentdisposition", &opt.content_disposition, cmd_boolean },
{ "cookies", &opt.cookies, cmd_boolean },
{ "cutdirs", &opt.cut_dirs, cmd_number },
#ifdef ENABLE_DEBUG
{ "httpproxy", &opt.http_proxy, cmd_string },
{ "httpsproxy", &opt.https_proxy, cmd_string },
{ "httpuser", &opt.http_user, cmd_string },
+ { "ignorecase", &opt.ignore_case, cmd_boolean },
{ "ignorelength", &opt.ignore_length, cmd_boolean },
{ "ignoretags", &opt.ignore_tags, cmd_vector },
{ "includedirectories", &opt.includes, cmd_directory_vector },
#endif
{ "input", &opt.input_filename, cmd_file },
{ "keepsessioncookies", &opt.keep_session_cookies, cmd_boolean },
- { "killlonger", &opt.kill_longer, cmd_boolean },
{ "limitrate", &opt.limit_rate, cmd_bytes },
{ "loadcookies", &opt.cookies_input, cmd_file },
{ "logfile", &opt.lfilename, cmd_file },
opt.restrict_files_os = restrict_windows;
#endif
opt.restrict_files_ctrl = true;
+
+ opt.content_disposition = true;
}
\f
/* Return the user's home directory (strdup-ed), or NULL if none is
p = line;
cmdstart = p;
- while (p < end && (ISALPHA (*p) || *p == '_' || *p == '-'))
+ while (p < end && (ISALNUM (*p) || *p == '_' || *p == '-'))
++p;
cmdend = p;
{
const char *p;
- for (p = s; *p && *p != ':' && !ISSPACE (*p); p++);
+ for (p = s; *p && *p != ':' && !ISSPACE (*p); p++)
+ ;
/* The header MUST contain `:' preceded by at least one
non-whitespace character. */
if (*p != ':' || p == s)
\f
void cleanup_html_url (void);
-void http_cleanup (void);
/* Free the memory allocated by global variables. */
{
/* Free external resources, close files, etc. */
- {
- extern FILE *output_stream;
- if (output_stream)
- fclose (output_stream);
- /* No need to check for error because Wget flushes its output (and
- checks for errors) after any data arrives. */
- }
+ if (output_stream)
+ fclose (output_stream);
+ /* No need to check for error because Wget flushes its output (and
+ checks for errors) after any data arrives. */
/* We're exiting anyway so there's no real need to call free()
hundreds of times. Skipping the frees will make Wget exit