* 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
* tests/Makefile.am: Set SRCDIR to $(abs_srcdir)
* tests/libtest.c: Remove '../' in front of SRCDIR
* tests/test-i-https.c: Likewise
Reported-by: Akash Rawal
* tests/Makefile.am: For libtests.la, define VGSUPPFILE to absolute path to
tests/valgrind-suppressions
* tests/libtest.c: Use VGSUPPFILE macro instead of hardcoded path to
valgrind-suppressions
* libwget/http.c (wget_http_get_response_cb): Save data when chunk
complete in one data packet.
* tests/Makefile.am: Add new test 'test-chunked'
* tests/test-chunked.c: New test
* src/wget.c: New helper function _normalize_uri()
(sitemap_parse_text): Check size before allocating stack space
* tests/Makefile.am: Add test-iri-subdir
* tests/test-iri-subdir.c: Add new test
* include/libwget.h.in: Add function wget_list_getnext().
* libwget/list.c: Add function wget_list_getnext().
* libwget/robots.c: Fix memory leak.
* src/host.c (host_remove_job): Cleanup queue after downloading and
scanning robots.txt.
* src/job.h (struct JOB): Add flag 'requested_by_user'.
* src/wget.c (add_url_to_queue): Set 'requested_by_user',
(add_url): Fix checking for disallowed paths.
* tests/Makefile.am: Add test 'test-robots'.
* tests/test-robots.c: New test to prove robots functionality.
Special handling for automatic robots.txt jobs
==============================================
What can happen with --recursive and --span-hosts is that a document from hostA
has links to hostB. All these links might go into the hostB queue before robots.txt
is downloaded and parsed. To avoid downloading of 'disallowed' documents, the queue
for hostB has to be cleaned up right after downloading and parsing robots.txt.
Any links links that have been explicitly requested by the user are still downloaded.
* tests/Makefile.am: Add $(EXEEXT) to executable names
* tests/libtest.c: Add EXEEXT to wget2 executable,
add support for EMULATOR env variable - e.g. to test with wine
* tests/Makefile.am: Add test-metalink
* tests/test-metalink.c: New file
This new tests are
- --no-follow-metalink
- metalink v3, without pieces
- metalink v4, without pieces
- metalink v4, with pieces
* include/libwget.h.in: Add sort_age to struct wget_cookie_st
* libwget/cookie.c: Many code enhancements
* libwget/http.c (wget_http_parse_setcookie): Relax parsing,
(wget_http_parse_setcookie): Allow \n and \r\n as EOL
* libwget/private.h: Add missing #includes
* tests/Makefile.am: Add disabled test-cookies-http_state
* tests/test-cookies-http_state.c: New cookie test
There still 30 out of 220 tests failing, before this commit we had
135 failing. The left over tests are mainly corner cases, but feel free
to work on it. When all tests pass, we enable test-cookies-http_state
in Makefile.am.
Removed wget_buffer_vprintf_append, wget_buffer_printf_append,
wget_buffer_vprintf2 and wget_buffer_printf2.
Renamed their *2 counterpart to their old names.
* tests/Makefile.am: Remove test-ftp and test-ftps
These test were introduced as helpers for FTPS integration for
Wget1.x (GSOC 2015 project). We disable them until Wget2 supports
FTP/FTPS.
* libwget/Makefile.am: Add lib/ to AM_CPPFLAGS, add libgnu.a to *_LDADD
* src/Makefile.am: Same
* tests/Makefile.am: Same, rename object files to link with tests