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

457 Commits

Author SHA1 Message Date
Micah Cowan
27478c069f Fix gethttp returning RETROK, which caused abortion. 2007-09-28 18:21:08 -07:00
Micah Cowan
5dd09d9ba5 Update copyright lists, conforming to maintainer guidelines 2007-09-28 15:45:31 -07:00
micah
db4f2e31ca [svn] Apply Jochen's patch to stop local size always reporting as 0 2007-09-24 22:20:58 -07:00
Micah Cowan
e3dffde871 Timestamp files, regardless of HEAD 2007-09-12 09:34:14 -07:00
micah
adc0632654 [svn] Fix #20747: Wget was returning error for non-recursive --spider when file exists. 2007-08-29 21:34:34 -07:00
micah
6e3d978b8b [svn] Fix #20323 - Adjustments and tests for when HEAD should be sent. 2007-08-29 21:16:24 -07:00
micah
4358313069 [svn] Fix #20322 - Use timestamp from most recent response. 2007-08-29 20:35:49 -07:00
micah
2fe72be505 [svn] Fix for bug #20512: Don't abort for negative Content-Length values. 2007-07-31 15:39:52 -07:00
micah
c17f57f1fa [svn] Fix for bug #20296: User:pass@ given in Referer header. 2007-07-29 18:22:34 -07:00
micah
e4600575bb [svn] Fix for bug #20299: Basic auth creds sent before challenge 2007-07-29 17:29:05 -07:00
micah
78aefb3bbf [svn] Backing out incomplete changes for bug 20323, until the full fix is
ready (so we have a working trunk).
2007-07-10 21:39:36 -07:00
micah
4d7c5e087b [svn] Merge of fix for bugs 20341 and 20410. 2007-07-09 22:53:22 -07:00
mtortonesi
dfeb089f3c [svn] Skip HEAD request and start immediately with GET if -O is given. 2007-07-03 16:01:25 -07:00
hniksic
a83387134c [svn] Escape non-printable characters in server response. 2007-02-02 01:36:49 -08:00
mtortonesi
14ee3a6c03 [svn] Fix -P in case HTTP Content-Disposition header is present. 2006-12-27 01:42:28 -08:00
mtortonesi
763229b67f [svn] #include'd spider.h to get rid of compiler warnings. 2006-08-28 07:41:40 -07:00
mtortonesi
0dbef4ccb4 [svn] Several fixes for recursive spider mode. 2006-08-24 08:27:57 -07:00
mtortonesi
8c45a34a55 [svn] Fixed a timestamping related bug in HTTP downloads. 2006-08-21 06:38:15 -07:00
mtortonesi
a9c3209a9b [svn] Fix broken -c in new HTTP code. 2006-08-17 03:49:29 -07:00
hniksic
8566a72767 [svn] Avoid code repetition between time_str and datetime_str. 2006-08-08 07:32:53 -07:00
mtortonesi
1c7493b83e [svn] Added sanity checks for -k, -p, -r and -N when -O is given. Added fixes for 64-bit platforms. Updated copyright and maintainer information. 2006-07-14 06:25:50 -07:00
mtortonesi
01093c0c33 [svn] Fixed recursive spider mode. 2006-05-25 09:11:29 -07:00
mtortonesi
9a66d92f60 [svn] Improvements/fixes to HTTP Content-Disposition header support. 2006-04-28 02:15:14 -07:00
hniksic
a46aa44f57 [svn] Document parse_content_disposition. 2006-04-08 09:05:42 -07:00
mtortonesi
ea4ffded27 [svn] Restricted operational semantics of frontcmp and proclist from generic strings to directory names, and fixed dirname matching algorithm. Renamed above mentioned functions to subdir_p and dir_matches_p respectively. Added testcases for subdir_p and dir_matches_p. 2006-03-15 06:55:29 -08:00
mtortonesi
46c94e5f26 [svn] Fixed recursive HTTP retrieval 2006-03-02 01:27:45 -08:00
hniksic
65cc42ee09 [svn] Use the extract_param function for parsing the www-authenticate header. 2006-02-28 14:32:56 -08:00
hniksic
6d2dc0a1b3 [svn] Use extract_params to parse the Set-Cookies header. 2006-02-28 12:50:37 -08:00
hniksic
66ee895734 [svn] Deleted extract_param_value_delim. 2006-02-28 12:09:34 -08:00
hniksic
c90e4f9c1a [svn] Parse Content-Disposition better. Implement memrchr where missing. 2006-02-28 11:27:52 -08:00
hniksic
e8b61e46ab [svn] Only use FILE.N.html if FILE.html exists. 2006-02-25 15:28:49 -08:00
mtortonesi
d8f368d062 [svn] Implement correct parsing of HTTP Content-Disposition header. 2006-02-03 01:33:57 -08:00
mtortonesi
bfd24dba71 [svn] Removed empty lines in output format. 2006-01-30 02:06:10 -08:00
mtortonesi
b5be7ce301 [svn] Commited new HTTP output format. 2006-01-30 00:54:09 -08:00
mtortonesi
823228830e [svn] Fixed pre-download verbose output which was broken by HTTP code refactoring. 2005-12-07 00:24:24 -08:00
mtortonesi
e7433e4027 [svn] Removed C++ style comments from http.c and test.c, as we support C89 compilers as well. 2005-12-05 02:55:30 -08:00
mtortonesi
d40086ba5f [svn] Major refactoring of HTTP code. Added support for Content-Disposition header. 2005-11-23 02:18:18 -08:00
hniksic
9aae245890 [svn] Tell OpenSSL to renegotiate automatically (mode SSL_MODE_AUTO_RETRY).
By Jeremy Shapiro.
2005-08-26 03:42:31 -07:00
hniksic
b138e352e0 [svn] Don't read more than the amount of data specified by the content-length
header.  Removed the obsolete "kill_lines" wgetrc var.
2005-08-08 15:51:19 -07:00
hniksic
ac4f55a297 [svn] Allow null MESSAGE. 2005-07-06 02:25:12 -07:00
hniksic
2ef83f89bd [svn] Don't print write error message twice. 2005-07-04 15:53:17 -07:00
hniksic
6f6af2d913 [svn] Only allocate an error string on actual error. 2005-07-04 14:42:09 -07:00
hniksic
550c39e714 [svn] Correctly print SSL errors. 2005-07-03 14:20:33 -07:00
hniksic
d7ddbd9720 [svn] Document reasoning behind CLOSE_INVALIDATED more accurately. 2005-07-02 06:23:54 -07:00
hniksic
79a8def8c8 [svn] Document the side effect of test_socket_open. 2005-07-02 06:22:13 -07:00
hniksic
025fcc29a8 [svn] Correctly skip error message body for keep-alive connections. 2005-07-02 04:03:29 -07:00
hniksic
db9de5b075 [svn] Update FSF's address and copyright years. 2005-07-01 19:26:52 -07:00
hniksic
f238f09492 [svn] Minor improvements to fd_read_hunk. 2005-07-01 16:37:50 -07:00
hniksic
5b26cb40a9 [svn] Explicitly document all cases when generating the Host header. 2005-06-30 08:09:39 -07:00
hniksic
2447fb9a9b [svn] Move extern declarations to .h files. 2005-06-27 11:19:22 -07:00
hniksic
bb8a5f2eb9 [svn] Check for timegm and use it where available. 2005-06-27 06:22:30 -07:00
hniksic
0561a866c3 [svn] Remove obsolete comment. 2005-06-27 05:53:01 -07:00
hniksic
9468fba4f7 [svn] Correctly query the old locale value. 2005-06-27 04:50:04 -07:00
hniksic
2254e5c4e4 [svn] Set all locale categories. 2005-06-26 19:06:52 -07:00
hniksic
68e27bf7e2 [svn] Improve "POST data file missing" error message. 2005-06-26 18:11:10 -07:00
hniksic
319f52d756 [svn] When the download is finished, print the time the download took.
Always invoke SIZE, not only when continuing the download.
2005-06-25 17:41:09 -07:00
hniksic
e24bc5db1b [svn] Rewrite with_thousand_seps to be size-agnostic. Remove printing of separators
from sizes.
2005-06-25 16:09:29 -07:00
hniksic
bd74e419d6 [svn] Don't pattern-match server redirects. 2005-06-25 08:04:47 -07:00
hniksic
002def87d2 [svn] Rename LARGE_INT to SUM_SIZE_INT, and simplify its handling. 2005-06-25 07:39:51 -07:00
hniksic
61c5b229b7 [svn] Consistently prepend / to path when entering cookie code. 2005-06-24 05:15:03 -07:00
hniksic
74fbb03b10 [svn] Use bool type for boolean variables and values. 2005-06-22 12:38:10 -07:00
hniksic
6895126a68 [svn] Fix crash with --no-cookies. 2005-06-21 18:06:48 -07:00
hniksic
908d7a4bce [svn] Don't cast return type of malloc/realloc. Assume ANSI C signal handlers. 2005-06-19 16:03:27 -07:00
hniksic
277e840a0f [svn] Remove K&R support. 2005-06-19 15:34:58 -07:00
hniksic
613719687c [svn] Fix broken --save-headers. 2005-06-18 07:13:16 -07:00
hniksic
1805044ecd [svn] When -E is in use, check for file existence after appending ".html" to the
name and modify the file name if necessary.
2005-06-17 15:06:26 -07:00
hniksic
4206f96614 [svn] Gettext-ize previously missed messages.
By Benno Schulenberg.
2005-06-15 13:26:37 -07:00
hniksic
eeacdb2ebc [svn] Don't attempt to "skip short body" if we're issuing a HEAD request (in which
case the response head is not followed by a body).
2005-05-30 07:29:01 -07:00
hniksic
5771564c9c [svn] Document the origin of the "cookie date" format. 2005-05-24 07:16:27 -07:00
hniksic
05a000a477 [svn] Don't clobber the file when -c fails in the first attempt. 2005-05-17 02:01:31 -07:00
hniksic
fc5a9adfab [svn] Clarify the logic of persistent_available_p. 2005-05-16 15:01:10 -07:00
hniksic
c1ba8c2111 [svn] Would forget to close the connection when keep_alive was not used. 2005-05-14 12:24:22 -07:00
hniksic
c2bc8982b7 [svn] Tell the user about --no-check-certificate. 2005-05-11 08:52:27 -07:00
hniksic
5feb3f6696 [svn] Check for the server's identity after the SSL handshake. 2005-05-10 08:17:37 -07:00
hniksic
ee18acce0a [svn] Check for wildcards in unescaped URL path. 2005-05-08 10:52:26 -07:00
hniksic
1fab70a664 [svn] Fix warnings reported by gcc -Wstrict-prototypes -Wmissing-prototypes. 2005-05-08 02:58:39 -07:00
hniksic
58828beb5f [svn] Doc fix. 2005-05-07 10:13:18 -07:00
hniksic
247387fef5 [svn] Doc fix. 2005-05-07 10:11:29 -07:00
hniksic
4c4c440401 [svn] Fix request-line argument when talking to SSL server over proxy. 2005-05-06 16:27:47 -07:00
hniksic
302c744e9a [svn] Don't complain about "unknown authentication scheme" if the scheme
is Basic.  Allow empty user-agent meaning "don't send User-Agent".
2005-05-06 10:16:15 -07:00
hniksic
4192de0002 [svn] Minor doc fix. 2005-05-06 06:56:16 -07:00
hniksic
818fbdf32a [svn] Comment doc fix. 2005-05-05 15:02:46 -07:00
hniksic
a231f88b54 [svn] Zero out all of struct tm before passing it to strptime. 2005-05-05 14:49:28 -07:00
hniksic
0967c21094 [svn] Fix K&R incompatibilities reported by `gcc -Wtraditional'. 2005-05-03 08:24:30 -07:00
hniksic
b8af169bb5 [svn] Remove unreached (and useless) break statements. 2005-04-28 06:56:31 -07:00
hniksic
c2c41a6b14 [svn] Remove unreachable "break" statements. 2005-04-28 06:52:02 -07:00
hniksic
c4a5b4dfc7 [svn] Set the CONNECT user-agent in the correct request object. 2005-04-27 15:31:12 -07:00
mtortonesi
e815fe81a0 [svn] Add the --user, --password, --ftp-user and --ftp-password options.
Rename the --ftp-passwd, --http-passwd and --proxy-passwd options to
--ftp-password, --http-password and --proxy-password respectively.
Deprecate the login and passwd .wgetrc commands.
2005-04-27 14:30:22 -07:00
hniksic
8f935cf74c [svn] Add --random-file option. Bail out in case of error during
SSL initialization.
2005-04-27 14:08:40 -07:00
hniksic
b8efb6d762 [svn] Allow separate specification of certificate type and private key type. 2005-04-27 10:15:10 -07:00
hniksic
b8d826f243 [svn] Renamed src/gen_sslfunc.c to src/openssl.c and src/gen_sslfunc.h to
src/ssl.h.
2005-04-26 14:41:41 -07:00
hniksic
4edde35100 [svn] Renamed the SSL switches and commands. 2005-04-26 10:22:56 -07:00
hniksic
428c1a2b3c [svn] Fix various cookie-related problems. 2005-04-26 06:34:33 -07:00
hniksic
5bcaac1177 [svn] Remember that the NTLM-authorized TCP connections stay authorized. 2005-04-22 19:03:19 -07:00
hniksic
add6c24a19 [svn] Fix bugs in NTML handling. 2005-04-22 08:15:25 -07:00
hniksic
85c143a2a5 [svn] Fix the check whether a new header needs to be allocated.
By FUJISHIMA Satsuki.
2005-04-20 13:15:05 -07:00
hniksic
155ca3d489 [svn] Change orders of parameters of base64_encode, so it makes more sense.
Mention NTLM support in http.c.
2005-04-18 07:23:23 -07:00
hniksic
d406908e94 [svn] Fix potential memory leak in request_set_header. 2005-04-17 09:59:35 -07:00
hniksic
ab18c0eaed [svn] Really disable persistent connections over proxy. 2005-04-16 06:06:29 -07:00
hniksic
c547fdd6b3 [svn] Report an error in skip_short_body to the caller. 2005-04-14 14:12:57 -07:00
hniksic
4cf3365fcf [svn] Open the output file in binary mode.
By Gisle Vanem.
2005-04-12 13:32:31 -07:00
hniksic
364dc617a4 [svn] Doc fix. 2005-04-11 06:41:28 -07:00
hniksic
52ad80309f [svn] Added NTLM support. 2005-04-06 13:42:22 -07:00
hniksic
e65ff5729a [svn] Avoid explicit 64-bit constants; construct them by multiplication at
compile-time.
2005-04-01 10:22:38 -08:00
hniksic
b9a31d78dd [svn] Support human-readable file size printing.
Don't use persistent connection over proxies.
2005-03-22 05:20:02 -08:00
hniksic
7c044778bc [svn] Improve built-in memory debugger. 2005-03-20 07:07:40 -08:00
hniksic
72ce32e8ab [svn] Limit the maximum amount of memory allocated by fd_read_hunk and its
callers.  Don't allocate more than 64k bytes on headers; don't allocate
more than 4k bytes on a single line.
2005-03-19 09:35:15 -08:00
hniksic
c36e9a5272 [svn] Concatenate strings using concat_strings. 2005-03-19 09:23:32 -08:00
hniksic
976c54d0e6 [svn] Handle multiple Set-Cookie headers sent by the server. 2005-03-06 14:53:02 -08:00
hniksic
e2241936d0 [svn] Remove warnings under Borland C. 2005-03-05 18:11:10 -08:00
hniksic
b3363d2abd [svn] Fix escape chars in server response vulnerability. Server response is
now quoted to escape non-ASCII characters.
2005-03-04 11:34:31 -08:00
hniksic
50d143f3fe [svn] Fix a possible race condition when opening files.
Published in <87r7j6vy9g.fsf@xemacs.org>.
2005-03-04 11:26:18 -08:00
hniksic
ef22bf610a [svn] Large file support added. Published in <87psyr6jn7.fsf@xemacs.org>. 2005-02-23 14:21:04 -08:00
mtortonesi
65af6f7432 [svn] Fixed -k when using -O. 2004-11-18 16:44:38 -08:00
hniksic
2fdf38285b [svn] Fix typo. 2004-03-31 11:14:05 -08:00
hniksic
7488d701bf [svn] Send the Proxy-Authorization header over non-SSL connections too. 2004-03-30 15:19:16 -08:00
hniksic
a0642cc62e [svn] Revamped MS console logic. Submitted by David Fritz. 2004-02-25 15:45:24 -08:00
hniksic
5114df6b33 [svn] Respect --ignore-length.
Inhibit keep-alive when --ignore-length is used.
2004-02-06 17:48:54 -08:00
hniksic
2c0e2b0afa [svn] Fixes by Christian Biere:
* progress.c (bar_set_params): Fixed syntax error when HAVE_ISATTY
was undefined.
* ftp.c (ftp_loop_internal): Allocate a larger buffer in case
"try" gets translated to something large.  Ditto in http_loop in
http.c.
* http.c (response_header_copy): Don't write to buf[BUFSIZE].
* ftp-opie.c (skey_response): Eliminate unnecessary string
concatenation; just call gen_md5_update twice.
2004-01-27 17:02:26 -08:00
hniksic
4bbe443be3 [svn] Fix generation of `Content-Length'. 2003-12-16 12:42:06 -08:00
hniksic
261183c609 [svn] retr.c (fd_read_body): Pass total size to progress_create, not
the remaining amount.
2003-12-12 14:55:20 -08:00
hniksic
a8155e7bcc [svn] Correctly calculate bandwidth as total data read divided with download
time.
2003-12-05 18:32:57 -08:00
hniksic
bf8350af62 [svn] Support the 303 See Other response. 2003-12-05 06:37:47 -08:00
hniksic
78706dc5ea [svn] * retr.c (fd_read_body): Report the amount of data *written* as
amount_read.  This is not entirely logical, but that's what the
callers expect, and it's not easy to change.

