#
ce7d0d41 |
| 08-Sep-2024 |
Viktor Szakats |
ipfs: add options to disable - CPPFLAGS: `-DCURL_DISABLE_IPFS` - configure: `--disable-ipfs` - cmake: `-DCURL_DISABLE_IPFS=ON` Fixes #14824 Closes #14827
|
#
c0450488 |
| 21-Aug-2024 |
Viktor Szakats |
src: fix potential macro confusion in cmake unity builds Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset before including it. In a cmake "unity" batch w
src: fix potential macro confusion in cmake unity builds Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset before including it. In a cmake "unity" batch where the first included source had it unset, the next sources did not get the macros requested with `ENABLE_CURLX_PRINTF` because `lib/curl.x` had already been included without them. Fix it by by making the macros enabled permanently and globally for internal sources, and dropping `ENABLE_CURLX_PRINTF`. This came up while testing unity builds with smaller batches. The full, default unity build where all `src` is bundled up in a single unit, was not affected. Fixes: ``` $ cmake -B build -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=15 $ make -C build ... curl/src/tool_getparam.c: In function ‘getparameter’: curl/src/tool_getparam.c:2409:11: error: implicit declaration of function ‘msnprintf’; did you mean ‘vsnprintf’? [-Wimplicit-function-declaration] 2409 | msnprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", | ^~~~~~~~~ | vsnprintf curl/src/tool_getparam.c:2409:11: warning: nested extern declaration of ‘msnprintf’ [-Wnested-externs] [...] ``` Reported-by: Daniel Stenberg Bug: https://github.com/curl/curl/pull/14626#issuecomment-2301663491 Closes #14632
show more ...
|
#
53146dd2 |
| 06-Aug-2024 |
Daniel Stenberg |
tool_help: handle longer lines, exit on too long Follow-up to 9a0cf56471c1a - increase the buffer to handle 160 characters manpage lines - add another assert - if the line b
tool_help: handle longer lines, exit on too long Follow-up to 9a0cf56471c1a - increase the buffer to handle 160 characters manpage lines - add another assert - if the line buffer gets full, abort Ideally, we add another step in the build process that makes the build fail if this long lines are used. Closes #14422
show more ...
|
#
b9d465c8 |
| 05-Aug-2024 |
Daniel Stenberg |
tool_help: fix a NULL deref in the --help option code Follow-up to 9a0cf56471c1a Pointed out by CodeSonar Closes #14391
|
#
9a0cf564 |
| 03-Aug-2024 |
Daniel Stenberg |
curl: --help [option] displays documentation for given cmdline option Since the documentation text blob might be gzipped, it needs to search for what to output in a streaming manner. It
curl: --help [option] displays documentation for given cmdline option Since the documentation text blob might be gzipped, it needs to search for what to output in a streaming manner. It then first searches for "\nALL OPTIONS". Then, it looks for the start to display at "\n -[option]" and stops again at "\n -". Except for the last option in the man page, which ends at "\nFILES" - the subtitle for the section following all options in the manpage. Test 1707 to 1710 verify Closes #13997
show more ...
|
#
8a3740bc |
| 29-Jun-2024 |
Viktor Szakats |
curl: support embedding a CA bundle Add the ability to embed a CA bundle into the curl binary. It is used when no other runtime or build-time option set one. This helps curl-for
curl: support embedding a CA bundle Add the ability to embed a CA bundle into the curl binary. It is used when no other runtime or build-time option set one. This helps curl-for-win macOS and Linux builds to run standalone, and also helps Windows builds to avoid picking up the CA bundle from an arbitrary (possibly world-writable) location (though this behaviour is not currently disablable). Usage: - cmake: `-DCURL_CA_EMBED=/path/to/curl-ca-bundle.crt` - autotools: `--with-ca-embed=/path/to/curl-ca-bundle.crt` - Makefile.mk: `CURL_CA_EMBED=/path/to/curl-ca-bundle.crt` Also add new command-line option `--dump-ca-embed` to dump the embedded CA bundle to standard output. Closes #14059
show more ...
|
#
127aa61f |
| 28-Jun-2024 |
Dan Fandrich |
curl: follow-up to fix categories in --help The commit 6483813b was missing changes necessitated by 2abfc75 that causes a crash. Also, use ARRAYSIZE() for cleaner code. Follow-u
curl: follow-up to fix categories in --help The commit 6483813b was missing changes necessitated by 2abfc75 that causes a crash. Also, use ARRAYSIZE() for cleaner code. Follow-up to 6483813b Ref #14055
show more ...
|
#
6483813b |
| 28-Jun-2024 |
Dan Fandrich |
curl: list categories in --help This eliminates the need to run an extra help subcommand to get the possible categories, reducing the friction in getting relevant help. The help word
curl: list categories in --help This eliminates the need to run an extra help subcommand to get the possible categories, reducing the friction in getting relevant help. The help wording was also slightly tweaked for grammatical accuracy. Closes #14055
show more ...
|
#
2abfc759 |
| 04-Jul-2024 |
Daniel Stenberg |
cmdline-opts: category cleanup Option cleanups: --get is not upload --form* are post - added several options into ldap, smtp, imap and pop3 - shortened the category
cmdline-opts: category cleanup Option cleanups: --get is not upload --form* are post - added several options into ldap, smtp, imap and pop3 - shortened the category descriptions in the list category curl fixes: --create-dirs removed from 'curl' --ftp-create-dirs removed from 'curl' --netrc moved to 'auth' from 'curl' --netrc-file moved to 'auth' from 'curl' --netrc-optional moved to 'auth' from 'curl' --no-buffer moved to 'output' from 'curl' --no-clobber removed from 'curl' --output removed from 'curl' --output-dir removed from 'curl' --remove-on-error removed from 'curl' Add a "global" category: - Made all "global" options set this category Add a "deprecated" category: - Moved the deprecated options to it (maybe they should not be in any category long term) Add a 'timeout' category - Put a number of appropriate options in it Add an 'ldap' category - Put the LDAP related option in there Remove categories "ECH" and "ipfs" - They should not be categories. Had only one single option each. Remove category "misc" - It should not be a category as it is impossible to know when to browse it. --use-ascii moved to ftp and output --xattr moved to output --service-name moved to auth Managen fixes: - errors if an option is given a category name that is not already setup for in code - verifies that options set `scope: global` also is put in category `global´ Closes #14101
show more ...
|
#
c074ba64 |
| 01-Jul-2024 |
Daniel Stenberg |
code: language cleanup in comments Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname
code: language cleanup in comments Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname - file name => filename - user name = username - man page => manpage - run-time => runtime - set-up => setup - back-end => backend - a HTTP => an HTTP - Two spaces after a period => one space after period Closes #14073
show more ...
|
#
6946b3a7 |
| 28-May-2024 |
Daniel Stenberg |
curl: make warnings and other messages aware of terminal width This removes unnecessary line wraps when the terminal is wider than 79 columns and it also makes messages look better in na
curl: make warnings and other messages aware of terminal width This removes unnecessary line wraps when the terminal is wider than 79 columns and it also makes messages look better in narrower terminals. The get_terminal_columns() function is not split out into its own source file. Suggested-by: Elliott Balsley Fixes #13804 Closes #13808
show more ...
|
#
1a895383 |
| 13-May-2024 |
Viktor Szakats |
src: tidy up types, add necessary casts Cherry-picked from #13489 Closes #13614
|
#
a362962b |
| 04-Apr-2024 |
Stephen Farrell |
TLS: add support for ECH (Encrypted Client Hello) An EXPERIMENTAL feature used with CURLOPT_ECH and --ech. Closes #11922
|
#
2efc111e |
| 25-Mar-2024 |
Daniel Stenberg |
curl: make --help adapt to the terminal width Instead of assuming and working with 80 colums, try figuring out what width is actually used. Ref: #13141 Closes #13171
|
#
fe9f68fa |
| 25-Mar-2024 |
Daniel Stenberg |
cmdline-opts: shorter help texts In an effort to increase the readability of the "--help all" output on narrow (80 column) terminals. Co-authored-by: Jay Satiro Closes
cmdline-opts: shorter help texts In an effort to increase the readability of the "--help all" output on narrow (80 column) terminals. Co-authored-by: Jay Satiro Closes #13169
show more ...
|
#
102de7aa |
| 12-Dec-2023 |
Daniel Stenberg |
curl: show ipfs and ipns as supported "protocols" They are accepted schemes in URLs passed to curl (the tool, not the library). Also makes curl-config show the same list.
curl: show ipfs and ipns as supported "protocols" They are accepted schemes in URLs passed to curl (the tool, not the library). Also makes curl-config show the same list. Co-Authored-by: Jay Satiro Reported-by: Chara White Bug: https://curl.se/mail/archive-2023-12/0026.html Closes #12508
show more ...
|
#
84338c4d |
| 15-Nov-2023 |
Viktor Szakats |
build: add more picky warnings and fix them Enable more picky compiler warnings. I've found these options in the nghttp3 project when implementing the CMake quick picky warning funct
build: add more picky warnings and fix them Enable more picky compiler warnings. I've found these options in the nghttp3 project when implementing the CMake quick picky warning functionality for it [1]. `-Wunused-macros` was too noisy to keep around, but fixed a few issues it revealed while testing. - autotools: reflect the more precisely-versioned clang warnings. Follow-up to 033f8e2a08eb1d3102f08c4d8c8e85470f8b460e #12324 - autotools: sync between clang and gcc the way we set `no-multichar`. - autotools: avoid setting `-Wstrict-aliasing=3` twice. - autotools: disable `-Wmissing-noreturn` for MSYS gcc targets [2]. It triggers in libtool-generated stub code. - lib/timeval: delete a redundant `!MSDOS` guard from a `WIN32` branch. - lib/curl_setup.h: delete duplicate declaration for `fileno`. Added in initial commit ae1912cb0d494b48d514d937826c9fe83ec96c4d (1999-12-29). This suggests this may not be needed anymore, but if it does, we may restore this for those specific (non-Windows) systems. - lib: delete unused macro `FTP_BUFFER_ALLOCSIZE` since c1d6fe2aaa5a26e49a69a4f2495b3cc7a24d9394. - lib: delete unused macro `isxdigit_ascii` since f65f750742068f579f4ee6d8539ed9d5f0afcb85. - lib/mqtt: delete unused macro `MQTT_HEADER_LEN`. - lib/multi: delete unused macro `SH_READ`/`SH_WRITE`. - lib/hostip: add `noreturn` function attribute via new `CURL_NORETURN` macro. - lib/mprintf: delete duplicate declaration for `Curl_dyn_vprintf`. - lib/rand: fix `-Wunreachable-code` and related fallouts [3]. - lib/setopt: fix `-Wunreachable-code-break`. - lib/system_win32 and lib/timeval: fix double declarations for `Curl_freq` and `Curl_isVistaOrGreater` in CMake UNITY mode [4]. - lib/warnless: fix double declarations in CMake UNITY mode [5]. This was due to force-disabling the header guard of `warnless.h` to to reapply it to source code coming after `warnless.c` in UNITY builds. This reapplied declarations too, causing the warnings. Solved by adding a header guard for the lines that actually need to be reapplied. - lib/vauth/digest: fix `-Wunreachable-code-break` [6]. - lib/vssh/libssh2: fix `-Wunreachable-code-break` and delete redundant block. - lib/vtls/sectransp: fix `-Wunreachable-code-break` [7]. - lib/vtls/sectransp: suppress `-Wunreachable-code`. Detected in `else` branches of dynamic feature checks, with results known at compile-time, e.g. ```c if(SecCertificateCopySubjectSummary) /* -> true */ ``` Likely fixable as a separate micro-project, but given SecureTransport is deprecated anyway, let's just silence these locally. - src/tool_help: delete duplicate declaration for `helptext`. - src/tool_xattr: fix `-Wunreachable-code`. - tests: delete duplicate declaration for `unitfail` [8]. - tests: delete duplicate declaration for `strncasecompare`. - tests/libtest: delete duplicate declaration for `gethostname`. Originally added in 687df5c8c39c370a59999b9afc0917d808d978b7 (2010-08-02). Got complicated later: c49e9683b85ba9d12cbb6eebc4ab2c8dba68fbdc If there are still systems around with warnings, we may restore the prototype, but limited for those systems. - tests/lib2305: delete duplicate declaration for `libtest_debug_config`. - tests/h2-download: fix `-Wunreachable-code-break`. [1] https://github.com/ngtcp2/nghttp3/blob/a70edb08e954d690e8fb2c1df999b5a056f8bf9f/cmake/PickyWarningsC.cmake [2] https://ci.appveyor.com/project/curlorg/curl/builds/48553586/job/3qkgjauiqla5fj45?fullLog=true#L1675 [3] https://github.com/curl/curl/actions/runs/6880886309/job/18716044703?pr=12331#step:7:72 https://github.com/curl/curl/actions/runs/6883016087/job/18722707368?pr=12331#step:7:109 [4] https://ci.appveyor.com/project/curlorg/curl/builds/48555101/job/9g15qkrriklpf1ut#L204 [5] https://ci.appveyor.com/project/curlorg/curl/builds/48555101/job/9g15qkrriklpf1ut#L218 [6] https://github.com/curl/curl/actions/runs/6880886309/job/18716042927?pr=12331#step:7:290 [7] https://github.com/curl/curl/actions/runs/6891484996/job/18746659406?pr=12331#step:9:1193 [8] https://github.com/curl/curl/actions/runs/6882803986/job/18722082562?pr=12331#step:33:1870 Closes #12331
show more ...
|
#
e5bb88b8 |
| 28-Sep-2023 |
Viktor Szakats |
tool: use our own stderr variable Earlier this year we changed our own stderr variable to use the standard name `stderr` (to avoid bugs where someone is using `stderr` instead of the
tool: use our own stderr variable Earlier this year we changed our own stderr variable to use the standard name `stderr` (to avoid bugs where someone is using `stderr` instead of the curl-tool specific variable). This solution needed to override the standard `stderr` symbol via the preprocessor. This in turn didn't play well with unity builds and caused curl tool to crash or stay silent due to an uninitialized stderr. This was a hard to find issue, fixed by manually breaking out one file from the unity sources. To avoid two these two tricks, this patch implements a different solution: Restore using our own local variable for our stderr output and leave `stderr` as-is. To avoid using `stderr` by mistake, add a `checksrc` rule (based on logic we already used in lib for `strerror`) that detects any `stderr` use in `src` and points to using our own variable instead: `tool_stderr`. Follow-up to 06133d3e9b8aeb9e9ca0b3370c246bdfbfc8619e Follow-up to 2f17a9b654121dd1ecf4fc043c6d08a9da3522db Closes #11958
show more ...
|
#
7d3b167f |
| 11-Jan-2023 |
Daniel Stenberg |
curl: output warning at --verbose output for debug-enabled version + a libcurl warning in the debug output Assisted-by: Jay Satiro Ref: https://curl.se/mail/lib-2023-01/003
curl: output warning at --verbose output for debug-enabled version + a libcurl warning in the debug output Assisted-by: Jay Satiro Ref: https://curl.se/mail/lib-2023-01/0039.html Closes #10278
show more ...
|
#
2bc1d775 |
| 02-Jan-2023 |
Daniel Stenberg |
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - save
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
show more ...
|
#
2d9fee45 |
| 23-Nov-2022 |
Daniel Gustafsson |
netware: remove leftover traces Commit 3b16575ae938dec2a29454631a12aa52b6ab9c67 removed support for building on Novell Netware, but a few leftover traces remained. This removes the l
netware: remove leftover traces Commit 3b16575ae938dec2a29454631a12aa52b6ab9c67 removed support for building on Novell Netware, but a few leftover traces remained. This removes the last bits. Closes: #9966 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
show more ...
|
#
184fc6f0 |
| 08-Nov-2022 |
Patrick Monnerat |
tool: use feature names instead of bit mask, when possible If the run-time libcurl is too old to support feature names, the name array is created locally from the bit masks. This is the
tool: use feature names instead of bit mask, when possible If the run-time libcurl is too old to support feature names, the name array is created locally from the bit masks. This is the only sequence left that uses feature bit masks. Closes #9583
show more ...
|
#
677266c7 |
| 21-Sep-2022 |
Patrick Monnerat |
tool: remove protocol count limitation Replace bit mask protocol sets by null-terminated arrays of protocol tokens. These are the addresses of the protocol names returned by curl_ver
tool: remove protocol count limitation Replace bit mask protocol sets by null-terminated arrays of protocol tokens. These are the addresses of the protocol names returned by curl_version_info(). Protocol names are sorted case-insensitively before output to satisfy CI tests matches consistency. The protocol list returned by curl_version_info() is augmented with all RTMP protocol variants. Test 1401 adjusted for new alpha ordered output. Closes #9546
show more ...
|
#
dd2a0243 |
| 15-Sep-2022 |
Patrick Monnerat |
cli tool: do not use disabled protocols As they are now rejected by the library, take care of not passing disabled protocol names to CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS
cli tool: do not use disabled protocols As they are now rejected by the library, take care of not passing disabled protocol names to CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR. Rather than using the CURLPROTO_* constants, dynamically assign protocol numbers based on the order they are listed by curl_version_info(). New type proto_set_t implements prototype bit masks: it should therefore be large enough to accomodate all library-enabled protocols. If not, protocol numbers beyond the bit count of proto_set_t are recognized but "inaccessible": when used, a warning is displayed and the value is ignored. Should proto_set_t overflows, enabled protocols are reordered to force those having a public CURLPROTO_* representation to be accessible. Code has been added to subordinate RTMP?* protocols to the presence of RTMP in the enabled protocol list, being returned by curl_version_info() or not.
show more ...
|
#
a94d6fe7 |
| 13-Jun-2022 |
Viktor Szakats |
version: rename threadsafe-init to threadsafe Referring to Daniel's article [1], making the init function thread-safe was the last bit to make libcurl thread-safe as a whole. So the name
version: rename threadsafe-init to threadsafe Referring to Daniel's article [1], making the init function thread-safe was the last bit to make libcurl thread-safe as a whole. So the name of the feature may as well be the more concise 'threadsafe', also telling the story that libcurl is now fully thread-safe, not just its init function. Chances are high that libcurl wants to remain so in the future, so there is little likelihood of ever needing any other distinct `threadsafe-<name>` feature flags. For consistency we also shorten `CURL_VERSION_THREADSAFE_INIT` to `CURL_VERSION_THREADSAFE`, update its description and reference libcurl's thread safety documentation. [1]: https://daniel.haxx.se/blog/2022/06/08/making-libcurl-init-more-thread-safe/ Reviewed-by: Daniel Stenberg Reviewed-by: Jay Satiro Closes #8989
show more ...
|