Commit Graph

220 Commits

Author SHA1 Message Date
2c0b284f8e Add error code WGET_E_TLS_DISABLED
* include/libwget.h.in: New define for WGET_E_TLS_DISABLED
2016-01-18 09:46:01 +01:00
f7ba3e5431 Use doxygen instead of gtk-doc
* Removed all gtk-doc files and references.
* Added doxygen files and rules
2016-01-17 20:29:58 +01:00
7250e6ccb9 Add symbol visibility control to libwget
* autogen.sh: Add gnulib module lib-symbol-visibility,
  add --libtool to gnulib-tool invokation
* examples/Makefile.am: Remove -static from AM_LDFLAGS,
  remove ../lib/libgnu.a from LDADD
* include/libwget.h.in: Define LIBWGET_EXPORT,
  add LIBWGET_EXPORT to all visible symbols
* libwget/Makefile.am: Remove AM_CPPFLAGS and LDADD,
  add libwget_la_CPPFLAGS and libwget_la_LIBADD,
  add test_linking_CPPFLAGS, fix test_linking_LDADD
* libwget/iri.c: Add LIBWGET_EXPORT to wget_iri_schemes and iri_ports
* src/Makefile.am: Remove wget2_LDFLAGS, fix wget2_LDADD
* tests/Makefile.am: Fix LDADD, fix test_LDADD, fix test_parse_html_LDADD,
  fix libtest_la_CPPFLAGS and libtest_la_LIBADD
* tests/libtest.h: Add LIBWGET_EXPORT to symbols
2016-01-15 11:21:35 +01:00
0ecbd6e69a Removed redundant buffer print routines
Removed wget_buffer_vprintf_append, wget_buffer_printf_append,
wget_buffer_vprintf2 and wget_buffer_printf2.
Renamed their *2 counterpart to their old names.
2016-01-13 15:01:43 +01:00
31f0fc0190 Added printf-style functions
* libwget/printf.c: New file
* docs/libwget/Makefile.am: Add libwget-printf.3
* docs/libwget/libwget-docs.sgml: Add printf section
* docs/libwget/libwget-sections.txt: Add SECTION libwget-printf
* include/libwget.h.in: Add function prototypes
* libwget/Makefile.am: Add printf.c
* libwget/base64.c, libwget/http.c, libwget/iri.c, libwget/logger.c,
  libwget/md5.c, libwget/vector.c, src/options.c:
  Use new functions instead of asprintf/vasprintf
2016-01-13 13:33:51 +01:00
e8fafdeb9f Add header file gnulib modules
* autogen.sh: Add gettext-h, inttypes, stdarg, stddef, stdint
* configure.ac: Remove check for inttypes.h, libintl.h, stddef.h
  Remove AC_TYPE_* checks
* include/libwget.h.in: Include gnulib gettext.h
* examples/Makefile.am: Fix AM_CPPFLAGS, add $(LIBINTL) to LDADD
* libwget/Makefile.am: Fix LDADD and test_linking_LDADD
* src/Makefile.am: Add $(LIBINTL) to wget2_LDADD
* tests/Makefile.am: Fix AM_CPPFLAGS and libtest_la_CPPFLAGS,
  add $(LIBINTL) to LDADD, test_LDADD and test_parse_html_LDADD
2016-01-12 10:18:09 +01:00
a2e486f2b6 Remove libwget/printf.c
* configure.ac: Remove check for dprintf
* include/libwget.h.in: Remove dprintf/vdprintf prototypes
* libwget/Makefile.am: Remove printf.c from file list
* libwget/printf.c: Remove file
2016-01-11 13:30:56 +01:00
54eaae1381 Use strndup gnulib fallback
* autogen.sh: Add strndup to gnulib modules
* configure.ac: Remove searching for strndup()
* include/libwget.h.in: Remove conditional code
2016-01-11 12:07:31 +01:00
332176577a Auto-generate version defines for library header file
* include/libwget.h: Removed
* include/libwget.h.in: Added
2016-01-06 16:27:33 +01:00
954136e2df Do not percent unescape query
* 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()
2016-01-06 11:27:07 +01:00
ed5835f446 Cleanup cookie code
Cookies: Add new function wget_cookie_set_keep_session_cookies()
         and adjust wget_cookie_db_load() and wget_cookie_db_save().
         Use wget_update_file() for loading and saving.
2015-11-23 16:43:27 +01:00
bbcb319ac3 Add new options --netrc and --netrc-file
* libwget/netrc.c: New file for netrc API functions
* include/libwget.h: Add netrc function prototypes
* libwget/Makefile.am: Add netrc.c
* libwget/test_linking.c (main): Add call to wget_netrc_deinit()
* src/options.c: Add --netrc and --netrc-file
* src/options.h: Add config.netrc and config.netrc_file
* src/wget.c (http_get): Get login/password from netrc data
* tests/test-auth-basic.c (main): Add test for --netrc-file
2015-11-11 20:58:45 +01:00
d85c4b3fe2 Add new function wget_update_file()
* include/libwget.h: Add wget_update_file()
* libwget/io.c: Add wget_update_file()