* ftp.c (ftp_loop_internal): Ditto.

* http.c (http_loop): Be smarter about assigning restval; if we're
in the nth pass of a download, simply use the information we have
about how much data has been retrieved as restval.

* ftp.c (getftp): Ditto for FTP "REST" command.

* http.c (gethttp): When the server doesn't respect range, skip
the first RESTVAL bytes of the read body.  Never truncate the
output file.

* retr.c (fd_read_body): Support skipping initial STARTPOS octets.
2003-11-30 15:39:04 -08:00
hniksic
381457408a [svn] Read the data in skip_short_body directly. 2003-11-30 06:33:00 -08:00
hniksic
2f357b5eb8 [svn] Better documentation for fd_read_body args. 2003-11-29 20:41:08 -08:00
hniksic
3390f7eb45 [svn] Try to reuse connections that return error codes. 2003-11-29 17:34:33 -08:00
hniksic
63d492c0ba [svn] Initialize SSL only the first time when an SSL URL is encountered. 2003-11-29 14:24:55 -08:00
hniksic
ddd2644bc8 [svn] Docfix. 2003-11-29 14:19:46 -08:00
hniksic
0ff9eb4727 [svn] Restructure generation of HTTP requests. Allow headers specified with
--header to override generated headers.
2003-11-29 10:40:01 -08:00
hniksic
83b0e38940 [svn] Don't include the Proxy-Authorization header in the request tunneled
through proxy.
2003-11-28 03:28:05 -08:00
hniksic
76b59b1ad7 [svn] Use the CONNECT method to establish passthrough over SSL traffic
over proxies.
2003-11-27 18:24:53 -08:00
hniksic
dfe1f43dc0 [svn] Use fd_read_hunk for reading HTTP response head. Support HTTP/0.9
responses.
2003-11-27 15:29:36 -08:00
hniksic
7736d5dc98 [svn] Remove headers.c and headers.h. 2003-11-21 00:48:45 -08:00
hniksic
d9fea91a0a [svn] Remove the "rbuf" buffering layer. Provide peeking primitives instead. 2003-11-20 17:48:11 -08:00
hniksic
0716c335a0 [svn] Renamed xread/xwrite/xclose to fd_read/fd_write/fd_close. The "x" prefix is
not appropriate because the semantics have diverged from read/write/close
too significantly.
2003-11-20 07:19:59 -08:00
hniksic
0fb0ee87c7 [svn] Renamed address_list_find to address_list_contains. 2003-11-18 14:18:44 -08:00
hniksic
36387204b0 [svn] Fix call to socket_ip_address. 2003-11-14 18:03:23 -08:00
hniksic
9d907933ad [svn] Don't attempt to talk to two different SSL sites over the same secure
connection.
2003-11-13 14:48:03 -08:00
hniksic
509154dc81 [svn] Use the new function retryable_socket_connect_error instead of the
CONNECT_ERROR macro.
2003-11-13 14:27:38 -08:00
hniksic
c4ba08110d [svn] Mark clearly where the response begins and ends in the debug output. 2003-11-08 17:05:35 -08:00
hniksic
d7e592d797 [svn] Replace conaddr with socket_ip_address. 2003-11-07 18:57:51 -08:00
hniksic
1a0adb90b4 [svn] Don't force silent lookup. 2003-11-07 16:11:29 -08:00
hniksic
bc764dbb7c [svn] Improve SSL code. Only initialize PRNG when needed. 2003-11-06 05:06:59 -08:00
hniksic
c8e92cdbd6 [svn] Get rid of ssl_iread/ssl_iwrite. Have the SSL code register its
routines for reading and writing data.
2003-11-05 17:12:03 -08:00
hniksic
38b37ed104 [svn] New option --keep-session-cookies. 2003-11-04 16:11:33 -08:00
hniksic
e2e9b753e4 [svn] Retired the `boolean' type. Renamed FREE_MAYBE to xfree_null and moved the
definition from wget.h to xmalloc.h.  Moved the DEFAULT_LOGFILE
define to log.h.  Moved the INFINITE_RECURSION define to recur.h.
2003-11-02 11:56:37 -08:00
hniksic
370ff7a576 [svn] Moved malloc-related code to xmalloc.c. Defined new macros xnew, xnew0,
xnew_array, and xnew0_array.  Created xmalloc.h and log.h to unclutter
wget.h.
2003-10-31 06:31:56 -08:00
hniksic
add61a2d9c [svn] Networking improvements: get rid of the MSOCK global variable,
move the sockaddr handling to connect.c, make sure Wget refreshes
the DNS lookup after it becomes stale.
2003-10-30 16:18:08 -08:00
hniksic
6f1250b1c6 [svn] Updated IPv6 code. 2003-10-29 15:13:25 -08:00
hniksic
90cb3309da [svn] Imported Mauro's IPv6 changes. 2003-10-29 10:23:56 -08:00
hniksic
31d919b23d [svn] Accept HTTP status 307 as redirect. 2003-10-14 16:32:15 -07:00
hniksic
711bf72609 [svn] Remove VERY_LONG_TYPE; use LARGE_INT instead. Remove special code
for handling VERY_LONG_TYPE overflows.
Make opt.quota a LARGE_INT.
2003-10-11 06:57:11 -07:00
hniksic
38ea4d5dad [svn] Renamed DEBUG to ENABLE_DEBUG. 2003-10-07 17:05:51 -07:00
hniksic
097923f7b1 [svn] Move fnmatch() to cmpt.c and don't use it under GNU libc. 2003-10-07 16:53:31 -07:00
hniksic
254291cc03 [svn] Fix crash when post-file is missing. 2003-10-04 15:26:58 -07:00
hniksic
95c647eb44 [svn] Split off non-URL related stuff from url.c to convert.c. 2003-09-21 15:47:14 -07:00
hniksic
c06d32a309 [svn] Treat xhtml files just like regular html.
By Matthew J. Mellon.
2003-09-21 05:02:57 -07:00
hniksic
7b5fb50cb1 [svn] Renamed wget.h XDIGIT-related macros to (hopefully) clearer names. 2003-09-19 07:08:37 -07:00
hniksic
0e77942233 [svn] Don't pad shrunk POST'ed files.
Message-ID: <m3u17dn1qk.fsf@hniksic.iskon.hr>
2003-09-15 15:09:17 -07:00
hniksic
9228f0bf53 [svn] Update progress code to use higher timer resolution.
Message-ID: <m37k49oivp.fsf@hniksic.iskon.hr>
2003-09-15 14:14:15 -07:00
hniksic
0a3697ad65 [svn] New mechanism for quoting file names.
Published in <m3smmzt4px.fsf@hniksic.iskon.hr>.
2003-09-14 15:04:13 -07:00
hniksic
30ac043b0a [svn] New option --retry-connrefused from Ahmod Dancy. 2003-09-04 14:34:58 -07:00
hniksic
b2be7522c7 [svn] Update the license to include the OpenSSL exception. 2002-05-17 19:16:36 -07:00
abbotti
043d305fb1 [svn] Don't ftruncate standard output.
Submitted by Bill Richardson  <bill@riverstonenet.com>.
Final version of patch published in
<9vv1eus668tn7v3vn95e7l2lcjbbph8bi2@farscape.privy.mev.co.uk>.
2002-05-14 05:23:51 -07:00
hniksic
29a66192cf [svn] Cookie interface and implementation changes
from <sxsofge9yao.fsf@florida.arsdigita.de>
and <sxslmbim7dg.fsf@florida.arsdigita.de>.
2002-04-20 13:46:38 -07:00
hniksic
426bf23ae1 [svn] If content-type is not given, assume text/html. 2002-04-15 18:13:51 -07:00
hniksic
9f2cc07924 [svn] Minor cleanup of iread/iwrite.
Published in <sxsk7raj1t2.fsf@florida.arsdigita.de>.
2002-04-13 22:19:27 -07:00
hniksic
5cb8a6f44d [svn] Add the POST method.
Published in <sxssn5yj4eb.fsf@florida.arsdigita.de>.
2002-04-13 21:22:47 -07:00
abbotti
4aaf8fdcea [svn] Compensate for MS Windows two-second granularity of file modification
timestamps.
Submitted by Ian Abbott in <3CB7355C.21011.2134FDA@localhost>.
2002-04-12 12:21:02 -07:00
abbotti
cfd7b9a951 [svn] Use new function to test filename for common html suffixes.
Submitted by Ian Abbott in <3CB72D29.4898.1F34872@localhost> with minor
changes to formatting and comments.
2002-04-12 11:53:39 -07:00
hniksic
1375a89141 [svn] Allow Wget to be compiled with a K&R compiler.
Published in <sxszo0af9k6.fsf@florida.arsdigita.de>.
2002-04-11 10:49:32 -07:00
hniksic
a9ff5853a9 [svn] when -c used, mark already fully retrieved file as successfully retrieved.
Submitted by Ian Abbott in <3C6019F4.30803.FF43E9@localhost>.
2002-02-18 21:18:43 -08:00
hniksic
f2bb99d102 [svn] Wrap numeric IPv6 addresses in square brackets when sending out HTTP
`Host' header.
Published in <sxs7kq4vgzf.fsf@florida.arsdigita.de>.
2002-01-26 15:19:10 -08:00
hniksic
cafe798fec [svn] Invalidate socket if get_contents encountered an error.
Published in <sxsita54sqy.fsf@florida.arsdigita.de>.
2002-01-13 17:39:16 -08:00
hniksic
5b575eef31 [svn] Check for conn->ssl before using ssl_iwrite. 2001-12-13 08:46:56 -08:00
hniksic
dd84231c6a [svn] Minor fixes prompted by `lint'.
Published in <sxsadwt2nkg.fsf@florida.arsdigita.de>.
2001-12-08 17:24:41 -08:00
hniksic
6d93a95e37 [svn] Declare h_errno in host.c, but not elsewhere. 2001-12-03 09:22:06 -08:00
hniksic
569fd61c95 [svn] Use the full path when building the authorization line.
Published in <sxsitbqu9iw.fsf@florida.arsdigita.de>.
2001-12-01 09:39:07 -08:00
hniksic
2c37aef2d8 [svn] Don't forget to shutdown the SSL structure if the socket times out.
Submitted by T. Bharath in <3B3DEBC7.2537186A@responsenetworks.com>.
2001-11-30 00:57:03 -08:00
hniksic
b65661a879 [svn] Remove char/unsigned char warnings emitted by Sun cc. 2001-11-29 10:48:43 -08:00
hniksic
a3d3d452ab [svn] Make the MD5 references even more generic.
Use OpenSSL's MD5 where available.
Published in <sxsg06x4f41.fsf@florida.arsdigita.de>.
2001-11-29 10:17:54 -08:00
hniksic
6218fbed2b [svn] Accept the broken Content-Range format emitted by Sun's server.
Published in <sxsg06x7kld.fsf@florida.arsdigita.de>.
2001-11-29 06:03:33 -08:00
hniksic
278fb2412d [svn] Declare ERR in gethttp.
Submitted by Ian Abbott in <3C022295.15135.464B54@localhost>.
2001-11-26 04:51:25 -08:00
hniksic
84396de673 [svn] Allocate a timer directly in get_contents.
Published in <sxsherhbsvl.fsf@florida.arsdigita.de>.
2001-11-26 04:49:10 -08:00
hniksic
024cb5ed3a [svn] A lot of host name changes.
Published in <sxs3d32856s.fsf@florida.arsdigita.de>.
2001-11-25 21:36:33 -08:00
hniksic
3afb9c659a [svn] Recursion and progress bar tweaks.
Published in <sxsd727cvc0.fsf@florida.arsdigita.de>.
2001-11-25 13:03:30 -08:00
hniksic
95631700f7 [svn] Remove host canonicalization code.
Published in <sxsg072ai5v.fsf@florida.arsdigita.de>.
2001-11-25 09:13:20 -08:00
hniksic
05463c7121 [svn] Commit progress bar tweaks.
Published in <sxsd727cvc0.fsf@florida.arsdigita.de>.
2001-11-24 20:46:26 -08:00
hniksic
222e9465b7 [svn] Implemented breadth-first retrieval.
Published in <sxsherjczw2.fsf@florida.arsdigita.de>.
2001-11-24 19:10:34 -08:00
hniksic
d5be8ecca4 [svn] Rewrite parsing and handling of URLs.
Published in <sxs4rnnlklo.fsf@florida.arsdigita.de>.
2001-11-21 16:24:28 -08:00
hniksic
f178e6c613 [svn] Clean up handling of schemes.
Published in <sxswv0n7h7s.fsf@florida.arsdigita.de>.
2001-11-18 16:12:05 -08:00
hniksic
d408dec0bd [svn] Use Solaris's libmd5 when available.
Published in <sxsn11kbssm.fsf@florida.arsdigita.de>.
2001-11-17 20:36:21 -08:00
hniksic
6ef5baa07b [svn] Prettier printing of HTTP headers.
Published in <sxs4rnsdcw1.fsf@florida.arsdigita.de>.
2001-11-17 18:36:30 -08:00
hniksic
ac74e16638 [svn] Applied Christian Fraenkel's patch from <3BAF5B30.189077D6@gmx.net>.
Print SSL errors when connecting fails.
2001-11-16 09:06:25 -08:00
hniksic
c77d880776 [svn] Search netrc with the proper host name, not the proxy one. 2001-06-14 13:55:02 -07:00
hniksic
0b056d1720 [svn] Update copyright notices. 2001-05-27 12:35:15 -07:00
hniksic
36eba40905 [svn] Make sure cookie code works with the real URL data, not the proxy one.
Published in <sxsg0e8z3bp.fsf@florida.arsdigita.de>.
2001-05-14 02:32:11 -07:00
hniksic
9588e1af80 [svn] Before concluding that the file is already fully retrieved, make sure
that the file existed and `Range' was actually requested.

