* 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
* libwget/hpkp.c (wget_hpkp_db_check_pubkey): Fix subdomain default,
(wget_hpkp_db_add): Remove entry on zero PINs
* src/wget.c: Remove comment line
* tests/test.c (test_hpkp): Test this feature
* configure.ac: Suppress -Wunsuffixed-float-constants for gcc,
add -Wno-disabled-macro-expansion to clang flags
* examples/getstream.c: Removed 'unused' attributes from argc and argv.
* include/wget/wget.h: Fix slot to int for bar functions.
* libwget/bar.c: Fix slot to int for bar functions, cast to int,
change type of bitfield 'redraw' to unsigned.
* libwget/hsts.c (wget_hsts_new): Fix int to bitfield conversion.
* libwget/http.c: Cast printf %p format to (void *).
* src/wget.c: Cast printf %p format to (void *),
remove ACTION_DONE from enum actions.
* src/wget_host.h: Fix double declaration of host_remove_job()
* tests/libtest.c (wget_test_check_filesystem): Fix type of 'rc'.
* tests/test-idn-robots.c: Fix comma to semikolon at end of line.
* tests/test.c (test_strcasecmp_ascii): Fix type of loop variable.
* include/wget/wget.h: Declare new function wget_determine_screen_width.
Also change prototype of wget_bar_init to not accept a max_width
parameter
* src/utils.c: Move function determine_screen_width from here ...
* libwget/utils.c: ... to here.
* src/utils.{c,h}: Delete empty file
* src/Makefile.am: Remove source files utils.{c,h}
* src/bar.c: Move detection of screen width from here ...
* libwget/bar.c: ... to here
* tests/test.c: wget_bar_init() no longer takes a max_width parameter
* libwget/iri.c (wget_iri_unescape_inline): Do not touch '+'.
(wget_iri_parse): Replace '+' by ' ' in query part.
* tests/test.c (test_iri_parse): Add more tests
* libwget/cookie.c (_wget_cookie_normalize_cookie): Add checks
for __Secure- and __Host- prefixes.
* tests/test.c (test_cookies): Add test cases for the prefixes.
This change implements proposals from draft-ietf-httpbis-cookie-prefixes-00
as modern browsers do.
* examples/print_html_urls.c (html_parse_localfile):
Detect BOM (Byte Order Mark), convert UTF-16 to UTF-8 before parsing.
* include/libwget.h.in: Remove wget_charset_transcode(),
add wget_memiconv() and wget_striconv().
* libwget/encoding.c: Implement wget_memiconv() and wget_striconv()
* src/wget.c (html_parse): Add 'html_len' param,
convert UTF-16 to UTF-8 before parsing.
* tests/test.c: New test for wget_memiconv().
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/test.c (check_cookie): Do not print responses. We want
this test to expose memory leaks, but printing the response of
wget_cookie_create_request_header isn't needed.
* libwget/ssl_gnutls.c: Do not skip automatic library initialization
* libwget/md5.c (wget_md5_printf_hex): Print message on error
* tests/test.c: New tests for hashing functionality
GnuTLS automatically initializes on application startup.
This wastes CPU cycles when not using HTTPS.
Switched off, simple functionality like MD5 fail (needed for metalink and
authorization). We have to implement hashing via -lcrypt or -lgcrypt
later - and than we could use GNUTLS_SKIP_GLOBAL_INIT again.
* tests/test.c: Test query parsing in API
* tests/test-base.c: Test query handling of wget2
* include/libwget.h: Add flags to wget_iri_t,
add function wget_iri_unescape_inline()
* libwget/iri.c: Add function wget_iri_unescape_inline(),
fix wget_iri_parse() to not percent unescape query
do not add fragment in wget_iri_get_escaped_resource()
* src/wget.c (main): Exit immediately on an "init()" error.
* src/options.c (init): Raise an error if cannot set http_proxy or https_proxy.
* tests/test-parse-html.c (main): Check for "init" errors.
* tests/test.c (main): Check for "init" errors.