1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00
Commit Graph

137 Commits

Author SHA1 Message Date
Ygal Blum
ad5a283528 Fix compilation when without-ssl is selected 2015-12-03 16:12:35 +01:00
Ander Juaristi
f8901af4e0 Added support for FTPS
* doc/wget.texi: updated documentation to reflect the new FTPS functionality.
 * src/ftp-basic.c (ftp_greeting): new function to read the server's greeting.
   (ftp_login): greeting code was previously here. Moved to ftp_greeting to
   support FTPS implicit mode.
   (ftp_auth): wrapper around the AUTH TLS command.
   (ftp_ccc): wrapper around the CCC command.
   (ftp_pbsz): wrapper around the PBSZ command.
   (ftp_prot): wraooer around the PROT command.
 * src/ftp.c (get_ftp_greeting): new static function.
   (init_control_ssl_connection): new static function to start SSL/TLS on the
   control channel.
   (getftp): added hooks to support FTPS commands (RFCs 2228 and 4217).
   (ftp_loop_internal): test for new FTPS error codes.
 * src/ftp.h: new enum 'prot_level' with available FTPS protection levels +
   prototypes of previous functions. New flag for enum 'wget_ftp_fstatus' to track
   whether the data channel has some security mechanism enabled or not.
 * src/gnutls.c (struct wgnutls_transport_context): new field 'session_data'.
   (wgnutls_close): free GnuTLS session data before exiting.
   (ssl_connect_wget): save/resume SSL/TLS session.
 * src/http.c (establish_connection): refactor ssl_connect_wget call.
   (metalink_from_http): take into account SCHEME_FTPS as well.
 * src/init.c, src/main.c, src/options.h: new command line/wgetrc options.
   (main): in recursive downloads, check for SCHEME_FTPS as well.
 * src/openssl.c (struct openssl_transport_context): new field 'sess'.
   (ssl_connect_wget): save/resume SSL/TLS session.
 * src/retr.c (retrieve_url): check new scheme SCHEME_FTPS.
 * src/ssl.h (ssl_connect_wget): refactor. New parameter of type 'int *'.
 * src/url.c. src/url.h: new scheme SCHEME_FTPS.
 * src/wget.h: new FTPS error codes.
 * src/metalink.h: support FTPS scheme.
2015-09-14 10:16:44 +02:00
Darshit Shah
f71887bbe5 Fix var name conflicts with math.h and wingdi.h
* src/recur.c (reject_reason): Rename all enum members to WG_RR_xx.
    * src/recur.c (retrieve_tree, download_child,
    write_reject_log_reason): Same
2015-08-15 15:43:33 +05:30
Tim Rühsen
3a708f7ef8 Fix C89 compliancy in latest code
* src/recur.c: Declare variables before code
  (write_reject_log_url):
    Use const keyword where appropriate
    Use the 'default' switch statement
    Use xfree() instead of free()
    Renamed variable f -> fp
  (write_reject_log_reason):
    Use const keyword where appropriate
    Use the 'default' switch statement
    Renamed variable f -> fp
    Renamed variable r -> reason
2015-08-07 13:42:30 +02:00
Jookia
e4db00d74d Add option to write URL rejections to a tab-delimited CSV log.
* main.c: Add "--rejected-log" option.
 * init.c: Add "rejectedlog" command.
 * options.h: Add "rejected_log" parameter string.
 * wget.texi: Add brief documentation on new --rejected-log option.
 * recur.c: Optionally log details of URLs not traversed.
   Add reject_reason enum.
   (download_child_p -> download_child): Return a reject_reason.
   (descend_redirect_p -> descend_redirect): Return a reject_reason.
   (retrieve_tree): Support logging reasons for rejection.
   Add write_reject_log_header that writes a CSV format header to a file.
   Add write_reject_log_url that writes a url struct to a file in CSV format.
   Add write_reject_log_reason that writes the URL and parent URL as well as the
   rejection reason to a CSV file.
 * Test--rejected-log.px: Add a basic test for the --rejected-log command.
 * tests/Makefile.am: Run Test--rejected-log.px.

This allows you to figure out why URLs are being rejected and some context
around it. CSV is used as the output format since it can be used easily parsed,
it's delimited by tabs instead of commas to allow using all (quoted) URL
characters and includes column names which may be used for compatibility.
2015-08-06 08:10:55 +02:00
Giuseppe Scrivano
9e12b8ca39 fix compiler warnings
* src/utils.h: Include <stdlib.h>
* src/recur.c: Include "exits.h"
2015-07-20 15:37:52 +02:00
Romain Bentz
80303366ae Add NULL value check to fix #45289
* src/recur.c (retrieve_tree): Check return value of url_parse()
2015-07-15 18:10:08 +02:00
Giuseppe Scrivano
16f1fb1d1f maint: update copyright year ranges to include 2015 2015-03-09 16:32:01 +01:00
Tim Ruehsen
4850e9c873 Replaced xfree_null() by xfree() and nullify argument after freeing. 2014-12-01 16:15:37 +01:00
Tim Rühsen
d87fdecd55 Add space after function names 2014-11-26 12:39:47 +01:00
Tim Rühsen
54227091b8 Fix blacklisting of URLs to download
Fixes a reported crash and prevents multiple downloads of the
same file in case the URL is escaped in different ways.