Published in <sxseltwf4ks.fsf@florida.arsdigita.de>.
2001-05-11 05:37:37 -07:00
hniksic
105627124e [svn] Make sure hstat.no_truncate gets properly initialized.
Published in <sxspudk6pdl.fsf@florida.arsdigita.de>.
2001-05-08 04:47:05 -07:00
hniksic
50980de841 [svn] Avoid useless file_exists_p. Published in
<sxsr8y17zav.fsf@florida.arsdigita.de>.
2001-05-07 12:08:29 -07:00
hniksic
b44f1701b0 [svn] Use alloca to allocate filename_plus_orig_suffix.
Published in <sxsu239htnl.fsf@florida.arsdigita.de>.
2001-04-28 09:36:46 -07:00
hniksic
d70101ea4e [svn] Commit various HTTP fixes.
Published in <sxsy9slhu7g.fsf@florida.arsdigita.de>.

* http.c (gethttp): Return RETRUNNEEDED when the retrieval is
unneeded because the file is already there and fully downloaded,
and -c is specified.
(http_loop): Handle RETRUNNEEDED.

* wget.h (uerr_t): New value RETRUNNEEDED.

* http.c (http_loop): Set no_truncate for files that both exist
and are non-empty.
(gethttp): Consider the download finished when restval >= contlen,
not only when restval==contlen.
(gethttp): Handle redirection before giving up due to -c.
(gethttp): Clarify error message which explains that -c will not
truncate the file.
(gethttp): When returning CONTNOTSUPPORTED, don't forget to free
the stuff that needs freeing and release the socket.