Add a function to care about locking, temp files, opening
overhead for our typical updating file database procedure.
Useful for HSTS, OCSP and Cookie file databases.
2015-11-09 11:08:43 +01:00
87de5bd4cb Fixed HSTS policy application
* include/libwget.h (wget_iri_set_scheme): new function.
 * libwget/hsts.c (wget_hsts_host_match): HTTP default port -> HTTPS
   default port
 * libwget/iri.c (wget_iri_set_scheme): new function.
 * src/wget.c (http_get): when changing the scheme, change the port
   number as well (call wget_iri_set_scheme).
2015-11-03 19:20:54 +01:00
36a47cc558 Add function wget_global_get_func()
* include/libwget.h: Add wget_global_get_func() prototype
* libwget/init.c: Add function wget_global_get_func()
2015-10-30 17:39:57 +01:00
7cbd3d5e67 set_http_proxy and set_https_proxy can return an error
* libwget/http.h (wget_http_set_http_proxy): change the return type to int.
(wget_http_set_https_proxy): change the return type to int
* libwget/http.c (wget_http_set_http_proxy): return an error if cannot set the proxies.
(wget_http_set_https_proxy): return an error if cannot set the proxies.
2015-10-23 20:21:33 +02:00
f63767b028 Documented hashing functions 2015-10-23 15:49:15 +02:00
10003c829f Initial docs for hashing utils 2015-10-23 15:48:39 +02:00
e1990c6415 On CTRL-C save downloaded data before exit
* include/libwget.h: New declaration wget_http_abort_connection()
* libwget/http.c: New function wget_http_abort_connection()
* src/wget.c: Call wget_http_abort_connection() on CTRL-C
2015-10-19 21:13:28 +02:00
0f8e49128a Transfer copyright to Free Software Foundation, Inc. 2015-09-22 11:50:06 +02:00
c6b0e461a1 Transform Mget into Wget 2015-09-19 22:54:38 +02:00
c726913a8f More HTTP/2 related code, new option --(no-)http2 2015-09-18 17:04:16 +02:00
db7da4aff0 HTTP/2 download is working 2015-09-11 17:08:19 +02:00
b71abda2b0 Rearrange HTTP header API 2015-09-07 12:26:21 +02:00
591ec4fe65 Request HTTP/1.1 and HTTP/2.0 via ALPN 2015-09-07 10:51:57 +02:00
eacdc709c4 Fix Content-Disposition filename retrieval 2015-08-31 15:03:47 +02:00
cffe303d6e Include sys/types.h in libmget.h 2015-08-28 12:08:01 +02:00
52e10c8886 Unify mget_ssl_server_open and mget_ssl_open 2015-07-12 21:24:55 +02:00
2d35ac3ff0 Add mget_tcp_tls_start() and mget_tcp_tls_stop() 2015-07-12 20:57:52 +02:00
2e8f0b6441 Allow NULL for mget_http_parse_setcookie()i cookie param 2015-07-06 11:40:44 +02:00
1d45d9a704 changes in hashmap handling 2015-03-08 21:44:01 +01:00
6cdd208444 fix several issues found by Coverity 2015-03-07 22:55:17 +01:00
24030f6b01 comment unused mget_bsprintf functions 2015-03-03 21:49:11 +01:00
8a1334d335 fix possible buffer overflow 2015-03-03 21:31:11 +01:00
42bc281945 fixed Mget return value for HTTPS failures 2015-02-24 10:52:22 +01:00
d028fac571 added ALPN for TLS sessions 2015-02-20 17:11:34 +01:00
82149e5a43 fix compiler warnings 2015-02-05 16:32:38 +01:00
2b0ad106be include libintl.h before redefinition of gettext functions 2015-02-05 16:23:04 +01:00
3207affc70 added full cert chain OCSP check 2015-01-29 17:14:20 +01:00
1083b1a434 added --tcp-fastopen to enable/disable TCP Fast Open 2015-01-13 16:48:40 +01:00
7ba53339eb added OCSP response caching 2015-01-08 17:11:30 +01:00
49e602ebf7 new options --ocsp and --ocsp-stapling 2014-12-18 17:03:45 +01:00
cca63cc7b5 Check for gnutls/ocsp.h to compile on older systems 2014-12-15 21:21:35 +01:00
97f2284914 Add wildcard support for -D/--domains and --exclude-domains 2014-12-09 16:26:43 +01:00
d67946f113 added --crl-file for CRL certificates 2014-10-24 23:14:33 +02:00
f7ab61242d moved basic progress bar routines to libmget 2014-10-18 14:26:31 +02:00
675831afa3 use ASCII-only string case comparison 2014-09-23 17:11:01 +02:00
ae4b7e2f43 added --post-data and --post-file 2014-09-22 16:29:40 +02:00
a85b163ee9 added --follow-tags and --ignore-tags 2014-09-09 13:18:32 +02:00
b75d3fd964 fixed clang detections 2014-09-05 17:15:23 +02:00