Граф коммитов

699 Коммитов

Автор SHA1 Сообщение Дата
Daniel Stenberg 3b16575ae9
netware: remove support
There are no current users and no Netware related changes done in the
code for over 13 years is a clear sign this is abandoned.

Closes #8358
2022-01-31 13:40:26 +01:00
Daniel Stenberg 60080202bb
examples/multi-app.c: call curl_multi_remove_handle as well
Fixes #8234
Reported-by: Melroy van den Berg
Closes #8236
2022-01-07 09:25:57 +01:00
Daniel Stenberg d8f6e5dc8e
misc: update copyright year range 2021-12-30 14:17:47 +01:00
Daniel Stenberg e1b04106f8
examples/multi-single.c: remove WAITMS()
As it isn't used.

Reported-by: Melroy van den Berg
Fixes #8200
Closes #8201
2021-12-30 13:55:54 +01:00
Daniel Stenberg 21248e052d
checksrc: detect more kinds of NULL comparisons we avoid
Co-authored-by: Jay Satiro
Closes #8180
2021-12-27 23:39:26 +01:00
Daniel Stenberg 7a92f865b4
misc: s/e-mail/email
Consistency is king. Following the lead in everything curl.

Closes #8159
2021-12-19 23:48:13 +01:00
Marc Hoersken 77311f420a
docs/examples: workaround broken -Wno-pedantic-ms-format
Avoid CURL_FORMAT_CURL_OFF_T by using unsigned long instead.
Improve size_t to long conversion in imap-append.c example.

Ref: https://github.com/curl/curl/issues/6079
Ref: https://github.com/curl/curl/pull/6082
Assisted-by: Jay Satiro
Reviewed-by: Daniel Stenberg

Preparation of #7922
2021-12-14 07:52:26 +01:00
Daniel Stenberg e75bc3ae3f
example/progressfunc: remove code for old libcurls
7.61.0 is over three years old now, remove all #ifdefs for handling
ancient libcurl versions so that the example gets easier to read and
understand

Closes #8137
2021-12-13 15:56:32 +01:00
Viktor Szakats 8c0336cf5d
Makefile.m32: rename -winssl option to -schannel and tidy up
- accept `-schannel` as an alternative to `CFG` option `-winssl`
  (latter still accepted, but deprecated)
- rename internal variable `WINSSL` to `SCHANNEL`
- make the `CFG` option evaluation shorter, without repeating the option
  name

Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Closes #8053
2021-11-25 17:36:38 +00:00
Daniel Stenberg a28464ae77
docs: reduce/avoid English contractions
You're => You are
Hasn't => Has not
Doesn't => Does not
Don't => Do not
You'll => You will
etc

Closes #7930
2021-11-07 23:16:27 +01:00
Daniel Stenberg f907faec79
smooth-gtk-thread.c: enhance the mutex lock use
Reported-by: ryancaicse on github
Fixes #7926
Closes #7931
2021-11-01 08:42:40 +01:00
Viktor Szakats 13bbf81c59
Makefile.m32: fix to not require OpenSSL with -libssh2 or -rtmp options
Previously, -libssh2/-rtmp options assumed that OpenSSL is also enabled
(and then failed with an error when not finding expected OpenSSL headers),
but this isn't necessarly true, e.g. when building both libssh2 and curl
against Schannel. This patch makes sure to only enable the OpenSSL backend
with -libssh2/-rtmp, when there was no SSL option explicitly selected.

- Re-implement the logic as a single block of script.
- Also fix an indentation while there.

Assisted-by: Jay Satiro

Closes #7895
2021-10-25 19:10:55 +00:00
Daniel Stenberg b75045aa12
examples/htmltidy: correct wrong printf() use
... and update the includes to match how current htmltidy wants them
used.

Reported-by: Stathis Kapnidis
Fixes #7860
Closes #7861
2021-10-15 10:00:11 +02:00
Daniel Gustafsson 013cb2ff7d docs/examples: add missing binaries to gitignore
Commit f65d7889b added getreferrer, and commit ae8e11ed5 multi-legacy,
both of which missed adding .gitignore clauses for the built binaries.

Closes #7817
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-10-06 10:46:00 +02:00
Marcel Raad 7a0c160473
externalsocket: use WinSock 2.2
That's the only version we support.

Closes https://github.com/curl/curl/pull/7778
2021-09-28 19:29:29 +02:00
i-ky 3363eeb262
urlapi: add curl_url_strerror()
Add curl_url_strerror() to convert CURLUcode into readable string and
facilitate easier troubleshooting in programs using URL API.
Extend CURLUcode with CURLU_LAST for iteration in unit tests.
Update man pages with a mention of new function.
Update example code and tests with new functionality where it fits.