* main.c (print_help): Wget booleans accept "off", not "no".
2001-04-28 09:22:20 -07:00
hniksic
c6e565fd33 [svn] Send the no-cache directive when required regardless of whether we're
going through a proxy.
Published in <sxsitjqncbx.fsf@florida.arsdigita.de>.
2001-04-26 22:26:44 -07:00
hniksic
26ddb28a7c [svn] Improve documentation of mktime_from_utc.
Rearrange http_atotm.
Published in <sxsoftjlyku.fsf@florida.arsdigita.de>.
2001-04-26 22:11:38 -07:00
hniksic
f0eb1fb758 [svn] Fix loading of cookies.
Published in <sxslmopyao6.fsf@florida.arsdigita.de>.
2001-04-24 19:29:54 -07:00
hniksic
9ae0328c3d [svn] Applied Roger Beeman's mktime_from_utc fix published in
<Pine.HPX.4.02.10104181128180.6232-100000@mail1.cisco.com>.
Also, minor doc fixes.
2001-04-24 17:50:22 -07:00
hniksic
45eea7387f [svn] New timer functions. Published in <sxs8zkp28vk.fsf@florida.arsdigita.de>. 2001-04-24 16:09:45 -07:00
hniksic
61bb00adc0 [svn] Various url.c-related changes.
Published in <sxsvgo8nmub.fsf@florida.arsdigita.de>.