Reported-by: Frédéric <vfrederix@gmail.com>
2014-11-26 11:19:41 +01:00
Tim Rühsen
3c51ad7f02 Removed form feeds from sources and NEWS 2014-11-20 16:35:34 +01:00
Darshit Shah
8624553a31 Whitespace and formatting changes.(Aesthetic only)
This commit makes lots of whitespace only changes. It has been ensured that this
commit does not make any changes to the functioning of the program. The only
changes that have been made are:
    * Remove trailing whitespaces
    * Convert tabs to spaces
    * Fix indentation issues in the code
    * Other aesthetic changes to the formatting of comments
2014-05-30 21:12:57 +05:30
Tim Ruehsen
85dd2f7ce2 fix --without-ssl compile error 2013-09-14 11:35:43 +02:00
Tim Ruehsen
42c78fdd71 added option --https-only 2013-08-22 20:05:41 +02:00
Steven Schubiger
e9845d2813 Combine duplicated code. 2012-09-29 11:40:01 +02:00
Nguyễn Thái Ngọc Duy
74f6cb8884 Mark more strings for translation 2012-09-02 16:06:24 +02:00
Gijs van Tulder
f5a1097871 Add support for -accept-regex and --reject-regex. 2012-05-09 21:18:23 +02:00
Giuseppe Scrivano
28db25933b Now --no-parent doesn't fetch wrong files if HTTP and HTTPS are used together. 2011-03-31 01:37:12 +02:00
Giuseppe Scrivano
2f6aa1d741 mass change: update copyright years. 2011-01-01 13:19:37 +01:00
Giuseppe Scrivano
9ae052b1e2 Remove redundant guard. 2010-12-01 13:15:13 +01:00
Giuseppe Scrivano
260b9593dc Remove an unused function and an unused local variable. 2010-05-31 11:51:27 +02:00
Giuseppe Scrivano
293008f682 Mass update copyright years. 2010-05-08 21:56:15 +02:00
Micah Cowan
b9e9ad65cc Ran update-copyright. 2009-09-04 00:13:47 -07:00
Micah Cowan
b014f8fae9 Improved exit status handling. 2009-08-27 23:08:58 -07:00
Micah Cowan
18bca2706b More quoting. 2009-07-02 01:04:11 -07:00
Micah Cowan
a00b834bb3 Referer/IRI fix. 2009-07-01 23:17:33 -07:00
Micah Cowan
50e12521d6 Fixes to restore Test-iri and Test-iri-forced-remote 2009-06-28 20:55:01 -07:00
Micah Cowan
4f3dd68173 Merge with mainline. 2009-06-25 01:14:11 -07:00
gerel
ea3745e8dc removed some more calls 2009-02-01 15:03:51 -03:00
gerel
857224758e one less call 2009-02-01 13:06:32 -03:00
Saint Xavier
66dd4bda74 IRI requirement: do not percent-encode already percent-encoded values (try1) 2008-09-27 11:13:21 +02:00
Saint Xavier
26a3eea8e2 Removed commented *printf and use quote_n() for quoting several args 2008-08-15 15:15:42 +02:00
Xavier Saint
cbd54b549a Automated merge. 2008-08-14 18:45:13 +02:00
Xavier Saint
723dbfc818 Correct iri handling while fetching a remote file list with -i and provide a test 2008-08-14 18:26:53 +02:00
Xavier Saint
44a22c78a7 Automated merge. 2008-08-07 10:27:19 +02:00
Xavier Saint
84395897ad iri.h is already included in wget.h, so don't include it in C files 2008-08-04 11:08:33 +02:00
Micah Cowan
0fae9cb388 stsc: better message for "unsupported schemes". 2008-08-03 22:03:04 -07:00
Xavier Saint
bfd8a73f00 quote*() functions don't like that much NULL arg 2008-08-02 11:22:14 +02:00
Xavier Saint
b967d49f79 opt.remote_encoding should not override opt.locale, add a force arguments to set_uri_encoding() 2008-07-30 10:15:55 +02:00
Saint Xavier
3ae04f5fe4 Use DEBUGP instead of commenting out all the _wonderful_ printfs 2008-07-24 14:32:31 +02:00
Saint Xavier
d82f80ecab Change global variable model for state-object 2008-07-24 00:56:29 +02:00
Saint Xavier
b30a0dd817 Automated merge. 2008-07-20 21:45:09 +02:00
Saint Xavier
1e9ced0170 Get rid of the supplementary bool pointer in url_parse () arguments; UGLY :) 2008-07-20 18:47:52 +02:00
Saint Xavier
da6b3f4b61 Use dt rather than result 2008-07-20 18:20:18 +02:00
Saint Xavier
9a2ea3938d Basic IDN/IRI support 2008-07-20 13:10:02 +02:00
Micah Cowan
2e2ac6ad2f Merge current tip with CSS stuff. 2008-07-11 16:30:51 -07:00
Micah Cowan
39af614535 Fix typo and let CSS files be parsed. 2008-04-22 03:24:09 -07:00
Micah Cowan
1c231299bd Fix merge glitches, get it to build. 2008-04-22 01:47:39 -07:00
Micah Cowan
caae3b70f4 Merging Ted Mielczarek's CSS changes with tip. 2008-04-22 01:28:15 -07:00