Closes #7605
2021-09-27 08:28:46 +02:00
Daniel Stenberg 5c4e46c724
examples/imap-append: fix end-of-data check
Reported-by: Alexander Chuykov
Fixes #7774
Closes #7775
2021-09-25 14:47:23 +02:00
Daniel Stenberg d9b2d1d90f
copyrights: update copyright year ranges 2021-09-08 09:36:49 +02:00
git-bruh 033d15a6c5
examples/*hiperfifo.c: fix calloc arguments to match function proto
Closes #7678
2021-09-06 16:16:52 +02:00
Daniel Stenberg d4d53d99b1
mailing lists: move from cool.haxx.se to lists.haxx.se 2021-08-30 09:51:07 +02:00
Daniel Stenberg 8c9722bb1c
misc: update incorrect copyright year ranges
Closes #7577
2021-08-16 11:21:47 +02:00
Daniel Gustafsson 39de263795
examples/ephiperfifo.c: simplify signal handler
The signal handler registered for SIGINT is only handling SIGINT
so there isn't much need for inspecting the signo.  While there,
rename the handler to be more specific.

g_should_exit should really be of sig_atomic_t type, but relying
on autoconf in the examples seems like a bad idea so keep that
for now.

Reviewed-by: Daniel Stenberg
Closes #7310
2021-08-13 23:38:28 +02:00
Daniel Stenberg 17c7a56d14
example/cookie_interface: fix scan-build printf warning
Follow-up to 4b79c4fb56

Fixes #7497
Closes #7498
2021-07-26 18:20:03 +02:00
Carlo Marcelo Arenas Belón 4b79c4fb56
examples/cookie_interface: avoid printfing time_t directly
time_t representation is undefined and varies on bitsize and signedness,
and as of C11 could be even non integer.

instead of casting to unsigned long (which would truncate in systems
with a 32bit long after 2106) use difftime to get the elapsed time as a
double and print that (without decimals) instead.

alternatively a cast to curl_off_t and its corresponding print
formatting could have been used (at least in POSIX) but portability and
curl agnostic code was prioritized.

Closes #7490
2021-07-26 00:55:17 +02:00
Daniel Stenberg 1026b36ea0
examples/multi-single: fix scan-build warning
warning: Value stored to 'mc' during its initialization is never read

Follow-up to ae8e11ed5f

Closes #7360
2021-07-07 13:06:18 +02:00
Daniel Stenberg ae8e11ed5f
docs/examples: use curl_multi_poll() in multi examples
The API is soon two years old and deserves being shown as the primary
way to drive multi code as it makes it much easier to write code.

multi-poll: removed

multi-legacy: add to show how we did multi API use before
curl_multi_wait/poll.

Closes #7352
2021-07-07 08:15:09 +02:00
Daniel Stenberg a37fc62e8b
examples: safer and more proper read callback logic
The same callback code is used in:

 imap-append.c
 smtp-authzid.c
 smtp-mail.c
 smtp-multi.c
 smtp-ssl.c
 smtp-tls.c

It should not assume that it can copy full lines into the buffer as it
will encourage sloppy coding practices. Instead use byte-wise logic and
check/acknowledge the buffer size appropriately.

Reported-by: Harry Sintonen
Fixes #7330
Closes #7331
2021-07-01 14:27:12 +02:00
Daniel Stenberg 42db4ccee2
examples: length-limit two sscanf() uses of %s
Reported-by: Jishan Shaikh
Fixes #7293
Closes #7294
2021-06-24 15:57:09 +02:00
Daniel Stenberg 265b14d6b3
metalink: remove
Warning: this will make existing curl command lines that use metalink to
stop working.

Reasons for removal:

1. We've found several security problems and issues involving the
   metalink support in curl. The issues are not detailed here. When
   working on those, it become apparent to the team that several of the
   problems are due to the system design, metalink library API and what
   the metalink RFC says. They are very hard to fix on the curl side
   only.

2. The metalink usage with curl was only very briefly documented and was
   not following the "normal" curl usage pattern in several ways, making
   it surprising and non-intuitive which could lead to further security
   issues.

3. The metalink library was last updated 6 years ago and wasn't so
   active the years before that either. An unmaintained library means
   there's a security problem waiting to happen. This is probably reason
   enough.

4. Metalink requires an XML parsing library, which is complex code (even
   the smaller alternatives) and to this day often gets security
   updates.

5. Metalink is not a widely used curl feature. In the 2020 curl user
   survey, only 1.4% of the responders said that they'd are using it. In
   2021 that number was 1.2%. Searching the web also show very few
   traces of it being used, even with other tools.

6. The torrent format and associated technology clearly won for
   downloading large files from multiple sources in parallel.

Cloes #7176
2021-06-07 08:14:25 +02:00
Daniel Stenberg 82d334001f
copyright: update copyright year ranges to 2021 2021-05-26 08:18:11 +02:00
Daniel Stenberg 063d3f3b96
tidy-up: make conditional checks more consistent
... remove '== NULL' and '!= 0'

Closes #6912
2021-04-22 09:10:17 +02:00
Daniel Stenberg 95d525a9e1
misc: update copyright year ranges to match latest updates 2021-04-13 14:32:30 +02:00
Jochem Broekhoff 255bdfe65c
examples/hiperfifo.c: check event_initialized before delete
If event_del is called with the event struct (still) zeroed out, a
segmentation fault may occur.  event_initialized checks whether the
event struct is nonzero.

Closes #6876
2021-04-09 11:44:21 +02:00
Daniel Stenberg 85e6975643
copyright: update copyright year ranges to 2021
Reviewed-by: Emil Engler
Closes #6802
2021-03-27 23:00:14 +01:00
Jay Satiro a8da0302a7 examples: Remove threaded-shared-conn.c due to bug
Known bug 11.11 is the shared object's connection cache is not thread
safe, so we should not have an example for it.

Ref: https://github.com/curl/curl/issues/4915
Ref: https://curl.se/docs/knownbugs.html#A_shared_connection_cache_is_not

Closes https://github.com/curl/curl/pull/6795
2021-03-26 03:14:50 -04:00
Viktor Szakats f65d7889b5
http: add new files missed from referrer commit
Ref: 44872aefc2
Ref: #6591
2021-02-19 16:18:15 +00:00
Viktor Szakats 44872aefc2
http: add support to read and store the referrer header
- add CURLINFO_REFERER libcurl option
- add --write-out '%{referer}' command-line option
- extend --xattr command-line option to fill user.xdg.referrer.url extended
  attribute with the referrer (if there was any)

Closes #6591
2021-02-19 13:57:19 +00:00
Viktor Szakats acd90af51f
docs/Makefile.inc: format to be update-friendly
- one source file per line
- convert tabs to spaces
- do not align line-continuation backslashes
- sort source files alphabetically

Reviewed-by: Daniel Stenberg
Closes #6593
2021-02-11 16:12:12 +00:00
Viktor Szakats 2dfe3d7093
Makefile.m32: add support for libgsasl dependency
Reviewed-by: Marcel Raad
Closes #6586
2021-02-10 18:48:29 +00:00
Daniel Stenberg 2855997a95
examples/curlgtk.c: fix the copyright year range
... and make private functions static.
2020-12-30 22:37:44 +01:00
Olaf Hering f2ed79d8ee
docs/examples: adjust prototypes for CURLOPT_READFUNCTION
The type of the buffer in curl_read_callback is 'char *', not 'void *'.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Closes #6392
2020-12-30 22:20:24 +01:00
Daniel Stenberg 0a5b8af777
examples: fix more empty expression statement has no effect
Follow-up to 26e46617b9
2020-12-30 22:19:05 +01:00
Daniel Stenberg a6d20b89db
cleanup: fix two empty expression statement has no effect
Follow-up to 26e46617b9
2020-12-30 16:58:19 +01:00
Daniel Stenberg a93c647de8
examples/libtest: add .checksrc to dist
... so that (auto)builds from tarballs also get the correct instructions.

Fixes #6176
Closes #6353
2020-12-21 17:06:06 +01:00
Daniel Stenberg 1451f4d2e1
examples: remove superfluous asterisk uses
... for function pointers. Breaks in ancient compilers.
2020-12-16 09:24:16 +01:00
Rikard Falkeborn 77b2f702c4
examples: update .gitignore
Add files that are generated by 'make examples' and remove some that
have been renamed.

The commits that renamed the programs are e9625c5bc6 (imap.c and
simplesmtp.c were renamed to imap-fetch.c and smtp-send.c) and
ad39e7ec01 (pop3slist.c and pop3s.c were renamed to pop3-list.c and
pop3-ssl.c).

Closes #6240
2020-11-23 23:09:33 +01:00
Daniel Stenberg 71ec4e7d76
httpput-postfields.c: new example doing PUT with POSTFIELDS
Proposed-by: Jeroen Ooms
Ref: #6186
Closes #6188
2020-11-13 09:20:57 +01:00
Daniel Stenberg fa6bbbe167
examples/httpput: remove use of CURLOPT_PUT
It is deprecated and unnecessary since it already sets CURLOPT_UPLOAD.

Reported-by: Jeroen Ooms
Fixes #6186
Closes #6187
2020-11-09 08:25:14 +01:00
Daniel Gustafsson afddaa6dec examples: fix comment syntax
Commit ac0a88fd2 accidentally added a stray character outside of the
comment which broke compilation. Fix by removing.

Reported-by:  autobuild https://curl.se/dev/log.cgi?id=20201105084306-12742
2020-11-05 09:54:12 +01:00
Daniel Stenberg ac0a88fd25
copyright: fix year ranges
Follow-up from 4d2f800677
2020-11-05 08:22:10 +01:00