* retr.c (retrieve_url): Call uri_merge, not url_concat.
* html-url.c (collect_tags_mapper): Call uri_merge, not
url_concat.
* url.c (mkstruct): Use encode_string instead of xstrdup followed
by URL_CLEANSE.
(path_simplify_with_kludge): Deleted.
(contains_unsafe): Deleted.
(construct): Renamed to uri_merge_1.
(url_concat): Renamed to uri_merge.
* url.c (str_url): Use encode_string instead of the unnecessary
CLEANDUP.
(encode_string_maybe): New function, returns input string if no
encoding is needed.
(encode_string): Call encode_string_maybe to do the dirty work,
xstrdup if no work needed.
* wget.h (XDIGIT_TO_xchar): Define here.
* url.c (decode_string): Use new name.
(encode_string): Ditto.
* http.c (XDIGIT_TO_xchar): Rename HEXD2asc to XDIGIT_TO_xchar.
(dump_hash): Use new name.
* wget.h: Rename ASC2HEXD and HEXD2ASC to XCHAR_TO_XDIGIT and
XDIGIT_TO_XCHAR respectively.
2001-04-13 21:11:35 -07:00
hniksic
5fa53b5a1d [svn] Implement better sorting and matching of cookies.
Fix previously broken command-line options.
Published in <sxspuek9255.fsf@florida.arsdigita.de>.
2001-04-10 09:04:18 -07:00
hniksic
579d051d57 [svn] Rewrite SSL #ifdef for better indentation. 2001-04-09 07:58:55 -07:00
hniksic
2cfb2d2ef6 [svn] Added support for cookies. 2001-04-08 15:25:24 -07:00
hniksic
31ea5aae27 [svn] Prepend literal newline with `\n\' inside quoted string. 2001-04-05 20:06:00 -07:00
hniksic
1d51748034 [svn] Fix support for rfc850 time recognition on systems where strptime
format specs %a and %A are not the same.
Published in <49022.983849922@ideon.st.ryukoku.ac.jp>.
2001-04-03 11:54:32 -07:00
hniksic
f1d534cd8c [svn] Make -c' and -O' work together.
Published in <sxsitkmgokh.fsf@florida.arsdigita.de>.
2001-04-03 05:24:49 -07:00
hniksic
66a0c39e22 [svn] Make sure opt.dfp is rewound only on the first retrieval.
(See the code comment for a more detailed explanation.)
Published in <sxsy9tkqizz.fsf@florida.arsdigita.de>.
2001-04-01 16:50:04 -07:00
hniksic
a52aaeb451 [svn] Make sure -c doesn't truncate the file.
Published in <sxsofuhi4kc.fsf@florida.arsdigita.de>.
2001-04-01 13:04:21 -07:00
hniksic
8f048b7be8 [svn] Committed my patch that makes HTTP code close its socket in premature
returns (before the body was drained).  Published in
<sxsd7ayn0kt.fsf@florida.arsdigita.de>.
2001-03-30 18:20:16 -08:00
hniksic
1a6058b1ec [svn] Applied Philipp Thomas's safe-ctype patch. Published in
<20010330025159.U21662@jeffreys.suse.de>.
2001-03-30 14:36:59 -08:00
janp
5014d32c3a [svn] Skip `:port' in the host header if it is the DEFAULT_HTTPS_PORT when
using SSL. Patch submitted by Hack Kampbjorn <hack@hackdata.com>.
2001-03-08 15:11:03 -08:00
hniksic
366b832e3f [svn] Applied Jonas Jensen's download rate patch with my additions.
Published in <015b01c09084$ce2d9330$0100000a@bob> and
<sxspugq3xai.fsf@florida.arsdigita.de>.
2001-02-10 16:00:30 -08:00
hniksic
07f60f19a4 [svn] Applied Christian Fraenkel's patch "custom certificate patch for wget-1.7+dev;
2nd try", published in <200102082132220160.00474E73@pop.gmx.net>.
It adds two options for custom certificates.
2001-02-10 14:33:31 -08:00
dan
e979053779 [svn] 2000-12-31 Dan Harkless <wget@harkless.org>
* ftp.c, http.c:  Applied Hack Kampbj?rn <hack@hackdata.com>'s
        patch to deal with h_errno not being defined in netdb.h under Cygwin.

