4f557e8121
Mew test test-redirection-loop
...
* tests/Makefile.am: Add test-redirection-loop to tests
* tests/libtest.c (_http_server_thread): Check scope of requested URL,
skip check for expected files when not specified
* tests/libtest.h: Add wget_test_url_t.scope,
define WGET_TEST_URL_SCOPE_HTTP and WGET_TEST_URL_SCOPE_HTTPS
* tests/test-redirection-loop.c: New test file
2017-05-16 21:31:32 +02:00
c7882ca0c0
* libwget/Makefile.am: Use convenience library to avoid unused macro warnings
2017-05-15 12:06:30 +02:00
8f3a0f4206
* .gitlab-ci.yml: Remove explicit 'make syntax-check'
2017-05-15 10:53:31 +02:00
e2a9f06ad1
* Makefile.am: Add 'make syntax-check' to 'make check'
2017-05-15 10:47:41 +02:00
6246345ef7
Remove nonnull attribute from some functions
...
* include/wget/wget.h: Remove nonnull attribute from some functions
* libwget/encoding.c: Add explicit checks for NULL
* libwget/io.c: Likewise
* libwget/pipe.c: Likewise
* libwget/strlcpy.c: Likewise
* libwget/utils.c: Likewise
2017-05-15 10:28:03 +02:00
4d07c88815
* README: Fixed typo "Accept-Encdoing" -> "Accept-Encoding"
2017-05-12 12:47:47 +02:00
750d34e213
Remove redundant VGSUPPFILE macro
...
* tests/Makefile.am: Remove VGSUPPFILE macro from libtest.la
* tests/libtest.c: Replace VGSUPPFILE with an expression using SRCDIR
2017-05-12 00:21:01 +05:30
f8fb7ada2f
Moved help strings into options structure
...
* src/options.c: New enum help_section_t,
new functions print_first() and print_next(),
moved all help strings to struct options.
Print help strings such that it fits in 80 columns
2017-05-11 10:05:50 +02:00
a813066d94
* src/options.c (set_long_option): Remove redundant bsearch call
2017-05-03 20:55:43 +02:00
3ff2da8b6f
* libwget/http.c: Reorder switch cases in ascending order
2017-05-03 20:48:51 +02:00
5523ae7ab9
* libwget/http.c: Implement Wayback Machine's X-Archive-Orig-last-modified HTTP header
2017-05-03 20:48:35 +02:00
e0b3dc1d26
Make wget_http_connection_t an abstract type
...
* include/wget/wget.h: Convert wget_http_connection_t to forward declaration
* libwget/http.h: Move wget_http_connection_t definition here
* libwget/Makefile.am: Add new file http.h
* libwget/http.c: Include http.h and add accessor functions
* libwget/http_highlevel.c: Include http.h
* src/wget.c: Replace access to wget_http_connection_t with accessor function calls
2017-05-03 15:37:50 +02:00
39d9f34cb8
* libwget/xalloc.c: Satisfy syntax-check
2017-05-03 14:57:59 +02:00
4099757fbc
* examples/getstream.c (header_callback): Use wget_malloc() instead of malloc()
2017-05-03 14:53:37 +02:00
7c1bebf9a0
Add new function wget_free()
...
* examples/check_url_types.c: Use wget_xfree() instead of free()
* examples/http_get2.c: Likewise
* examples/print_css_urls2.c: Likewise
* examples/print_html_urls.c: Likewise
* include/wget/wget.h: Add wget_free() and define wget_xfree()
* libwget/xalloc.c: Implement wget_free()
* include/wget/wget.h: Add declaration for wget_free()
* libwget/xalloc.c: Implement wget_free()
2017-05-03 14:47:04 +02:00
e7b932b530
* .gitlab-ci.yml: Enable syntax-check
2017-05-03 12:17:11 +02:00
a4cf4ce229
* src/options.c: Remove trailing whitespace
2017-05-03 12:09:56 +02:00
1b3a28f740
* tests/libtest.c: Use --no-proxy for wget2 invocation in test-suite
2017-05-03 11:56:20 +02:00
c420f455e6
Implement --proxy switch to import env proxy vars
...
* src/wget_options.h: Add `--proxy` option
* src/options.c(init): Import env proxy var by default and only if no
corresponding proxy variable is specified on command-line
2017-05-03 11:56:06 +02:00
7b2baa77ff
* src/options.c: Implement optional arguments and separate handling for --no-<option>
2017-05-03 12:52:49 +05:30
5b4b8bbe9b
*libwget/strlcpy.c: Fix wget_strlcpy on OSX / BSD
2017-05-02 11:56:23 +02:00
8a93319b47
Rename strlcpy to wget_strlcpy
...
* include/wget/wget.h: Rename and remove gnulib deps.
* libwget/strlcpy.c: Rename function and fall back to strlcpy.
* */*.c: Rename strlcpy to wget_strlcpy.
2017-05-02 11:36:51 +02:00
5687254219
Amend --http-proxy and --https-proxy behavior
...
* libwget/http.c (_parse_proxies): Alloc vector on demand
* src/options.c (wget_http_set_http_proxy): Return # of proxies
successfully parsed,
(wget_http_set_https_proxy). Likewise.
* src/options.c (init): Empty and undefined proxy variable is the same.
* tests/test.c (test_set_proxy): Amend tests.
2017-05-02 10:53:03 +02:00
569a646876
Remove unnecessary while loop & add test
...
* libwget/http.c (_parse_proxies): Remove non-required `while`
* tests/test.c (test_set_proxy): Add test with leading whitespaces
2017-05-02 10:39:57 +02:00
88cc3ead0f
Add tests for wget_http_set_http(s)_proxy() functions
...
* tests/test.c (test_set_proxy): Add tests for wget_http_set_http_proxy()
* tests/test.c (test_set_proxy): Add tests for wget_http_set_https_proxy()
* libwget/http.c (wget_http_set_http_proxy): Return length of http_proxies if no parse error
* libwget/http.c (wget_http_set_https_proxy): Return length of https_proxies if no parse error
2017-05-02 10:36:11 +02:00
f9c1caa8bb
* src/wget.c: Remove WIN32 futimens() implementation
...
The newest gnulib brings WIN32 futimens().
2017-05-01 14:12:19 +02:00
11c52b0f0c
*gnulib: Update
2017-05-01 13:50:00 +02:00
c6ee3d79ad
Fix syntax-check 'sc_prohibit_have_config_h'
...
* cfg.mk: Remove sc_prohibit_have_config_h from local-checks-to-skip
* libwget/*.c: Include <config.h> unconditionally
* src/*.c: Likewise
* tests/*.c: Likewise
2017-04-30 22:01:34 +02:00
978036a931
Remove useless parens (syntax-check)
...
* include/wget/wget.h: Remove useless parens
* libwget/ssl_gnutls.c: Likewise
2017-04-30 21:41:25 +02:00
b3aede0e57
Remove gnulib dependencies from examples and wget.h
...
* cfg.mk: Add examples as excludes for config.h
* examples/Makefile.am: Remove -I to srcdir and builddir
* examples/*.c: Remove #include <config.h>
* include/wget/wget.h: Remove gettext include and defines
* libwget/private.h: Add gettext include and defines
* src/wget_main.h: Likewise
* tests/libtest.h: Likewise
* src/log.c: Add #include <string.h>
2017-04-30 21:37:39 +02:00
2acb041355
* cfg.mk: New file with rules for 'make syntax-check'
2017-04-29 21:00:04 +02:00
59f163cd7b
Remove useless cpp parens (syntax-check)
2017-04-29 20:56:57 +02:00
56efdab1a7
Remove trailing whitespaces (syntax-check)
2017-04-29 20:51:32 +02:00
bc06128232
Fix space-tab sequences (syntax-check)
2017-04-29 20:40:14 +02:00
735878a1c0
* libwget/net.c: Satisfy sc_require_config_h (syntax-check)
2017-04-29 20:34:43 +02:00
9d0b07b0e8
* bootstrap: Update to version 19
2017-04-29 20:32:42 +02:00
9397bba4fc
Remove == from scripts (syntax-check)
...
* .travis.sh: == -> =
* .travis_setup.sh: Likewise
* contrib/gen_option_diff.sh: Likewise
2017-04-29 20:28:36 +02:00
58f1274808
Do not include unused strings.h
...
* examples/getstream.c: Remove #include <strings.h>
* libwget/css.c: Likewise
* libwget/encoding.c: Likewise
* libwget/hashfile.c: Likewise
* libwget/metalink.c: Likewise
* libwget/net.c: Likewise
* libwget/robots.c: Likewise
* src/wget.c: Likewise
2017-04-29 20:24:19 +02:00
140189b228
* src/options.c: Use EXIT_SUCCESS (syntax-check)
2017-04-29 20:19:18 +02:00
8619e7f930
* src/wget.c: Remove double colons (syntax-check)
2017-04-29 20:07:32 +02:00
2b92113606
* po/POTFILES.in: Update (syntax-check)
2017-04-29 19:57:51 +02:00
c1dee14c72
Spell filesystem 'file system' (syntax-check)
...
* docs/wget2_manual.md: filesystem -> file system
* tests/libtest.c: Likewise
* tests/libtest.h: Likewise
* tests/test-wget-1.c: Likewise
2017-04-29 19:41:15 +02:00
4a798caf33
* libwget/net.c: Use O_NONBLOCK instead of O_NDELAY (syntax-check)
2017-04-29 19:30:11 +02:00
2fa004f50c
* configure.ac: Add --disable-doc / --enable-doc (default)
2017-04-29 18:32:30 +02:00
c4377ef786
* libwget/bar.c: Allocate all memory for progress display together
2017-04-27 18:50:01 +02:00
2d7fe3e9fc
Prevent tiny memory allocations when globbing
...
* libwget/utils.c: Rename wget_strnglob to wget_strglob. It now calls
glob on the entire string.
* include/wget/wget.h: Change protoype of wget_strnglob
* src/options.c: Change calls to wget_strnglob to use new wget_strglob
calls
2017-04-27 18:31:15 +02:00
5286663360
Improve the benchmark scripts slightly
2017-04-27 12:21:45 +02:00
d46ecad443
Add error handler for decompression
...
* include/wget/wget.h: New functions wget_decompress_set_error_handler()
and wget_decompress_get_context().
* libwget/decompressor.c: New functions wget_decompress_set_error_handler()
and wget_decompress_get_context().
* libwget/http.c: Implement and set decompressor error handler.
2017-04-26 12:21:25 +02:00
a086ba6a95
Added a more detailed logging for HTTP errors
...
* src/wget.c: More detailed logging for HTTP response code
2017-04-26 12:19:12 +02:00
5f609ead20
* src/options.c: Remove double 'help' option
2017-04-25 13:16:51 +02:00