2000-12-30  Dan Harkless  <wget@harkless.org>

        * version.c: Released Wget version 1.6.  Note that on this branch we
        never actually had the version set to 1.6, but we still need the
        ChangeLog comment for posterity.
2000-12-31 04:04:14 -08:00
hniksic
23cbd15095 [svn] Igor Khristophorov's fix for check_end(). From
<sxs4s027snq.fsf@florida.arsdigita.de>.
2000-12-17 11:31:30 -08:00
hniksic
5099ec0306 [svn] Apply lint-expired fixes from <sxsn1du7ufa.fsf@florida.arsdigita.de>. 2000-12-17 10:52:52 -08:00
hniksic
2e8fc46b7b [svn] Include <netdb.h> where h_errno is used. Likewise for <errno.h> and errno.
From <sxsvgsi7wcw.fsf@florida.arsdigita.de>.
2000-12-17 10:12:02 -08:00
hniksic
d5cd691b12 [svn] Fix -O timestamp bug.
From <sxs7l57u6o6.fsf@florida.arsdigita.de>.
2000-12-10 16:47:44 -08:00
hniksic
62b876401e [svn] Set the timestamp even when -O is used. 2000-12-10 16:31:14 -08:00
hniksic
afe131624b [svn] Add , before `int ssl'. 2000-12-06 09:22:27 -08:00
hniksic
cab759659e [svn] Move inclusion of gen_ssl.h below Wget's headers. 2000-12-06 09:18:14 -08:00
hniksic
b0e9dfd4e2 [svn] Fix opt.wait. 2000-12-05 16:24:40 -08:00
hniksic
e754c99b46 [svn] Cosmetic cleanup of SSL stuff. 2000-12-05 15:35:56 -08:00
hniksic
7828e81c79 [svn] Committed C. Frankel's SSL patch. 2000-12-05 15:09:41 -08:00
hniksic
2ffb47eabf [svn] Committed <sxsbsv854j9.fsf@florida.arsdigita.de>. 2000-11-22 08:58:28 -08:00
hniksic
6e598c81e3 [svn] Committed a bunch of different tweaks of mine.
Published in <sxsr9463wrx.fsf@florida.arsdigita.de>.
2000-11-20 18:06:36 -08:00
hniksic
fb42069e51 [svn] Constify check_end(). 2000-11-20 02:25:28 -08:00
hniksic
7302e69dc2 [svn] Improved comments for the persistent connections feature. 2000-11-20 02:20:39 -08:00
hniksic
6f7fd37186 [svn] Auth tweaks.
Published in <sxs3dgnz955.fsf@florida.arsdigita.de>.
2000-11-19 18:10:54 -08:00
hniksic
f2f77d87fd [svn] New option --no-http-keep-alive.
Published in <sxsd7fr1pdf.fsf@florida.arsdigita.de>.
2000-11-19 16:04:06 -08:00
hniksic
b27144fcce [svn] My patch "persistent connection tweaks".
Published in <sxshf531qhj.fsf@florida.arsdigita.de>.

(Applied with the addition of correct calculation for the
length of the request.)
2000-11-19 15:42:13 -08:00
hniksic
b0b1c815c1 [svn] A bunch of new features:
- use mmap() to read whole files in core instead of allocating memory
  and read'ing it.

- use a new, more general, HTML parser (html-parse.c) and interface to
  it from Wget (html-url.c).

- respect <meta name=robots content=nofollow> (easy with the new HTML
  parser).

- use hash tables instead of linked lists in places where the lists
  were used to facilitate mappings.

- rewrite the code in host.c to be more readable and faster (hash
  tables instead of home-grown lists.)

- make convert_links properly convert partial URLs to complete ones
  for those URLs that have *not* been downloaded.

- use HTTP persistent connections where available.  very
  simple-minded, caches the last connection to the server.

Published in <sxshf533d5r.fsf@florida.arsdigita.de>.
2000-11-19 12:50:10 -08:00
hniksic
0e2b74ce3b [svn] Commit "minor fixes". 2000-11-06 13:24:57 -08:00
hniksic
eef4a668b7 [svn] Update copyright blurbs with the year 2000. 2000-11-01 17:50:03 -08:00
hniksic
c6575c6382 [svn] Another contributed fix... 2000-11-01 17:06:57 -08:00
hniksic
b7a8c6d3f5 [svn] Gracefully handle opt.downloaded overflowing.
Published in <sxsd7gfnv17.fsf@florida.arsdigita.de>.
2000-11-01 15:17:31 -08:00
hniksic
0dd418242a [svn] Committed my patches from <sxsbsw16sbu.fsf@florida.arsdigita.de>
and <sxsvgu824xk.fsf@florida.arsdigita.de>.
2000-10-31 11:25:32 -08:00
dan
b3e2c0ff97 [svn] Implemented and documented new -E / --html-extension / html_extension option. 2000-10-19 22:55:46 -07:00
hniksic
ee6065f581 [svn] Committed my patch from <dpd7mj3sap.fsf@mraz.iskon.hr>. 2000-05-19 00:37:22 -07:00
hniksic
6b4a85888e [svn] Commit several fixes. 2000-04-12 06:23:35 -07:00
hniksic
bc7060a81d [svn] More old fixes. 2000-03-31 06:14:58 -08:00