diff options
author | dartraiden <wowemuh@gmail.com> | 2025-06-04 10:22:08 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2025-06-04 10:27:15 +0300 |
commit | b14c227e81e60d9d87b6a56074d47f8b92727db8 (patch) | |
tree | 55d8efd8f7d593a520c01c918fdfd0f81e8605ca | |
parent | 114ca3aa13683f413d2297e675741f54b87dd151 (diff) |
libcurl: update to 8.14.1
66 files changed, 461 insertions, 781 deletions
diff --git a/libs/libcurl/docs/RELEASE-NOTES b/libs/libcurl/docs/RELEASE-NOTES index 28b7e6e5e6..c42a6b2113 100644 --- a/libs/libcurl/docs/RELEASE-NOTES +++ b/libs/libcurl/docs/RELEASE-NOTES @@ -1,251 +1,51 @@ -curl and libcurl 8.14.0
+curl and libcurl 8.14.1
- Public curl releases: 267
+ Public curl releases: 268
Command line options: 269
curl_easy_setopt() options: 308
Public functions in libcurl: 96
- Contributors: 3427
+ Contributors: 3431
This release includes the following changes:
- o mqtt: send ping at upkeep interval [49]
- o schannel: handle pkcs12 client certificates containing CA certificates [58]
- o TLS: add CURLOPT_SSL_SIGNATURE_ALGORITHMS and --sigalgs [113]
- o vquic: ngtcp2 + openssl support [96]
- o wcurl: import v2025.04.20 script + docs [97]
- o websocket: add option to disable auto-pong reply [52]
This release includes the following bugfixes:
- o _SEEALSO.md: remove spaces around command and man page section [166]
- o asny-thrdd: fix detach from running thread [191]
- o asnyc-thrdd: explain how this is okay with a comment [200]
- o asyn resolver code improvements [50]
- o async-threaded resolver: use ref counter [10]
- o async: DoH improvements [99]
- o autotools: detect `wolfSSL_set_quic_use_legacy_code` like cmake does [104]
- o autotools: install shell completion files on cross build [119]
- o aws-sigv4: allow a blank string [86]
- o build: check required rustls-ffi version [46]
- o build: enable gcc-12/13+, clang-10+ picky warnings [147]
- o build: enable gcc-15 picky warnings [133]
- o certs: drop unused `default_bits` from `.prm` files [45]
- o cf-https-connect: use the passed in dns struct pointer [64]
- o cf-socket: fix FTP accept connect [153]
- o cfilters: remove assert [120]
- o cmake/FindNGTCP2: simplify multi-pkg-config detection [27]
- o cmake: append picky warnings to `CMAKE_REQUIRED_FLAGS` as string [68]
- o cmake: avoid 'target is imported but not globally visible' when consuming libcurl with old cmake [125]
- o cmake: do not install `mk-ca-bundle` script and manpage [101]
- o cmake: enable `-Wall` for MSVC when `PICKY_COMPILER=ON` [100]
- o cmake: extend integration tests [139]
- o cmake: fix `fish` install directory detection via `pkg-config` [123]
- o cmake: fix nghttp3 static linking with `USE_OPENSSL_QUIC=ON` [79]
- o cmake: fix option() and mark_as_advanced() mixed order [111]
- o cmake: fix shell completion install when just one flavor is enabled [73]
- o cmake: honor individual picky option overrides found in `CMAKE_C_FLAGS` [146]
- o cmake: install shell completions for cross-builds [112]
- o cmake: link `crypt32` for OpenSSL feature detection [105]
- o cmake: merge `CURL_WERROR` logic into `PickyWarnings.cmake` [66]
- o cmake: prefer `COMPILE_OPTIONS` over `CMAKE_C_FLAGS` for custom C options [72]
- o cmake: quotes, whitespace, use `VERSION_GREATER_EQUAL` [33]
- o cmake: revert `CURL_LTO` behavior for multi-config generators [74]
- o cmake: set `BUILDING_LIBCURL` directly for unit test targets [174]
- o cmake: stop deleting `-W<n>` from `CMAKE_C_FLAGS` (MSVC) [155]
- o cmake: tidy up and document feature detections in dependencies [107]
- o cmake: use `CMAKE_COMPILE_WARNING_AS_ERROR` if available [154]
- o cmake: use `INCLUDE_DIRECTORIES` prop to specify local header dirs [47]
- o cmake: use `LIB_NAME` in `curl-config.cmake.in` [148]
- o cmake: use absolute paths for completion targets [40]
- o cmake: use the `LINK_OPTIONS` property with CMake 3.13+ [78]
- o configure: catch asking for double resolver without https-rr [82]
- o configure: fix --disable-rt [20]
- o configure: restore link checks [25]
- o configure: suppress command not found for brew [235]
- o conncache: make Curl_cpool_init return void [15]
- o connect: shutdown timer fix [132]
- o content_encoding: Transfer-Encoding parser improvements [31]
- o CONTRIBUTE: add project guidelines for AI use [76]
- o contrithanks.sh: drop set -e [6]
- o cpool/cshutdown: force close connections under pressure [80]
- o curl: fix memory leak when -h is used in config file [161]
- o curl: only warn once for --manual in manual-disabled build [205]
- o curl_get_line: handle lines ending on the buffer boundary [62]
- o curl_krb5: only use functions if FTP is still enabled [21]
- o curl_multibyte: fixup low-level calls, include in unity builds [55]
- o curl_osslq: remove a leftover debug fprintf() call [140]
- o curl_url_get.md: don't call it normalized [212]
- o curl_version_info.md: clarify ssl_version for MultiSSL [145]
- o CURLMOPT_TIMERFUNCTION.md: correct the example [162]
- o CURLOPT_ERRORBUFFER.md: buffer is read only after curl takes ownership [93]
- o CURLOPT_FOLLOWLOCATION.md: switch to GET => no body [208]
- o CURLOPT_READFUNCTION.md: mention the seek callback [209]
- o CURLOPT_XFERINFOFUNCTION.md: fix the callback return type in example [122]
- o curlx: move the docs to docs/internals/ [184]
- o DEPRECATE.md: drop support for VS2008 [214]
- o DEPRECATE.md: drop Windows CE support [216]
- o dist: drop duplicate entry from `CMAKE_DIST` [88]
- o dns_entry: move from conn to data->state [178]
- o Dockerfile: update debian:bookworm-slim Docker digest to 90522ee [211]
- o docs/INSTALL.md: drop reference to removed configure option [83]
- o docs/libcurl: fix type and prototype problems in examples [121]
- o docs/libcurl: make examples build with picky compiler options [84]
- o docs/libcurl: mention sensitive data/headers [206]
- o docs: add missing return statement in examples [85]
- o docs: fix incorrect shell substitution in docker run example command [51]
- o docs: fix typo in retry.md [192]
- o docs: update distros links
- o doh: httpsrr fix [71]
- o doh: make sure CURLOPT_PROTOCOLS is set a with a "long" arg [124]
- o doh: reduce the DNS request buffer size [70]
- o easy_reset: fix dohfor_mid member [63]
- o ECH: reference the OpenSSL ECH feature branch [186]
- o etag-save.md: mention how using both options is a good idea [108]
- o eventfd: fix feature guards [24]
- o formdata: cleanups [219]
- o ftp: fix bug in failed init [179]
- o ftp: fix race in upload handling [207]
- o ftplistparser: add two overflow preventions [173]
- o ftplistparser: split up into more functions [215]
- o generate.bat: exclude curlinfo.c from legacy VS projects [175]
- o genserv.pl: fail with a message if `openssl` is missing or failing [14]
- o headers: enforce a max number of response header to accept [163]
- o headers: set an error message on illegal response headers [181]
- o hostip: fix build without threaded-resolver and without DoH [17]
- o hostip: show the correct name on proxy resolve error [37]
- o http2: fix stream window size after unpausing [34]
- o HTTP3.md: fix incorrect variable placeholders [30]
- o http: fix a build error when all auths are disabled [16]
- o http: fix HTTP/2 handling of TE request header using "trailers" [130]
- o http: in alt-svc negotiation only allow supported HTTP versions [59]
- o http_aws_sigv4: add additional verbose log statements [39]
- o http_aws_sigv4: improve sigv4 url encoding and canonicalization [240]
- o http_chunks: narrow variable scope for 'trlen' [199]
- o http_negotiate: fix non-SSL build with GSSAPI [23]
- o https-connect: fix httpsrr target check [36]
- o HTTPSRR.md: clarify somewhat [137]
- o if2ip: build the function also if FTP is present [19]
- o imap: remove redundant condition [196]
- o INSTALL-CMAKE.md: fix typo
- o INSTALL.md: update the minimal libcurl size example
- o KNOWN_BUGS: fix link in sivg4 issue 16.3 [26]
- o lib/src/docs/test: improve curl_easy_setopt() calls [116]
- o lib1560: use hex notation, drop non-ASCII exception [182]
- o lib3026: drop DLL pre-load perf mitigation for old mingw [222]
- o lib: add const to clientwriter tables
- o lib: drop curlx_getpid, use fake pid in SMB [172]
- o lib: include files using known path [48]
- o lib: make Curl_easyopts const [44]
- o lib: unify conversions to/from hex [3]
- o libcurl-tutorial.md: fix read callback explanation [118]
- o libssh: add NULL check for Curl_meta_get() [201]
- o libssh: fix memory leak [168]
- o libssh: remove a condition that always equals false [202]
- o libtest/first: stop defining MEMDEBUG_NODEFINES [32]
- o libtests: define CURL_DISABLE_DEPRECATION first [177]
- o make: clean tests better [60]
- o mbedtls: TLS 1.3 is max when mbedtls has 1.3 support [109]
- o metahash: add asserts to help analyzers [171]
- o mk-ca-bundle.pl: follow redirects [53]
- o mk-ca-bundle: switch URLs to GitHub versions [195]
- o mkhelp: fix to not generate a line-ending space in some cases [103]
- o mqtt: use conn/easy meta hash [141]
- o multi: do transfer book keeping using mid [91]
- o multi: init_do(): check result [114]
- o netrc: avoid NULL deref on weird input [167]
- o netrc: avoid strdup NULL [198]
- o netrc: deal with null token better [150]
- o ngtcp2: clarify ignoring of result [131]
- o openssl-quic: avoid potential `-Wnull-dereference`, add assert [126]
- o openssl-quic: fix printf mask [102]
- o openssl-quic: fix shutdown when stream not open [11]
- o openssl: enable builds for *both* engines and providers [115]
- o openssl: set the cipher string before doing private cert [138]
- o parsedate: provide Curl_wkday also for GnuTLS builds [13]
- o processhelp.pm: always call `taskkill` with `-f` (force) [69]
- o processhelp.pm: avoid potential endless loop, log more (Windows) [5]
- o progress: avoid integer overflow when gathering total transfer size [128]
- o pytest tls: extend coverage [217]
- o pytest-xdist: pytest in parallel [204]
- o pytest: add pinnedpubkey test cases [232]
- o pytest: give parameterised tests better ids for read- and parsability [142]
- o pytest: make test_07_22 more lenient to exit codes [90]
- o quic: no local idle connection timeout, ngtcp2 keep-alive [61]
- o rand: update comment on Curl_rand_bytes weak random [35]
- o RELEASE-PROCEDURE.md: release candidate git tagging explained [143]
- o rtsp: remove redundant condition [197]
- o runtests: add retry option to reduce flakiness [106]
- o runtests: fix indentation
- o runtests: recognize lowercase `windows` in `curl -V` [77]
- o runtests: remove server verification after start [89]
- o runtests: split `SSH_PWD` into `SCP_PWD` and `SFTP_PWD`, and more [75]
- o rustls: make max size of cert and key reasonable [41]
- o sasl: give help when unable to select AUTH [213]
- o scripts: completion.pl: sort the completion file for all shells [9]
- o scripts: drop unused import, formatting [95]
- o scripts: fix --opts-dir help in completion.pl
- o scripts: fix perl indentation, whitespace, semicolons [127]
- o sectransp: fix building for macOS Sierra and older [151]
- o setopt: provide info for CURLE_BAD_FUNCTION_ARGUMENT [180]
- o smb: avoid integer overflow on weird input date [129]
- o socket: use accept4 when available [7]
- o socketpair: support pipe2 where available [56]
- o spacecheck.pl: check for non-ASCII chars, fix fallouts [187]
- o spacecheck.pl: verify `tests/data/test*` for non-ASCII chars [189]
- o src: drop strcase.[ch] from tool builds [157]
- o src: include memdebug.h consistently with angle brackets <> [160]
- o src: rename curlx_safefree to tool_safefree [164]
- o test1173.pl: whitelist some option-looking names that aren't options [203]
- o test1658: add unit test for the HTTPS RR decoder [28]
- o test: make unittest 1308 into a libtest [4]
- o tests/ech_tests.sh: sync shebang with rest of bash scripts [42]
- o tests/FILEFORMAT.md: clarify %hex[] formatting [188]
- o tests/FILEFORMAT.md: document the aws feature [156]
- o tests/README.md: document --test-duphandle [8]
- o tests/README.md: list the openssl tool among the prerequisites [12]
- o tests/server/dnsd: basic DNS server for test suite [92]
- o tests/server: check for `stream != NULL` in mqttd [194]
- o tests/server: fix typo in comment
- o tests/server: stop using libcurl string comparisons [185]
- o tests/server: stop using libcurl's printf functions [190]
- o tests/serverhelp: remove last remnants of http-pipe server [1]
- o tests/tunit: make a separate directory for tool-based unit tests [54]
- o tests: add aws feature to the related tests [159]
- o tests: Add https-mtls server to force client auth [57]
- o tests: fix some test tag mismatches
- o tests: mark ipfs tests to require ipfs [2]
- o tests: move a boolean variable out of the path section
- o tests: prefer `--insecure` over `-k` [43]
- o tests: provide all non-ascii data hex encoded [183]
- o tests: remove some unused test case sections
- o tests: require IPv6 for 1265, 1324, 2086 [87]
- o tests: separate tunit tests from unit tests more [176]
- o tests: stop using libcurl's strdup [170]
- o tests: unify test case keywords
- o tests: use a more portable null device path [38]
- o TODO: remove "nicer lacking perl message" [117]
- o tool_cb_write.c: handle EINTR on flush [65]
- o tool_getparam: clear argument only when needed [98]
- o tool_operate: make retrycheck() a separate function [218]
- o tool_operate: when retrying, only truncate regular files [165]
- o tool_paramhlp: avoid integer overflow in secs2ms() [152]
- o tool_parsecfg: make get_line handle lines ending on the buffer boundary [81]
- o typecheck-gcc.h: fix the typechecks [110]
- o urlapi: redirecting to "" is considered fine [149]
- o urlapi: remove unneeded guards around PUNY2IDN [193]
- o urldata: remove the unused struct field 'hide_progress' [220]
- o VERSIONS: list all past releases [22]
- o vquic: consistent name for the stream struct across backends [135]
- o vquic: init for every call to recvmsg [134]
- o vtls: avoid NULL deref on bad PEM input [169]
- o vtls: fix build with ssl but without http [18]
- o VULN-DISCLOSURE-POLICY: use of weak algos [94]
- o winbuild: add the deprecation warning to the README [29]
- o winbuild: curl_get_line is not used for tool builds [158]
- o windows: fix builds targeting WinXP, test it in CI [227]
- o wolfssl: fix to enable ALPN when available [67]
- o ws: fix the header replace check [144]
- o ws: store protocol context as connection meta data [136]
+ o asyn-thrdd: fix cleanup when RR fails due to OOM [20]
+ o autotools: recognize more Linux targets when setting `-D_GNU_SOURCE` [35]
+ o BUG-BOUNTY.md. mention the medium bounty amount in 2025 [5]
+ o cmake: fix missed version number for multi-pkg-config detections [14]
+ o cmdline-docs: mention HTTP resumed uploads to be shaky [21]
+ o curl: make -N handled correctly [34]
+ o curl: upload from '.' fix [9]
+ o dllmain: exclude from Cygwin builds [32]
+ o docs/tests: remove mention of hyper [23]
+ o docs: fix typos [12]
+ o ftp: fix teardown of DATA connection in done [31]
+ o http: fail early when rewind of input failed when following redirects [2]
+ o license: update some copyright links to curl.se [24]
+ o memanalyze.pl: fix getaddrinfo/freeaddrinfo checks [25]
+ o misc: fix spelling [15]
+ o misc: we write *an* IPv6 address [10]
+ o multi: fix add_handle resizing [3]
+ o spelling: 'a' vs 'an' [8]
+ o spelling: call it null-terminate consistently [6]
+ o test1510: fix expectation [19]
+ o tests: await portfile to be complete [1]
+ o tests: fix checks for https-mtls proto [30]
+ o tests: improve server start reliability [18]
+ o tests: move test docs into /docs [16]
+ o tests: re-enable 1510, document heimdal memleak [22]
+ o tests: test mtls also w/ clientAuth EKU only [28]
+ o tests: test mtls with --insecure [29]
+ o tls BIOs: handle BIO_CTRL_EOF correctly [33]
+ o tool_getparam: make --no-anyauth not be accepted [13]
+ o tool_getparam: refactored, simplified [4]
+ o tool_getparam: remove two nextarg NULL checks [11]
+ o VULN-DISCLOSURE-POLICY.md: the distros list wants <= 7 days embargo [26]
+ o wolfssl: fix sending of early data [7]
+ o ws: handle blocked sends better [27]
+ o ws: tests and fixes [17]
This release includes the following known bugs:
@@ -268,253 +68,47 @@ Planned upcoming removals include: This release would not have looked like this without help, code, reports and
advice from friends like these:
- Abhinav Singhal, Aditya Garg, Alberto Leiva Popper, Andreas Westin,
- Andrei Florea, Andrew Kirillov, Andy Pan, antypanty on hackerone,
- Arian van Putten, bo0tzz on github, Bo Anderson, Brendan Dolan-Gavitt,
- Brian Chrzanowski, bruce.yoon, bsr13 on hackerone, calvin2021y on github,
- Calvin Ruocco, Carlos Henrique Lima Melara, Christian Schmitz,
- Christoph Jabs, Cole Helbling, Corinna Brandt, Dagobert Michelsen,
- Dan Fandrich, Daniel Engberg, Daniel Fosco, Daniel McCarney, Daniel Stenberg,
- Demi Marie Obenour, dependabot[bot], Dirk Feytons, epicmkirzinger on github,
- Eric Knibbe, Fujii Hironori, gkarracer on github, Gordon Parke,
- Graham Christensen, Harry Sintonen, Helmut Grohne, Hiroki Kurosawa,
- Int64x86 on github, Jacob Mealey, Jake Yuesong Li, James Fuller,
- Jean-Christophe Amiel, Jeroen Ooms, Jimmy Sjölund, Jixinqi,
- Jochen Sprickerhof, Joe Cise, JoelAtWisetech on github, Joel Depooter,
- Johan Eliasson, John Bampton, John Haugabook, Jonathan Rosa, Kai Pastor,
- kkalganov on github, Maksim Ściepanienka, Manuel Strehl, Marius Kleidl,
- Mathieu Garaud, Matt Jolly, Max Eliaser, mschroeder-fzj on github, NeimadTL,
- Niall O'Reilly, Nigel Brittain, Nils Goroll, Pavel Kropachev, PleaseJustDont,
- Rasmus Melchior Jacobsen, Ray Satiro, renovate[bot], Samuel Henrique,
- Sarah Gooding, sbernatsky on github, Sergey, Sören Tempel, Stefan Eissing,
- Stephen Farrell, Tal Regev, Thomas Klausner, Tomas Volf, Travis Lane,
- Viktor Szakats, wolfsage on hackerone, x1sc0 on github, xiadnoring on github,
- Yedaya Katsman, zopsicle on github
- (91 contributors)
+ Calvin Ruocco, Dan Fandrich, Daniel Stenberg, denandz on github,
+ Ethan Everett, Jacob Mealey, Jeremy Drake, Jeroen Ooms, John Bampton,
+ Kadambini Nema, Michael Kaufmann, Rasmus Melchior Jacobsen, Ray Satiro,
+ Samuel Henrique, Stefan Eissing, Viktor Szakats, x-xiang on github,
+ Yedaya Katsman, Yuyi Wang, z2_
+ (20 contributors)
References to bug reports and discussions on issues:
- [1] = https://curl.se/bug/?i=16924
- [2] = https://curl.se/bug/?i=16947
- [3] = https://curl.se/bug/?i=16888
- [4] = https://curl.se/bug/?i=16891
- [5] = https://curl.se/bug/?i=16908
- [6] = https://curl.se/bug/?i=16914
- [7] = https://curl.se/bug/?i=16979
- [8] = https://curl.se/bug/?i=16944
- [9] = https://curl.se/bug/?i=16985
- [10] = https://curl.se/bug/?i=16916
- [11] = https://curl.se/bug/?i=16998
- [12] = https://curl.se/bug/?i=16942
- [13] = https://curl.se/bug/?i=16943
- [14] = https://curl.se/bug/?i=16926
- [15] = https://curl.se/bug/?i=16936
- [16] = https://curl.se/bug/?i=16939
- [17] = https://curl.se/bug/?i=16938
- [18] = https://curl.se/bug/?i=16935
- [19] = https://curl.se/bug/?i=16933
- [20] = https://curl.se/bug/?i=16932
- [21] = https://curl.se/bug/?i=16925
- [22] = https://curl.se/bug/?i=16907
- [23] = https://curl.se/bug/?i=16919
- [24] = https://curl.se/mail/lib-2025-04/0000.html
- [25] = https://curl.se/mail/lib-2025-04/0004.html
- [26] = https://curl.se/bug/?i=17007
- [27] = https://curl.se/bug/?i=16980
- [28] = https://curl.se/bug/?i=16972
- [29] = https://curl.se/bug/?i=16957
- [30] = https://curl.se/bug/?i=17008
- [31] = https://curl.se/bug/?i=16956
- [32] = https://curl.se/bug/?i=16978
- [33] = https://curl.se/bug/?i=17002
- [34] = https://curl.se/bug/?i=16955
- [35] = https://curl.se/bug/?i=16965
- [36] = https://curl.se/bug/?i=16966
- [37] = https://curl.se/bug/?i=16958
- [38] = https://curl.se/bug/?i=16929
- [39] = https://curl.se/bug/?i=16952
- [40] = https://curl.se/bug/?i=16946
- [41] = https://curl.se/bug/?i=16951
- [42] = https://curl.se/bug/?i=17001
- [43] = https://curl.se/bug/?i=16878
- [44] = https://curl.se/bug/?i=16950
- [45] = https://curl.se/bug/?i=16999
- [46] = https://curl.se/bug/?i=16922
- [47] = https://curl.se/bug/?i=16993
- [48] = https://curl.se/bug/?i=16991
- [49] = https://curl.se/bug/?i=16975
- [50] = https://curl.se/bug/?i=16963
- [51] = https://curl.se/bug/?i=16990
- [52] = https://curl.se/bug/?i=16744
- [53] = https://curl.se/bug/?i=16995
- [54] = https://curl.se/bug/?i=16983
- [55] = https://curl.se/bug/?i=16742
- [56] = https://curl.se/bug/?i=16987
- [57] = https://curl.se/bug/?i=16923
- [58] = https://curl.se/bug/?i=16825
- [59] = https://curl.se/bug/?i=17037
- [60] = https://curl.se/bug/?i=16986
- [61] = https://curl.se/bug/?i=17057
- [62] = https://curl.se/bug/?i=17036
- [63] = https://curl.se/bug/?i=17052
- [64] = https://curl.se/bug/?i=17092
- [65] = https://curl.se/bug/?i=17061
- [66] = https://curl.se/bug/?i=17062
- [67] = https://curl.se/bug/?i=17056
- [68] = https://curl.se/bug/?i=17055
- [69] = https://curl.se/bug/?i=17054
- [70] = https://curl.se/bug/?i=17087
- [71] = https://curl.se/bug/?i=17099
- [72] = https://curl.se/bug/?i=17047
- [73] = https://curl.se/bug/?i=16946
- [74] = https://curl.se/bug/?i=17042
- [75] = https://curl.se/bug/?i=17041
- [76] = https://curl.se/bug/?i=17325
- [77] = https://curl.se/bug/?i=17088
- [78] = https://curl.se/bug/?i=17039
- [79] = https://curl.se/bug/?i=17010
- [80] = https://curl.se/bug/?i=17020
- [81] = https://curl.se/bug/?i=17030
- [82] = https://curl.se/bug/?i=17025
- [83] = https://curl.se/bug/?i=17023
- [84] = https://curl.se/bug/?i=17028
- [85] = https://curl.se/bug/?i=17024
- [86] = https://curl.se/bug/?i=17176
- [87] = https://curl.se/bug/?i=17014
- [88] = https://curl.se/bug/?i=17012
- [89] = https://curl.se/bug/?i=17005
- [90] = https://curl.se/bug/?i=17083
- [91] = https://curl.se/bug/?i=16761
- [92] = https://curl.se/bug/?i=17015
- [93] = https://curl.se/bug/?i=17105
- [94] = https://curl.se/bug/?i=17220
- [95] = https://curl.se/bug/?i=17077
- [96] = https://curl.se/bug/?i=17027
- [97] = https://curl.se/bug/?i=17035
- [98] = https://curl.se/bug/?i=17112
- [99] = https://curl.se/bug/?i=16384
- [100] = https://curl.se/bug/?i=17050
- [101] = https://curl.se/bug/?i=17035
- [102] = https://curl.se/bug/?i=17106
- [103] = https://curl.se/bug/?i=17240
- [104] = https://curl.se/bug/?i=17172
- [105] = https://curl.se/bug/?i=17101
- [106] = https://curl.se/bug/?i=17091
- [107] = https://curl.se/bug/?i=17082
- [108] = https://curl.se/bug/?i=17217
- [109] = https://curl.se/bug/?i=17048
- [110] = https://curl.se/bug/?i=17143
- [111] = https://curl.se/bug/?i=17163
- [112] = https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103938
- [113] = https://curl.se/bug/?i=12982
- [114] = https://curl.se/bug/?i=17139
- [115] = https://curl.se/bug/?i=17165
- [116] = https://curl.se/bug/?i=17160
- [117] = https://curl.se/bug/?i=17233
- [118] = https://curl.se/bug/?i=17138
- [119] = https://curl.se/bug/?i=17159
- [120] = https://curl.se/bug/?i=17211
- [121] = https://curl.se/bug/?i=17231
- [122] = https://curl.se/bug/?i=17228
- [123] = https://curl.se/bug/?i=17147
- [124] = https://curl.se/bug/?i=17142
- [125] = https://curl.se/bug/?i=17140
- [126] = https://curl.se/bug/?i=17107
- [127] = https://curl.se/bug/?i=17209
- [128] = https://curl.se/bug/?i=17207
- [129] = https://curl.se/bug/?i=17206
- [130] = https://curl.se/bug/?i=17122
- [131] = https://curl.se/bug/?i=17354
- [132] = https://curl.se/bug/?i=17130
- [133] = https://curl.se/bug/?i=17199
- [134] = https://curl.se/bug/?i=17120
- [135] = https://curl.se/bug/?i=17113
- [136] = https://curl.se/bug/?i=17146
- [137] = https://curl.se/bug/?i=17204
- [138] = https://curl.se/bug/?i=17227
- [139] = https://curl.se/bug/?i=17203
- [140] = https://curl.se/bug/?i=17198
- [141] = https://curl.se/bug/?i=17221
- [142] = https://curl.se/bug/?i=17340
- [143] = https://curl.se/bug/?i=17177
- [144] = https://curl.se/bug/?i=17170
- [145] = https://curl.se/bug/?i=17308
- [146] = https://curl.se/bug/?i=17197
- [147] = https://curl.se/bug/?i=17196
- [148] = https://curl.se/bug/?i=17195
- [149] = https://curl.se/bug/?i=17188
- [150] = https://curl.se/bug/?i=17351
- [151] = https://curl.se/bug/?i=16581
- [152] = https://curl.se/bug/?i=17184
- [153] = https://curl.se/bug/?i=17186
- [154] = https://curl.se/bug/?i=17183
- [155] = https://curl.se/bug/?i=17179
- [156] = https://curl.se/bug/?i=17350
- [157] = https://curl.se/bug/?i=17289
- [158] = https://curl.se/bug/?i=17286
- [159] = https://curl.se/bug/?i=17347
- [160] = https://curl.se/bug/?i=17284
- [161] = https://curl.se/bug/?i=17306
- [162] = https://curl.se/bug/?i=17301
- [163] = https://curl.se/bug/?i=17281
- [164] = https://curl.se/bug/?i=17270
- [165] = https://curl.se/bug/?i=17371
- [166] = https://curl.se/bug/?i=17348
- [167] = https://curl.se/bug/?i=17275
- [168] = https://curl.se/bug/?i=17346
- [169] = https://curl.se/bug/?i=17274
- [170] = https://curl.se/bug/?i=17297
- [171] = https://curl.se/bug/?i=17268
- [172] = https://curl.se/bug/?i=17298
- [173] = https://curl.se/bug/?i=17397
- [174] = https://curl.se/bug/?i=17264
- [175] = https://curl.se/bug/?i=17263
- [176] = https://curl.se/bug/?i=17259
- [177] = https://curl.se/bug/?i=17373
- [178] = https://curl.se/bug/?i=17383
- [179] = https://curl.se/bug/?i=17258
- [180] = https://curl.se/bug/?i=17337
- [181] = https://curl.se/bug/?i=17330
- [182] = https://curl.se/bug/?i=17334
- [183] = https://curl.se/bug/?i=17331
- [184] = https://curl.se/bug/?i=17333
- [185] = https://curl.se/bug/?i=17328
- [186] = https://curl.se/bug/?i=17251
- [187] = https://curl.se/bug/?i=17247
- [188] = https://curl.se/bug/?i=17332
- [189] = https://curl.se/bug/?i=17329
- [190] = https://curl.se/bug/?i=17294
- [191] = https://curl.se/bug/?i=17256
- [192] = https://curl.se/bug/?i=17443
- [193] = https://curl.se/bug/?i=17364
- [194] = https://curl.se/bug/?i=17294
- [195] = https://curl.se/bug/?i=17321
- [196] = https://curl.se/bug/?i=17318
- [197] = https://curl.se/bug/?i=17317
- [198] = https://curl.se/bug/?i=17319
- [199] = https://curl.se/bug/?i=17316
- [200] = https://curl.se/bug/?i=17365
- [201] = https://curl.se/bug/?i=17359
- [202] = https://curl.se/bug/?i=17358
- [203] = https://curl.se/bug/?i=17361
- [204] = https://curl.se/bug/?i=17295
- [205] = https://curl.se/bug/?i=17441
- [206] = https://curl.se/bug/?i=17353
- [207] = https://curl.se/bug/?i=17394
- [208] = https://curl.se/bug/?i=17454
- [209] = https://curl.se/bug/?i=17455
- [211] = https://curl.se/bug/?i=17416
- [212] = https://curl.se/bug/?i=16829
- [213] = https://curl.se/bug/?i=17420
- [214] = https://curl.se/bug/?i=17380
- [215] = https://curl.se/bug/?i=17384
- [216] = https://curl.se/bug/?i=17379
- [217] = https://curl.se/bug/?i=17382
- [218] = https://curl.se/bug/?i=17381
- [219] = https://curl.se/bug/?i=17370
- [220] = https://curl.se/bug/?i=17430
- [222] = https://curl.se/bug/?i=17414
- [227] = https://curl.se/bug/?i=17415
- [232] = https://curl.se/bug/?i=17412
- [235] = https://curl.se/bug/?i=17407
- [240] = https://curl.se/bug/?i=17129
+ [1] = https://curl.se/bug/?i=17492
+ [2] = https://curl.se/bug/?i=17472
+ [3] = https://curl.se/bug/?i=17473
+ [4] = https://curl.se/bug/?i=17448
+ [5] = https://curl.se/bug/?i=17470
+ [6] = https://curl.se/bug/?i=17489
+ [7] = https://curl.se/bug/?i=17481
+ [8] = https://curl.se/bug/?i=17487
+ [9] = https://curl.se/bug/?i=17513
+ [10] = https://curl.se/bug/?i=17484
+ [11] = https://curl.se/bug/?i=17483
+ [12] = https://curl.se/bug/?i=17480
+ [13] = https://curl.se/bug/?i=17508
+ [14] = https://curl.se/bug/?i=16980
+ [15] = https://curl.se/bug/?i=17478
+ [16] = https://curl.se/bug/?i=17463
+ [17] = https://curl.se/bug/?i=17136
+ [18] = https://curl.se/bug/?i=17516
+ [19] = https://curl.se/bug/?i=17515
+ [20] = https://curl.se/bug/?i=17507
+ [21] = https://curl.se/bug/?i=17521
+ [22] = https://curl.se/bug/?i=17462
+ [23] = https://curl.se/bug/?i=17500
+ [24] = https://curl.se/bug/?i=17502
+ [25] = https://curl.se/bug/?i=17503
+ [26] = https://curl.se/bug/?i=17497
+ [27] = https://curl.se/bug/?i=17496
+ [28] = https://curl.se/bug/?i=17493
+ [29] = https://curl.se/bug/?i=17493
+ [30] = https://curl.se/bug/?i=17493
+ [31] = https://curl.se/bug/?i=17482
+ [32] = https://curl.se/bug/?i=17262
+ [33] = https://curl.se/bug/?i=17471
+ [34] = https://curl.se/bug/?i=17527
+ [35] = https://curl.se/bug/?i=17512
diff --git a/libs/libcurl/docs/THANKS b/libs/libcurl/docs/THANKS index ccb3b9cf23..81fb754f59 100644 --- a/libs/libcurl/docs/THANKS +++ b/libs/libcurl/docs/THANKS @@ -765,6 +765,7 @@ dekerser on github deliciouslytyped on github
delogicsreal on github
Demi Marie Obenour
+denandz on github
dengjfzh on github
Dengminwen
Denis Baručić
@@ -1662,6 +1663,7 @@ jvreelanda on github jvvprasad78 on github
jzinn on github
ka7 on github
+Kadambini Nema
Kael1117 on github
Kai Engert
Kailun Qin
@@ -3351,6 +3353,7 @@ XmiliaH on github xnynx on github
xtonik on github
xwxbug on github
+x-xiang on github
XYenon
Yaakov Selkowitz
Yadhu Krishna M
@@ -3387,6 +3390,7 @@ Yuriy Sosov yushicheng7788 on github
Yusuke Nakamura
Yu Xin
+Yuyi Wang
Yves Arrouye
Yves Lejeune
YX Hao
diff --git a/libs/libcurl/include/curl/curl.h b/libs/libcurl/include/curl/curl.h index 9a895c0039..039f688be8 100644 --- a/libs/libcurl/include/curl/curl.h +++ b/libs/libcurl/include/curl/curl.h @@ -2813,17 +2813,17 @@ struct curl_slist { * *before* curl_global_init().
*
* The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The
- * backend can also be specified via the name parameter (passing -1 as id).
- * If both id and name are specified, the name will be ignored. If neither id
- * nor name are specified, the function will fail with
- * CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the
- * NULL-terminated list of available backends.
+ * backend can also be specified via the name parameter (passing -1 as id). If
+ * both id and name are specified, the name will be ignored. If neither id nor
+ * name are specified, the function will fail with CURLSSLSET_UNKNOWN_BACKEND
+ * and set the "avail" pointer to the NULL-terminated list of available
+ * backends.
*
* Upon success, the function returns CURLSSLSET_OK.
*
* If the specified SSL backend is not available, the function returns
- * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated
- * list of available SSL backends.
+ * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a
+ * NULL-terminated list of available SSL backends.
*
* The SSL backend can be set only once. If it has already been set, a
* subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
diff --git a/libs/libcurl/include/curl/curlver.h b/libs/libcurl/include/curl/curlver.h index 293867e3a7..1514abefb2 100644 --- a/libs/libcurl/include/curl/curlver.h +++ b/libs/libcurl/include/curl/curlver.h @@ -32,13 +32,13 @@ /* This is the version number of the libcurl package from which this header
file origins: */
-#define LIBCURL_VERSION "8.14.0"
+#define LIBCURL_VERSION "8.14.1"
/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 8
#define LIBCURL_VERSION_MINOR 14
-#define LIBCURL_VERSION_PATCH 0
+#define LIBCURL_VERSION_PATCH 1
/* This is the numeric version of the libcurl version number, meant for easier
parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will
@@ -59,7 +59,7 @@ CURL_VERSION_BITS() macro since curl's own configure script greps for it
and needs it to contain the full number.
*/
-#define LIBCURL_VERSION_NUM 0x080e00
+#define LIBCURL_VERSION_NUM 0x080e01
/*
* This is the date and time when the full source package was created. The
@@ -70,7 +70,7 @@ *
* "2007-11-23"
*/
-#define LIBCURL_TIMESTAMP "2025-05-28"
+#define LIBCURL_TIMESTAMP "2025-06-04"
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
#define CURL_AT_LEAST_VERSION(x,y,z) \
diff --git a/libs/libcurl/include/curl/typecheck-gcc.h b/libs/libcurl/include/curl/typecheck-gcc.h index 804ac2585c..4ef2b2f3ad 100644 --- a/libs/libcurl/include/curl/typecheck-gcc.h +++ b/libs/libcurl/include/curl/typecheck-gcc.h @@ -178,7 +178,7 @@ _curl_easy_getinfo_err_curl_slist(); \
if(curlcheck_tlssessioninfo_info(info)) \
if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \
- _curl_easy_getinfo_err_curl_tlssesssioninfo(); \
+ _curl_easy_getinfo_err_curl_tlssessioninfo(); \
if(curlcheck_certinfo_info(info)) \
if(!curlcheck_arr((arg), struct curl_certinfo *)) \
_curl_easy_getinfo_err_curl_certinfo(); \
@@ -295,7 +295,7 @@ CURLWARNING(_curl_easy_getinfo_err_double, "curl_easy_getinfo expects a pointer to double")
CURLWARNING(_curl_easy_getinfo_err_curl_slist,
"curl_easy_getinfo expects a pointer to 'struct curl_slist *'")
-CURLWARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo,
+CURLWARNING(_curl_easy_getinfo_err_curl_tlssessioninfo,
"curl_easy_getinfo expects a pointer to "
"'struct curl_tlssessioninfo *'")
CURLWARNING(_curl_easy_getinfo_err_curl_certinfo,
diff --git a/libs/libcurl/src/CMakeLists.txt b/libs/libcurl/src/CMakeLists.txt index 83af0375c7..e37b62b031 100644 --- a/libs/libcurl/src/CMakeLists.txt +++ b/libs/libcurl/src/CMakeLists.txt @@ -179,15 +179,8 @@ if(BUILD_SHARED_LIBS) list(APPEND libcurl_export ${LIB_SHARED})
add_library(${LIB_SHARED} SHARED ${LIB_SOURCE})
add_library(${PROJECT_NAME}::${LIB_SHARED} ALIAS ${LIB_SHARED})
- if(WIN32 OR CYGWIN)
- if(CYGWIN)
- # For Cygwin always compile dllmain.c as a separate unit since it
- # includes windows.h, which should not be included in other units.
- set_source_files_properties("dllmain.c" PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
- endif()
- set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES "dllmain.c")
- endif()
if(WIN32)
+ set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES "dllmain.c")
set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES "libcurl.rc")
if(CURL_HIDES_PRIVATE_SYMBOLS)
set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES "${PROJECT_SOURCE_DIR}/lib/libcurl.def")
diff --git a/libs/libcurl/src/Makefile.am b/libs/libcurl/src/Makefile.am index 29cc31dfab..c91619fd6e 100644 --- a/libs/libcurl/src/Makefile.am +++ b/libs/libcurl/src/Makefile.am @@ -74,10 +74,6 @@ include Makefile.inc if DOING_NATIVE_WINDOWS
CSOURCES += dllmain.c
-else
-if DOING_CYGWIN
-CSOURCES += dllmain.c
-endif
endif
if USE_UNITY
@@ -89,11 +85,6 @@ if CURLDEBUG # applying to it.
curl_EXCLUDE += memdebug.c
endif
-# For Cygwin always compile dllmain.c as a separate unit since it
-# includes windows.h, which should not be included in other units.
-if DOING_CYGWIN
-curl_EXCLUDE += dllmain.c
-endif
libcurl_unity.c: $(top_srcdir)/scripts/mk-unity.pl $(CSOURCES)
@PERL@ $(top_srcdir)/scripts/mk-unity.pl $(srcdir) $(CSOURCES) --exclude $(curl_EXCLUDE) > libcurl_unity.c
diff --git a/libs/libcurl/src/Makefile.in b/libs/libcurl/src/Makefile.in index bbd7e6c17c..b019dc913c 100644 --- a/libs/libcurl/src/Makefile.in +++ b/libs/libcurl/src/Makefile.in @@ -141,24 +141,20 @@ host_triplet = @host@ # Makefile.inc provides the CSOURCES and HHEADERS defines
@DOING_NATIVE_WINDOWS_TRUE@am__append_3 = dllmain.c
-@DOING_CYGWIN_TRUE@@DOING_NATIVE_WINDOWS_FALSE@am__append_4 = dllmain.c
# We must compile this source separately to avoid memdebug.h redefinitions
# applying to it.
-@CURLDEBUG_TRUE@@USE_UNITY_TRUE@am__append_5 = memdebug.c
-# For Cygwin always compile dllmain.c as a separate unit since it
-# includes windows.h, which should not be included in other units.
-@DOING_CYGWIN_TRUE@@USE_UNITY_TRUE@am__append_6 = dllmain.c
-@CURL_LT_SHLIB_USE_VERSION_INFO_TRUE@am__append_7 = $(VERSIONINFO)
-@CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE@am__append_8 = -no-undefined
-@CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE@am__append_9 = -mimpure-text
-@CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE@am__append_10 = -Wl,--version-script=libcurl.vers
+@CURLDEBUG_TRUE@@USE_UNITY_TRUE@am__append_4 = memdebug.c
+@CURL_LT_SHLIB_USE_VERSION_INFO_TRUE@am__append_5 = $(VERSIONINFO)
+@CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE@am__append_6 = -no-undefined
+@CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE@am__append_7 = -mimpure-text
+@CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE@am__append_8 = -Wl,--version-script=libcurl.vers
# if symbol-hiding is enabled, hide them!
-@CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE@@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_11 = -export-symbols-regex '^curl_.*'
-@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_12 = -DCURL_STATICLIB
-@HAVE_WINDRES_TRUE@@USE_CPPFLAG_CURL_STATICLIB_FALSE@am__append_13 = $(LIB_RCFILES)
-@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_14 = -DCURL_HIDDEN_SYMBOLS
-@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_15 = $(CFLAG_CURL_SYMBOL_HIDING)
-@CURL_WERROR_TRUE@am__append_16 = --warnings-as-errors=*
+@CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE@@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_9 = -export-symbols-regex '^curl_.*'
+@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_10 = -DCURL_STATICLIB
+@HAVE_WINDRES_TRUE@@USE_CPPFLAG_CURL_STATICLIB_FALSE@am__append_11 = $(LIB_RCFILES)
+@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_12 = -DCURL_HIDDEN_SYMBOLS
+@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_13 = $(CFLAG_CURL_SYMBOL_HIDING)
+@CURL_WERROR_TRUE@am__append_14 = --warnings-as-errors=*
subdir = lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/curl-amissl.m4 \
@@ -388,27 +384,23 @@ am__objects_6 = curlx/libcurl_la-base64.lo curlx/libcurl_la-dynbuf.lo \ curlx/libcurl_la-version_win32.lo curlx/libcurl_la-warnless.lo \
curlx/libcurl_la-winapi.lo
@DOING_NATIVE_WINDOWS_TRUE@am__objects_7 = libcurl_la-dllmain.lo
-@DOING_CYGWIN_TRUE@@DOING_NATIVE_WINDOWS_FALSE@am__objects_8 = libcurl_la-dllmain.lo
-am__objects_9 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+am__objects_8 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
$(am__objects_4) $(am__objects_5) $(am__objects_6) \
- $(am__objects_7) $(am__objects_8)
-am__objects_10 =
-am__objects_11 = $(am__objects_10) $(am__objects_10) $(am__objects_10) \
- $(am__objects_10) $(am__objects_10) $(am__objects_10)
-am__objects_12 = libcurl.lo
-@HAVE_WINDRES_TRUE@@USE_CPPFLAG_CURL_STATICLIB_FALSE@am__objects_13 = $(am__objects_12)
-@CURLDEBUG_TRUE@@USE_UNITY_TRUE@am__objects_14 = \
+ $(am__objects_7)
+am__objects_9 =
+am__objects_10 = $(am__objects_9) $(am__objects_9) $(am__objects_9) \
+ $(am__objects_9) $(am__objects_9) $(am__objects_9)
+am__objects_11 = libcurl.lo
+@HAVE_WINDRES_TRUE@@USE_CPPFLAG_CURL_STATICLIB_FALSE@am__objects_12 = $(am__objects_11)
+@CURLDEBUG_TRUE@@USE_UNITY_TRUE@am__objects_13 = \
@CURLDEBUG_TRUE@@USE_UNITY_TRUE@ libcurl_la-memdebug.lo
-@DOING_CYGWIN_TRUE@@USE_UNITY_TRUE@am__objects_15 = \
-@DOING_CYGWIN_TRUE@@USE_UNITY_TRUE@ libcurl_la-dllmain.lo
-@USE_UNITY_TRUE@am__objects_16 = libcurl_la-curl_threads.lo \
+@USE_UNITY_TRUE@am__objects_14 = libcurl_la-curl_threads.lo \
@USE_UNITY_TRUE@ curlx/libcurl_la-timediff.lo \
-@USE_UNITY_TRUE@ curlx/libcurl_la-warnless.lo $(am__objects_14) \
-@USE_UNITY_TRUE@ $(am__objects_15)
-@USE_UNITY_FALSE@am_libcurl_la_OBJECTS = $(am__objects_9) \
-@USE_UNITY_FALSE@ $(am__objects_11) $(am__objects_13)
-@USE_UNITY_TRUE@am_libcurl_la_OBJECTS = $(am__objects_16) \
-@USE_UNITY_TRUE@ $(am__objects_13)
+@USE_UNITY_TRUE@ curlx/libcurl_la-warnless.lo $(am__objects_13)
+@USE_UNITY_FALSE@am_libcurl_la_OBJECTS = $(am__objects_8) \
+@USE_UNITY_FALSE@ $(am__objects_10) $(am__objects_12)
+@USE_UNITY_TRUE@am_libcurl_la_OBJECTS = $(am__objects_14) \
+@USE_UNITY_TRUE@ $(am__objects_12)
@USE_UNITY_TRUE@nodist_libcurl_la_OBJECTS = \
@USE_UNITY_TRUE@ libcurl_la-libcurl_unity.lo
libcurl_la_OBJECTS = $(am_libcurl_la_OBJECTS) \
@@ -500,7 +492,7 @@ am__libcurlu_la_SOURCES_DIST = altsvc.c amigaos.c asyn-ares.c \ curlx/multibyte.h curlx/nonblock.h curlx/strparse.h \
curlx/timediff.h curlx/timeval.h curlx/version_win32.h \
curlx/warnless.h curlx/winapi.h
-am__objects_17 = libcurlu_la-altsvc.lo libcurlu_la-amigaos.lo \
+am__objects_15 = libcurlu_la-altsvc.lo libcurlu_la-amigaos.lo \
libcurlu_la-asyn-ares.lo libcurlu_la-asyn-base.lo \
libcurlu_la-asyn-thrdd.lo libcurlu_la-bufq.lo \
libcurlu_la-bufref.lo libcurlu_la-cf-h1-proxy.lo \
@@ -559,7 +551,7 @@ am__objects_17 = libcurlu_la-altsvc.lo libcurlu_la-amigaos.lo \ libcurlu_la-uint-hash.lo libcurlu_la-uint-spbset.lo \
libcurlu_la-uint-table.lo libcurlu_la-url.lo \
libcurlu_la-urlapi.lo libcurlu_la-version.lo libcurlu_la-ws.lo
-am__objects_18 = vauth/libcurlu_la-cleartext.lo \
+am__objects_16 = vauth/libcurlu_la-cleartext.lo \
vauth/libcurlu_la-cram.lo vauth/libcurlu_la-digest.lo \
vauth/libcurlu_la-digest_sspi.lo vauth/libcurlu_la-gsasl.lo \
vauth/libcurlu_la-krb5_gssapi.lo \
@@ -567,7 +559,7 @@ am__objects_18 = vauth/libcurlu_la-cleartext.lo \ vauth/libcurlu_la-ntlm_sspi.lo vauth/libcurlu_la-oauth2.lo \
vauth/libcurlu_la-spnego_gssapi.lo \
vauth/libcurlu_la-spnego_sspi.lo vauth/libcurlu_la-vauth.lo
-am__objects_19 = vtls/libcurlu_la-bearssl.lo \
+am__objects_17 = vtls/libcurlu_la-bearssl.lo \
vtls/libcurlu_la-cipher_suite.lo vtls/libcurlu_la-gtls.lo \
vtls/libcurlu_la-hostcheck.lo vtls/libcurlu_la-keylog.lo \
vtls/libcurlu_la-mbedtls.lo \
@@ -578,37 +570,34 @@ am__objects_19 = vtls/libcurlu_la-bearssl.lo \ vtls/libcurlu_la-sectransp.lo vtls/libcurlu_la-vtls.lo \
vtls/libcurlu_la-vtls_scache.lo vtls/libcurlu_la-vtls_spack.lo \
vtls/libcurlu_la-wolfssl.lo vtls/libcurlu_la-x509asn1.lo
-am__objects_20 = vquic/libcurlu_la-curl_msh3.lo \
+am__objects_18 = vquic/libcurlu_la-curl_msh3.lo \
vquic/libcurlu_la-curl_ngtcp2.lo \
vquic/libcurlu_la-curl_osslq.lo \
vquic/libcurlu_la-curl_quiche.lo vquic/libcurlu_la-vquic.lo \
vquic/libcurlu_la-vquic-tls.lo
-am__objects_21 = vssh/libcurlu_la-libssh.lo \
+am__objects_19 = vssh/libcurlu_la-libssh.lo \
vssh/libcurlu_la-libssh2.lo vssh/libcurlu_la-curl_path.lo \
vssh/libcurlu_la-wolfssh.lo
-am__objects_22 = curlx/libcurlu_la-base64.lo \
+am__objects_20 = curlx/libcurlu_la-base64.lo \
curlx/libcurlu_la-dynbuf.lo curlx/libcurlu_la-inet_pton.lo \
curlx/libcurlu_la-multibyte.lo curlx/libcurlu_la-nonblock.lo \
curlx/libcurlu_la-strparse.lo curlx/libcurlu_la-timediff.lo \
curlx/libcurlu_la-timeval.lo \
curlx/libcurlu_la-version_win32.lo \
curlx/libcurlu_la-warnless.lo curlx/libcurlu_la-winapi.lo
-@DOING_NATIVE_WINDOWS_TRUE@am__objects_23 = libcurlu_la-dllmain.lo
-@DOING_CYGWIN_TRUE@@DOING_NATIVE_WINDOWS_FALSE@am__objects_24 = libcurlu_la-dllmain.lo
-am__objects_25 = $(am__objects_17) $(am__objects_18) $(am__objects_19) \
- $(am__objects_20) $(am__objects_21) $(am__objects_22) \
- $(am__objects_23) $(am__objects_24)
-@CURLDEBUG_TRUE@@USE_UNITY_TRUE@am__objects_26 = \
+@DOING_NATIVE_WINDOWS_TRUE@am__objects_21 = libcurlu_la-dllmain.lo
+am__objects_22 = $(am__objects_15) $(am__objects_16) $(am__objects_17) \
+ $(am__objects_18) $(am__objects_19) $(am__objects_20) \
+ $(am__objects_21)
+@CURLDEBUG_TRUE@@USE_UNITY_TRUE@am__objects_23 = \
@CURLDEBUG_TRUE@@USE_UNITY_TRUE@ libcurlu_la-memdebug.lo
-@DOING_CYGWIN_TRUE@@USE_UNITY_TRUE@am__objects_27 = \
-@DOING_CYGWIN_TRUE@@USE_UNITY_TRUE@ libcurlu_la-dllmain.lo
-@USE_UNITY_TRUE@am__objects_28 = libcurlu_la-curl_threads.lo \
+@USE_UNITY_TRUE@am__objects_24 = libcurlu_la-curl_threads.lo \
@USE_UNITY_TRUE@ curlx/libcurlu_la-timediff.lo \
@USE_UNITY_TRUE@ curlx/libcurlu_la-warnless.lo \
-@USE_UNITY_TRUE@ $(am__objects_26) $(am__objects_27)
-@USE_UNITY_FALSE@am_libcurlu_la_OBJECTS = $(am__objects_25) \
-@USE_UNITY_FALSE@ $(am__objects_11)
-@USE_UNITY_TRUE@am_libcurlu_la_OBJECTS = $(am__objects_28)
+@USE_UNITY_TRUE@ $(am__objects_23)
+@USE_UNITY_FALSE@am_libcurlu_la_OBJECTS = $(am__objects_22) \
+@USE_UNITY_FALSE@ $(am__objects_10)
+@USE_UNITY_TRUE@am_libcurlu_la_OBJECTS = $(am__objects_24)
@USE_UNITY_TRUE@nodist_libcurlu_la_OBJECTS = \
@USE_UNITY_TRUE@ libcurlu_la-libcurl_unity.lo
libcurlu_la_OBJECTS = $(am_libcurlu_la_OBJECTS) \
@@ -1642,7 +1631,7 @@ LIB_HFILES = \ LIB_RCFILES = libcurl.rc
CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) \
$(LIB_VQUIC_CFILES) $(LIB_VSSH_CFILES) $(LIB_CURLX_CFILES) \
- $(am__append_3) $(am__append_4)
+ $(am__append_3)
HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) \
$(LIB_VQUIC_HFILES) $(LIB_VSSH_HFILES) $(LIB_CURLX_HFILES)
@@ -1650,20 +1639,19 @@ HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) \ # Keep these separate to avoid duplicate definitions when linking libtests
# in static mode.
@USE_UNITY_TRUE@curl_EXCLUDE = curl_threads.c curlx/timediff.c \
-@USE_UNITY_TRUE@ curlx/warnless.c $(am__append_5) \
-@USE_UNITY_TRUE@ $(am__append_6)
+@USE_UNITY_TRUE@ curlx/warnless.c $(am__append_4)
@USE_UNITY_TRUE@nodist_libcurl_la_SOURCES = libcurl_unity.c
@USE_UNITY_FALSE@libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS) \
-@USE_UNITY_FALSE@ $(am__append_13)
-@USE_UNITY_TRUE@libcurl_la_SOURCES = $(curl_EXCLUDE) $(am__append_13)
+@USE_UNITY_FALSE@ $(am__append_11)
+@USE_UNITY_TRUE@libcurl_la_SOURCES = $(curl_EXCLUDE) $(am__append_11)
@USE_UNITY_TRUE@nodist_libcurlu_la_SOURCES = libcurl_unity.c
@USE_UNITY_FALSE@libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
@USE_UNITY_TRUE@libcurlu_la_SOURCES = $(curl_EXCLUDE)
@USE_UNITY_TRUE@CLEANFILES = libcurl_unity.c
-libcurl_la_CPPFLAGS_EXTRA = $(am__append_12) $(am__append_14)
-libcurl_la_LDFLAGS_EXTRA = $(am__append_7) $(am__append_8) \
- $(am__append_9) $(am__append_10) $(am__append_11)
-libcurl_la_CFLAGS_EXTRA = $(am__append_15)
+libcurl_la_CPPFLAGS_EXTRA = $(am__append_10) $(am__append_12)
+libcurl_la_LDFLAGS_EXTRA = $(am__append_5) $(am__append_6) \
+ $(am__append_7) $(am__append_8) $(am__append_9)
+libcurl_la_CFLAGS_EXTRA = $(am__append_13)
libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(CURL_LDFLAGS_LIB) $(LIBCURL_PC_LIBS_PRIVATE)
libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
@@ -1677,7 +1665,7 @@ CS_ = $(CS_0) # disable the tests that are mostly causing false positives
TIDYFLAGS := -checks=-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling \
- -quiet $(am__append_16)
+ -quiet $(am__append_14)
TIDY := clang-tidy
all: curl_config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/libs/libcurl/src/altsvc.c b/libs/libcurl/src/altsvc.c index fd568742bb..599fb5a5e5 100644 --- a/libs/libcurl/src/altsvc.c +++ b/libs/libcurl/src/altsvc.c @@ -190,7 +190,7 @@ static CURLcode altsvc_add(struct altsvcinfo *asi, const char *line) char dbuf[MAX_ALTSVC_DATELEN + 1];
time_t expires;
- /* The date parser works on a null terminated string. The maximum length
+ /* The date parser works on a null-terminated string. The maximum length
is upheld by curlx_str_quotedword(). */
memcpy(dbuf, curlx_str(&date), curlx_strlen(&date));
dbuf[curlx_strlen(&date)] = 0;
diff --git a/libs/libcurl/src/asyn-thrdd.c b/libs/libcurl/src/asyn-thrdd.c index f0495a7d2e..3911ea0e01 100644 --- a/libs/libcurl/src/asyn-thrdd.c +++ b/libs/libcurl/src/asyn-thrdd.c @@ -595,16 +595,15 @@ CURLcode Curl_async_is_resolved(struct Curl_easy *data, if(!result) {
struct Curl_https_rrinfo *lhrr;
lhrr = Curl_httpsrr_dup_move(&thrdd->rr.hinfo);
- if(!lhrr) {
- async_thrdd_destroy(data);
- return CURLE_OUT_OF_MEMORY;
- }
- data->state.async.dns->hinfo = lhrr;
+ if(!lhrr)
+ result = CURLE_OUT_OF_MEMORY;
+ else
+ data->state.async.dns->hinfo = lhrr;
}
}
#endif
- if(!result && data->state.async.dns)
- result = Curl_dnscache_add(data, data->state.async.dns);
+ if(!result && data->state.async.dns)
+ result = Curl_dnscache_add(data, data->state.async.dns);
}
if(!result && !data->state.async.dns)
diff --git a/libs/libcurl/src/cf-https-connect.c b/libs/libcurl/src/cf-https-connect.c index c66bcba2b2..49b3332cac 100644 --- a/libs/libcurl/src/cf-https-connect.c +++ b/libs/libcurl/src/cf-https-connect.c @@ -658,7 +658,7 @@ CURLcode Curl_cf_https_setup(struct Curl_easy *data, if(conn->bits.tls_enable_alpn) {
#ifdef USE_HTTPSRR
- /* Is there a HTTPSRR use its ALPNs here.
+ /* Is there an HTTPSRR use its ALPNs here.
* We are here after having selected a connection to a host+port and
* can no longer change that. Any HTTPSRR advice for other hosts and ports
* we need to ignore. */
diff --git a/libs/libcurl/src/cfilters.c b/libs/libcurl/src/cfilters.c index 5dd3271f20..43a5e004eb 100644 --- a/libs/libcurl/src/cfilters.c +++ b/libs/libcurl/src/cfilters.c @@ -497,6 +497,11 @@ out: return result;
}
+bool Curl_conn_is_setup(struct connectdata *conn, int sockindex)
+{
+ return (conn->cfilter[sockindex] != NULL);
+}
+
bool Curl_conn_is_connected(struct connectdata *conn, int sockindex)
{
struct Curl_cfilter *cf;
diff --git a/libs/libcurl/src/cfilters.h b/libs/libcurl/src/cfilters.h index e93bca96a8..9da69327aa 100644 --- a/libs/libcurl/src/cfilters.h +++ b/libs/libcurl/src/cfilters.h @@ -371,6 +371,11 @@ CURLcode Curl_conn_connect(struct Curl_easy *data, int sockindex, bool blocking, bool *done);
/**
+ * Check if a filter chain at `sockindex` for connection `conn` exists.
+ */
+bool Curl_conn_is_setup(struct connectdata *conn, int sockindex);
+
+/**
* Check if the filter chain at `sockindex` for connection `conn` is
* completely connected.
*/
diff --git a/libs/libcurl/src/config-win32.h b/libs/libcurl/src/config-win32.h index 9ec03e3294..03d7ed2f40 100644 --- a/libs/libcurl/src/config-win32.h +++ b/libs/libcurl/src/config-win32.h @@ -159,10 +159,6 @@ /* Define if you have the select function. */
#define HAVE_SELECT 1
-/* Define if libSSH2 is in use */
-#define USE_LIBSSH2 1
-#define HAVE_LIBSSH2_H 1
-
#ifndef UNDER_CE
/* Define if you have the setlocale function. */
#define HAVE_SETLOCALE 1
@@ -229,9 +225,9 @@ /* Vista */
#if (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600) && !defined(UNDER_CE)
-/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
+/* Define to 1 if you have an IPv6 capable working inet_ntop function. */
#define HAVE_INET_NTOP 1
-/* Define to 1 if you have a IPv6 capable working inet_pton function. */
+/* Define to 1 if you have an IPv6 capable working inet_pton function. */
#define HAVE_INET_PTON 1
#endif
@@ -457,9 +453,6 @@ Vista #define USE_WIN32_LDAP 1
#endif
-/* if SSL is enabled */
-#define USE_OPENSSL 1
-
/* Define to use the Windows crypto library. */
#ifndef CURL_WINDOWS_UWP
#define USE_WIN32_CRYPTO
diff --git a/libs/libcurl/src/curl_addrinfo.c b/libs/libcurl/src/curl_addrinfo.c index 98b02d3050..f169932275 100644 --- a/libs/libcurl/src/curl_addrinfo.c +++ b/libs/libcurl/src/curl_addrinfo.c @@ -218,7 +218,7 @@ Curl_getaddrinfo_ex(const char *nodename, *
* This function returns a pointer to the first element of a newly allocated
* Curl_addrinfo struct linked list filled with the data of a given hostent.
- * Curl_addrinfo is meant to work like the addrinfo struct does for a IPv6
+ * Curl_addrinfo is meant to work like the addrinfo struct does for an IPv6
* stack, but usable also for IPv4, all hosts and environments.
*
* The memory allocated by this function *MUST* be free'd later on calling
@@ -468,7 +468,7 @@ struct Curl_addrinfo *Curl_unix2addr(const char *path, bool *longpath, sa_un = (void *) ai->ai_addr;
sa_un->sun_family = AF_UNIX;
- /* sun_path must be able to store the NUL-terminated path */
+ /* sun_path must be able to store the null-terminated path */
path_len = strlen(path) + 1;
if(path_len > sizeof(sa_un->sun_path)) {
free(ai);
diff --git a/libs/libcurl/src/curl_config.h.cmake b/libs/libcurl/src/curl_config.h.cmake index 57af226987..bc10b15ee9 100644 --- a/libs/libcurl/src/curl_config.h.cmake +++ b/libs/libcurl/src/curl_config.h.cmake @@ -327,10 +327,10 @@ /* Define to 1 if you have the <ifaddrs.h> header file. */
#cmakedefine HAVE_IFADDRS_H 1
-/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
+/* Define to 1 if you have an IPv6 capable working inet_ntop function. */
#cmakedefine HAVE_INET_NTOP 1
-/* Define to 1 if you have a IPv6 capable working inet_pton function. */
+/* Define to 1 if you have an IPv6 capable working inet_pton function. */
#cmakedefine HAVE_INET_PTON 1
/* Define to 1 if symbol `sa_family_t' exists */
diff --git a/libs/libcurl/src/curl_config.h.in b/libs/libcurl/src/curl_config.h.in index e540b6d005..ff6927a35f 100644 --- a/libs/libcurl/src/curl_config.h.in +++ b/libs/libcurl/src/curl_config.h.in @@ -336,10 +336,10 @@ /* Define to 1 if you have the `if_nametoindex' function. */
#undef HAVE_IF_NAMETOINDEX
-/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
+/* Define to 1 if you have an IPv6 capable working inet_ntop function. */
#undef HAVE_INET_NTOP
-/* Define to 1 if you have a IPv6 capable working inet_pton function. */
+/* Define to 1 if you have an IPv6 capable working inet_pton function. */
#undef HAVE_INET_PTON
/* Define to 1 if you have the <inttypes.h> header file. */
diff --git a/libs/libcurl/src/curl_setup.h b/libs/libcurl/src/curl_setup.h index 7fd1a98f9a..a69b222044 100644 --- a/libs/libcurl/src/curl_setup.h +++ b/libs/libcurl/src/curl_setup.h @@ -105,6 +105,16 @@ # ifndef NOGDI
# define NOGDI
# endif
+/* Detect Windows App environment which has a restricted access
+ * to the Win32 APIs. */
+# if (defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)) || \
+ defined(WINAPI_FAMILY)
+# include <winapifamily.h>
+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+# define CURL_WINDOWS_UWP
+# endif
+# endif
#endif
/* Avoid bogus format check warnings with mingw32ce gcc 4.4.0 in
diff --git a/libs/libcurl/src/curl_sspi.c b/libs/libcurl/src/curl_sspi.c index ddfa8e8525..3bfd85e00d 100644 --- a/libs/libcurl/src/curl_sspi.c +++ b/libs/libcurl/src/curl_sspi.c @@ -129,7 +129,7 @@ void Curl_sspi_global_cleanup(void) /*
* Curl_create_sspi_identity()
*
- * This is used to populate a SSPI identity structure based on the supplied
+ * This is used to populate an SSPI identity structure based on the supplied
* username and password.
*
* Parameters:
@@ -221,7 +221,7 @@ CURLcode Curl_create_sspi_identity(const char *userp, const char *passwdp, /*
* Curl_sspi_free_identity()
*
- * This is used to free the contents of a SSPI identifier structure.
+ * This is used to free the contents of an SSPI identifier structure.
*
* Parameters:
*
diff --git a/libs/libcurl/src/curl_sspi.h b/libs/libcurl/src/curl_sspi.h index 6d72774862..0a4c2c10e5 100644 --- a/libs/libcurl/src/curl_sspi.h +++ b/libs/libcurl/src/curl_sspi.h @@ -45,7 +45,7 @@ CURLcode Curl_sspi_global_init(void);
void Curl_sspi_global_cleanup(void);
-/* This is used to populate the domain in a SSPI identity structure */
+/* This is used to populate the domain in an SSPI identity structure */
CURLcode Curl_override_sspi_http_realm(const char *chlg,
SEC_WINNT_AUTH_IDENTITY *identity);
diff --git a/libs/libcurl/src/curlx/base64.c b/libs/libcurl/src/curlx/base64.c index 5396eba41a..d988cc8e08 100644 --- a/libs/libcurl/src/curlx/base64.c +++ b/libs/libcurl/src/curlx/base64.c @@ -61,9 +61,9 @@ static const unsigned char decodetable[] = /*
* curlx_base64_decode()
*
- * Given a base64 NUL-terminated string at src, decode it and return a
- * pointer in *outptr to a newly allocated memory area holding decoded
- * data. Size of decoded data is returned in variable pointed by outlen.
+ * Given a base64 null-terminated string at src, decode it and return a
+ * pointer in *outptr to a newly allocated memory area holding decoded data.
+ * Size of decoded data is returned in variable pointed by outlen.
*
* Returns CURLE_OK on success, otherwise specific error code. Function
* output shall not be considered valid unless CURLE_OK is returned.
@@ -247,7 +247,7 @@ static CURLcode base64_encode(const char *table64, * encoded data. Size of encoded data is returned in variable pointed by
* outlen.
*
- * Input length of 0 indicates input buffer holds a NUL-terminated string.
+ * Input length of 0 indicates input buffer holds a null-terminated string.
*
* Returns CURLE_OK on success, otherwise specific error code. Function
* output shall not be considered valid unless CURLE_OK is returned.
@@ -269,7 +269,7 @@ CURLcode curlx_base64_encode(const char *inputbuff, size_t insize, * encoded data. Size of encoded data is returned in variable pointed by
* outlen.
*
- * Input length of 0 indicates input buffer holds a NUL-terminated string.
+ * Input length of 0 indicates input buffer holds a null-terminated string.
*
* Returns CURLE_OK on success, otherwise specific error code. Function
* output shall not be considered valid unless CURLE_OK is returned.
diff --git a/libs/libcurl/src/dllmain.c b/libs/libcurl/src/dllmain.c index ad064c8b9d..2507cf8c47 100644 --- a/libs/libcurl/src/dllmain.c +++ b/libs/libcurl/src/dllmain.c @@ -28,22 +28,13 @@ #include <openssl/crypto.h>
#endif
-/* The fourth-to-last include */
-#ifdef __CYGWIN__
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#ifdef _WIN32
-#undef _WIN32
-#endif
-#endif
-
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
-/* DllMain() must only be defined for Windows and Cygwin DLL builds. */
-#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(CURL_STATICLIB)
+/* DllMain() must only be defined for Windows DLL builds. */
+#if defined(_WIN32) && !defined(CURL_STATICLIB)
#if defined(USE_OPENSSL) && \
!defined(OPENSSL_IS_AWSLC) && \
diff --git a/libs/libcurl/src/doh.c b/libs/libcurl/src/doh.c index 693d96bc0f..5f9ede520d 100644 --- a/libs/libcurl/src/doh.c +++ b/libs/libcurl/src/doh.c @@ -921,7 +921,7 @@ static void doh_show(struct Curl_easy *data, * This function returns a pointer to the first element of a newly allocated
* Curl_addrinfo struct linked list filled with the data from a set of DoH
* lookups. Curl_addrinfo is meant to work like the addrinfo struct does for
- * a IPv6 stack, but usable also for IPv4, all hosts and environments.
+ * an IPv6 stack, but usable also for IPv4, all hosts and environments.
*
* The memory allocated by this function *MUST* be free'd later on calling
* Curl_freeaddrinfo(). For each successful call to this function there
diff --git a/libs/libcurl/src/dynhds.h b/libs/libcurl/src/dynhds.h index aab4bfc375..3b95934b11 100644 --- a/libs/libcurl/src/dynhds.h +++ b/libs/libcurl/src/dynhds.h @@ -32,7 +32,7 @@ struct dynbuf; /**
* A single header entry.
- * `name` and `value` are non-NULL and always NUL terminated.
+ * `name` and `value` are non-NULL and always null-terminated.
*/
struct dynhds_entry {
char *name;
@@ -113,7 +113,7 @@ size_t Curl_dynhds_count_name(struct dynhds *dynhds, const char *name, size_t namelen);
/**
- * Return how often the given 0-terminated name appears in `dynhds`.
+ * Return how often the given null-terminated name appears in `dynhds`.
* Names are case-insensitive.
*/
size_t Curl_dynhds_ccount_name(struct dynhds *dynhds, const char *name);
diff --git a/libs/libcurl/src/ftp.c b/libs/libcurl/src/ftp.c index 2c667a5799..8682e56988 100644 --- a/libs/libcurl/src/ftp.c +++ b/libs/libcurl/src/ftp.c @@ -1146,7 +1146,7 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data, #ifdef USE_IPV6
if(!conn->bits.ftp_use_eprt && conn->bits.ipv6)
- /* EPRT is disabled but we are connected to a IPv6 host, so we ignore the
+ /* EPRT is disabled but we are connected to an IPv6 host, so we ignore the
request and enable EPRT again! */
conn->bits.ftp_use_eprt = TRUE;
#endif
@@ -1278,7 +1278,7 @@ static CURLcode ftp_state_use_pasv(struct Curl_easy *data, #ifdef PF_INET6
if(!conn->bits.ftp_use_epsv && conn->bits.ipv6)
- /* EPSV is disabled but we are connected to a IPv6 host, so we ignore the
+ /* EPSV is disabled but we are connected to an IPv6 host, so we ignore the
request and enable EPSV again! */
conn->bits.ftp_use_epsv = TRUE;
#endif
@@ -1752,8 +1752,7 @@ static CURLcode ftp_epsv_disable(struct Curl_easy *data, infof(data, "Failed EPSV attempt. Disabling EPSV");
/* disable it for next transfer */
conn->bits.ftp_use_epsv = FALSE;
- Curl_conn_close(data, SECONDARYSOCKET);
- Curl_conn_cf_discard_all(data, conn, SECONDARYSOCKET);
+ close_secondarysocket(data, ftpc);
data->state.errorbuf = FALSE; /* allow error message to get
rewritten */
result = Curl_pp_sendf(data, &ftpc->pp, "%s", "PASV");
@@ -2716,8 +2715,8 @@ static CURLcode ftp_pp_statemachine(struct Curl_easy *data, #endif
if(data->set.use_ssl && !conn->bits.ftp_use_control_ssl) {
- /* We do not have a SSL/TLS control connection yet, but FTPS is
- requested. Try a FTPS connection now */
+ /* We do not have an SSL/TLS control connection yet, but FTPS is
+ requested. Try an FTPS connection now */
ftpc->count3 = 0;
switch(data->set.ftpsslauth) {
@@ -3322,7 +3321,7 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status, shutdown(conn->sock[SECONDARYSOCKET], 2); /* SD_BOTH */
#endif
- if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) {
+ if(Curl_conn_is_setup(conn, SECONDARYSOCKET)) {
if(!result && ftpc->dont_check && data->req.maxdownload > 0) {
/* partial download completed */
result = Curl_pp_sendf(data, pp, "%s", "ABOR");
diff --git a/libs/libcurl/src/headers.c b/libs/libcurl/src/headers.c index 821e9e289c..ca6527062c 100644 --- a/libs/libcurl/src/headers.c +++ b/libs/libcurl/src/headers.c @@ -217,7 +217,7 @@ static CURLcode namevalue(char *header, size_t hlen, unsigned int type, /* skip all trailing space letters */
while((end > header) && ISBLANK(*end))
- *end-- = 0; /* nul terminate */
+ *end-- = 0; /* null-terminate */
return CURLE_OK;
}
@@ -323,7 +323,7 @@ CURLcode Curl_headers_push(struct Curl_easy *data, const char *header, if(!hs)
return CURLE_OUT_OF_MEMORY;
memcpy(hs->buffer, header, hlen);
- hs->buffer[hlen] = 0; /* nul terminate */
+ hs->buffer[hlen] = 0; /* null-terminate */
result = namevalue(hs->buffer, hlen, type, &name, &value);
if(!result) {
diff --git a/libs/libcurl/src/hsts.c b/libs/libcurl/src/hsts.c index 5aea001792..3ee266a50f 100644 --- a/libs/libcurl/src/hsts.c +++ b/libs/libcurl/src/hsts.c @@ -279,7 +279,7 @@ struct stsentry *Curl_hsts(struct hsts *h, const char *hostname, blen = ntail;
}
}
- /* avoid strcasecompare because the host name is not null terminated */
+ /* avoid strcasecompare because the host name is not null-terminated */
if((hlen == ntail) && strncasecompare(hostname, sts->host, hlen))
return sts;
}
@@ -430,7 +430,7 @@ static CURLcode hsts_add(struct hsts *h, const char *line) time_t expires;
const char *hp = curlx_str(&host);
- /* The date parser works on a null terminated string. The maximum length
+ /* The date parser works on a null-terminated string. The maximum length
is upheld by curlx_str_quotedword(). */
memcpy(dbuf, curlx_str(&date), curlx_strlen(&date));
dbuf[curlx_strlen(&date)] = 0;
diff --git a/libs/libcurl/src/http.c b/libs/libcurl/src/http.c index 69147a4699..f3e4121d3a 100644 --- a/libs/libcurl/src/http.c +++ b/libs/libcurl/src/http.c @@ -1176,6 +1176,8 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl, bool reachedmax = FALSE;
char *follow_url = NULL;
CURLUcode uc;
+ CURLcode rewind_result;
+ bool switch_to_get = FALSE;
DEBUGASSERT(type != FOLLOW_NONE);
@@ -1333,7 +1335,7 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl, data->state.url = follow_url;
data->state.url_alloc = TRUE;
- Curl_req_soft_reset(&data->req, data);
+ rewind_result = Curl_req_soft_reset(&data->req, data);
infof(data, "Issue another request to this URL: '%s'", data->state.url);
if((data->set.http_follow_mode == CURLFOLLOW_FIRSTONLY) &&
data->set.str[STRING_CUSTOMREQUEST] &&
@@ -1382,8 +1384,10 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl, if((data->state.httpreq == HTTPREQ_POST
|| data->state.httpreq == HTTPREQ_POST_FORM
|| data->state.httpreq == HTTPREQ_POST_MIME)
- && !(data->set.keep_post & CURL_REDIR_POST_301))
+ && !(data->set.keep_post & CURL_REDIR_POST_301)) {
http_switch_to_get(data, 301);
+ switch_to_get = TRUE;
+ }
break;
case 302: /* Found */
/* (quote from RFC7231, section 6.4.3)
@@ -1405,8 +1409,10 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl, if((data->state.httpreq == HTTPREQ_POST
|| data->state.httpreq == HTTPREQ_POST_FORM
|| data->state.httpreq == HTTPREQ_POST_MIME)
- && !(data->set.keep_post & CURL_REDIR_POST_302))
+ && !(data->set.keep_post & CURL_REDIR_POST_302)) {
http_switch_to_get(data, 302);
+ switch_to_get = TRUE;
+ }
break;
case 303: /* See Other */
@@ -1419,8 +1425,10 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl, ((data->state.httpreq != HTTPREQ_POST &&
data->state.httpreq != HTTPREQ_POST_FORM &&
data->state.httpreq != HTTPREQ_POST_MIME) ||
- !(data->set.keep_post & CURL_REDIR_POST_303)))
+ !(data->set.keep_post & CURL_REDIR_POST_303))) {
http_switch_to_get(data, 303);
+ switch_to_get = TRUE;
+ }
break;
case 304: /* Not Modified */
/* 304 means we did a conditional request and it was "Not modified".
@@ -1437,6 +1445,12 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl, */
break;
}
+
+ /* When rewind of upload data failed and we are not switching to GET,
+ * we need to fail the follow, as we cannot send the data again. */
+ if(rewind_result && !switch_to_get)
+ return rewind_result;
+
Curl_pgrsTime(data, TIMER_REDIRECT);
Curl_pgrsResetTransferSizes(data);
@@ -3624,7 +3638,7 @@ static CURLcode http_on_response(struct Curl_easy *data, /* We expect more response from HTTP/2 later */
k->header = TRUE;
k->headerline = 0; /* restart the header line counter */
- k->httpversion_sent = 20; /* It's a HTTP/2 request now */
+ k->httpversion_sent = 20; /* It's an HTTP/2 request now */
/* Any remaining `buf` bytes are already HTTP/2 and passed to
* be processed. */
result = Curl_http2_upgrade(data, conn, FIRSTSOCKET, buf, blen);
diff --git a/libs/libcurl/src/http1.c b/libs/libcurl/src/http1.c index 301c402dbc..57e1732c13 100644 --- a/libs/libcurl/src/http1.c +++ b/libs/libcurl/src/http1.c @@ -209,7 +209,7 @@ static CURLcode start_req(struct h1_req_parser *parser, path = target;
path_len = target_len;
- /* URL parser wants 0-termination */
+ /* URL parser wants null-termination */
if(target_len >= sizeof(tmp))
goto out;
memcpy(tmp, target, target_len);
diff --git a/libs/libcurl/src/http_aws_sigv4.c b/libs/libcurl/src/http_aws_sigv4.c index 754e3777a8..38c2e882b9 100644 --- a/libs/libcurl/src/http_aws_sigv4.c +++ b/libs/libcurl/src/http_aws_sigv4.c @@ -9,7 +9,7 @@ *
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -133,7 +133,7 @@ static void trim_headers(struct curl_slist *head) else
*store++ = *value++;
}
- *store = 0; /* null terminate */
+ *store = 0; /* null-terminate */
}
}
diff --git a/libs/libcurl/src/http_aws_sigv4.h b/libs/libcurl/src/http_aws_sigv4.h index 79865fe715..f095588ab7 100644 --- a/libs/libcurl/src/http_aws_sigv4.h +++ b/libs/libcurl/src/http_aws_sigv4.h @@ -11,7 +11,7 @@ *
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/libs/libcurl/src/http_chunks.h b/libs/libcurl/src/http_chunks.h index 6c05d76cb4..46983a50dd 100644 --- a/libs/libcurl/src/http_chunks.h +++ b/libs/libcurl/src/http_chunks.h @@ -49,7 +49,7 @@ typedef enum { POST_CR state. */
CHUNK_DATA,
- /* POSTLF should get a CR and then a LF and nothing else, then move back to
+ /* POSTLF should get a CR and then an LF and nothing else, then move back to
HEX as the CRLF combination marks the end of a chunk. A missing CR is no
big deal. */
CHUNK_POSTLF,
@@ -64,7 +64,7 @@ typedef enum { CHUNK_TRAILER,
/* A trailer CR has been found - next state is CHUNK_TRAILER_POSTCR.
- Next char must be a LF */
+ Next char must be an LF */
CHUNK_TRAILER_CR,
/* A trailer LF must be found now, otherwise CHUNKE_BAD_CHUNK will be
diff --git a/libs/libcurl/src/imap.c b/libs/libcurl/src/imap.c index 7a84ed473b..81f0db12a4 100644 --- a/libs/libcurl/src/imap.c +++ b/libs/libcurl/src/imap.c @@ -1032,7 +1032,7 @@ static CURLcode imap_state_capability_resp(struct Curl_easy *data, (void)instate; /* no use for this yet */
- /* Do we have a untagged response? */
+ /* Do we have an untagged response? */
if(imapcode == '*') {
line += 2;
diff --git a/libs/libcurl/src/inet_ntop.c b/libs/libcurl/src/inet_ntop.c index 0c7c178182..60b9e4a6c7 100644 --- a/libs/libcurl/src/inet_ntop.c +++ b/libs/libcurl/src/inet_ntop.c @@ -56,7 +56,7 @@ * Returns `dst' (as a const)
* Note:
* - uses no statics
- * - takes a unsigned char* not an in_addr as input
+ * - takes an unsigned char* not an in_addr as input
*/
static char *inet_ntop4(const unsigned char *src, char *dst, size_t size)
{
diff --git a/libs/libcurl/src/multi.c b/libs/libcurl/src/multi.c index 942331df87..d325e92f38 100644 --- a/libs/libcurl/src/multi.c +++ b/libs/libcurl/src/multi.c @@ -347,7 +347,8 @@ static CURLMcode multi_xfers_add(struct Curl_multi *multi, if(unused <= min_unused) {
/* make it a 64 multiple, since our bitsets frow by that and
* small (easy_multi) grows to at least 64 on first resize. */
- unsigned int newsize = ((capacity + min_unused) + 63) / 64;
+ unsigned int newsize = (((capacity + min_unused) + 63) / 64) * 64;
+ DEBUGASSERT(newsize > capacity);
/* Grow the bitsets first. Should one fail, we do not need
* to downsize the already resized ones. The sets continue
* to work properly when larger than the table, but not
@@ -3181,7 +3182,7 @@ static CURLMcode multi_timeout(struct Curl_multi *multi, /* splay the lowest to the bottom */
multi->timetree = Curl_splay(tv_zero, multi->timetree);
- /* this will not return NULL from a non-emtpy tree, but some compilers
+ /* this will not return NULL from a non-empty tree, but some compilers
* are not convinced of that. Analyzers are hard. */
*expire_time = multi->timetree ? multi->timetree->key : tv_zero;
diff --git a/libs/libcurl/src/multi_ev.c b/libs/libcurl/src/multi_ev.c index 55fe3614d7..dc6556d58f 100644 --- a/libs/libcurl/src/multi_ev.c +++ b/libs/libcurl/src/multi_ev.c @@ -303,7 +303,7 @@ static CURLMcode mev_pollset_diff(struct Curl_multi *multi, CURLMcode mresult;
/* The transfer `data` reports in `ps` the sockets it is interested
- * in and which combinatino of CURL_POLL_IN/CURL_POLL_OUT it wants
+ * in and which combination of CURL_POLL_IN/CURL_POLL_OUT it wants
* to have monitored for events.
* There can be more than 1 transfer interested in the same socket
* and 1 transfer might be interested in more than 1 socket.
diff --git a/libs/libcurl/src/noproxy.c b/libs/libcurl/src/noproxy.c index 6ab99566f3..f1f40aeaa5 100644 --- a/libs/libcurl/src/noproxy.c +++ b/libs/libcurl/src/noproxy.c @@ -234,7 +234,7 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy) /* if the bits variable gets a crazy value here, that is fine as
the value will then be rejected in the cidr function */
bits = (unsigned int)atoi(slash + 1);
- *slash = 0; /* null terminate there */
+ *slash = 0; /* null-terminate there */
}
if(type == TYPE_IPV6)
match = Curl_cidr6_match(name, check, bits);
diff --git a/libs/libcurl/src/pop3.c b/libs/libcurl/src/pop3.c index ae64e0452b..a61973520b 100644 --- a/libs/libcurl/src/pop3.c +++ b/libs/libcurl/src/pop3.c @@ -874,7 +874,7 @@ static CURLcode pop3_state_capa_resp(struct Curl_easy *data, int pop3code, line = curlx_dyn_ptr(&pop3c->pp.recvbuf);
len = pop3c->pp.nfinal;
- /* Do we have a untagged continuation response? */
+ /* Do we have an untagged continuation response? */
if(pop3code == '*') {
/* Does the server support the STLS capability? */
if(len >= 4 && !memcmp(line, "STLS", 4))
diff --git a/libs/libcurl/src/setopt.c b/libs/libcurl/src/setopt.c index 6e0838b326..349ddf6ae3 100644 --- a/libs/libcurl/src/setopt.c +++ b/libs/libcurl/src/setopt.c @@ -2022,7 +2022,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, break;
case CURLOPT_SSL_CTX_DATA:
/*
- * Set a SSL_CTX callback parameter pointer
+ * Set an SSL_CTX callback parameter pointer
*/
#ifdef USE_SSL
if(Curl_ssl_supports(data, SSLSUPP_SSL_CTX)) {
@@ -2787,7 +2787,7 @@ static CURLcode setopt_func(struct Curl_easy *data, CURLoption option, break;
case CURLOPT_SSL_CTX_FUNCTION:
/*
- * Set a SSL_CTX callback
+ * Set an SSL_CTX callback
*/
#ifdef USE_SSL
if(Curl_ssl_supports(data, SSLSUPP_SSL_CTX)) {
diff --git a/libs/libcurl/src/smb.c b/libs/libcurl/src/smb.c index 2313eeff96..bf8394eb08 100644 --- a/libs/libcurl/src/smb.c +++ b/libs/libcurl/src/smb.c @@ -723,7 +723,7 @@ static CURLcode smb_send_setup(struct Curl_easy *data) "%s%c" /* OS */
"%s", /* client name */
smbc->user, 0, smbc->domain, 0, CURL_OS, 0, CLIENTNAME);
- p++; /* count the final null termination */
+ p++; /* count the final null-termination */
DEBUGASSERT(byte_count == (size_t)(p - msg.bytes));
msg.byte_count = smb_swap16((unsigned short)byte_count);
@@ -754,7 +754,7 @@ static CURLcode smb_send_tree_connect(struct Curl_easy *data, "%s%c" /* share */
"%s", /* service */
conn->host.name, smbc->share, 0, SERVICENAME);
- p++; /* count the final null termination */
+ p++; /* count the final null-termination */
DEBUGASSERT(byte_count == (size_t)(p - msg.bytes));
msg.byte_count = smb_swap16((unsigned short)byte_count);
diff --git a/libs/libcurl/src/smtp.c b/libs/libcurl/src/smtp.c index b7c9ba8558..0392c98561 100644 --- a/libs/libcurl/src/smtp.c +++ b/libs/libcurl/src/smtp.c @@ -483,7 +483,7 @@ static CURLcode smtp_perform_upgrade_tls(struct Curl_easy *data, result, ssldone));
if(!result && ssldone) {
smtpc->ssldone = ssldone;
- /* perform EHLO now, changes smpt->state out of SMTP_UPGRADETLS */
+ /* perform EHLO now, changes smtp->state out of SMTP_UPGRADETLS */
result = smtp_perform_ehlo(data, smtpc);
}
out:
@@ -601,7 +601,7 @@ static CURLcode smtp_perform_authentication(struct Curl_easy *data, *
* smtp_perform_command()
*
- * Sends a SMTP based command.
+ * Sends an SMTP based command.
*/
static CURLcode smtp_perform_command(struct Curl_easy *data,
struct smtp_conn *smtpc,
@@ -1036,7 +1036,7 @@ static CURLcode smtp_state_ehlo_resp(struct Curl_easy *data, if(smtpcode != 1) {
if(data->set.use_ssl && !Curl_conn_is_ssl(data->conn, FIRSTSOCKET)) {
- /* We do not have a SSL/TLS connection yet, but SSL is requested */
+ /* We do not have an SSL/TLS connection yet, but SSL is requested */
if(smtpc->tls_supported)
/* Switch to TLS connection now */
result = smtp_perform_starttls(data, smtpc);
diff --git a/libs/libcurl/src/socks.c b/libs/libcurl/src/socks.c index 794f4296ff..cf99ab1f53 100644 --- a/libs/libcurl/src/socks.c +++ b/libs/libcurl/src/socks.c @@ -394,7 +394,7 @@ CONNECT_REQ_INIT: /*
* This is currently not supporting "Identification Protocol (RFC1413)".
*/
- socksreq[8] = 0; /* ensure empty userid is NUL-terminated */
+ socksreq[8] = 0; /* ensure empty userid is null-terminated */
if(sx->proxy_user) {
size_t plen = strlen(sx->proxy_user);
if(plen > 255) {
diff --git a/libs/libcurl/src/strcase.c b/libs/libcurl/src/strcase.c index efdaa7911c..f21e76f094 100644 --- a/libs/libcurl/src/strcase.c +++ b/libs/libcurl/src/strcase.c @@ -85,7 +85,7 @@ char Curl_raw_tolower(char in) /* Copy an upper case version of the string from src to dest. The
* strings may overlap. No more than n characters of the string are copied
* (including any NUL) and the destination string will NOT be
- * NUL-terminated if that limit is reached.
+ * null-terminated if that limit is reached.
*/
void Curl_strntoupper(char *dest, const char *src, size_t n)
{
@@ -100,7 +100,7 @@ void Curl_strntoupper(char *dest, const char *src, size_t n) /* Copy a lower case version of the string from src to dest. The
* strings may overlap. No more than n characters of the string are copied
* (including any NUL) and the destination string will NOT be
- * NUL-terminated if that limit is reached.
+ * null-terminated if that limit is reached.
*/
void Curl_strntolower(char *dest, const char *src, size_t n)
{
@@ -112,7 +112,7 @@ void Curl_strntolower(char *dest, const char *src, size_t n) } while(*src++ && --n);
}
-/* Compare case-sensitive NUL-terminated strings, taking care of possible
+/* Compare case-sensitive null-terminated strings, taking care of possible
* null pointers. Return true if arguments match.
*/
bool Curl_safecmp(char *a, char *b)
diff --git a/libs/libcurl/src/strdup.c b/libs/libcurl/src/strdup.c index e9f8535c6d..94caa05fb8 100644 --- a/libs/libcurl/src/strdup.c +++ b/libs/libcurl/src/strdup.c @@ -104,7 +104,7 @@ void *Curl_memdup(const void *src, size_t length) * Curl_memdup0(source, length)
*
* Copies the 'source' string to a newly allocated buffer (that is returned).
- * Copies 'length' bytes then adds a null terminator.
+ * Copies 'length' bytes then adds a null-terminator.
*
* Returns the new pointer or NULL on failure.
*
diff --git a/libs/libcurl/src/system_win32.c b/libs/libcurl/src/system_win32.c index 0e96998ad9..836e1b1d57 100644 --- a/libs/libcurl/src/system_win32.c +++ b/libs/libcurl/src/system_win32.c @@ -214,7 +214,7 @@ HMODULE Curl_load_library(LPCTSTR filename) /* Attempt to get the Windows system path */
UINT systemdirlen = GetSystemDirectory(NULL, 0);
if(systemdirlen) {
- /* Allocate space for the full DLL path (Room for the null terminator
+ /* Allocate space for the full DLL path (Room for the null-terminator
is included in systemdirlen) */
size_t filenamelen = _tcslen(filename);
TCHAR *path = malloc(sizeof(TCHAR) * (systemdirlen + 1 + filenamelen));
diff --git a/libs/libcurl/src/transfer.h b/libs/libcurl/src/transfer.h index bc39b0181b..025cb448f8 100644 --- a/libs/libcurl/src/transfer.h +++ b/libs/libcurl/src/transfer.h @@ -59,7 +59,7 @@ bool Curl_xfer_write_is_paused(struct Curl_easy *data); /**
* Write a single "header" line from a server response.
- * @param hd0 the 0-terminated, single header line
+ * @param hd0 the null-terminated, single header line
* @param hdlen the length of the header line
* @param is_eos TRUE iff this is the end of the response
*/
diff --git a/libs/libcurl/src/uint-table.h b/libs/libcurl/src/uint-table.h index cf265f1113..ab610d9890 100644 --- a/libs/libcurl/src/uint-table.h +++ b/libs/libcurl/src/uint-table.h @@ -34,7 +34,7 @@ struct uint_tbl { void **rows; /* array of void* holding entries */
Curl_uint_tbl_entry_dtor *entry_dtor;
unsigned int nrows; /* length of `rows` array */
- unsigned int nentries; /* entris in table */
+ unsigned int nentries; /* entries in table */
unsigned int last_key_added; /* UINT_MAX or last key added */
#ifdef DEBUGBUILD
int init;
diff --git a/libs/libcurl/src/url.c b/libs/libcurl/src/url.c index 0e462be922..8329acef58 100644 --- a/libs/libcurl/src/url.c +++ b/libs/libcurl/src/url.c @@ -1135,7 +1135,7 @@ static bool url_match_destination(struct connectdata *conn, /* We are in an IMAPS vs IMAP like case. We expect `conn` to have SSL */
if(!Curl_conn_is_ssl(conn, FIRSTSOCKET)) {
DEBUGF(infof(m->data,
- "Connection #%" FMT_OFF_T " has compatible protocol famiy, "
+ "Connection #%" FMT_OFF_T " has compatible protocol family, "
"but no SSL, no match", conn->connection_id));
return FALSE;
}
diff --git a/libs/libcurl/src/vauth/digest.c b/libs/libcurl/src/vauth/digest.c index d7d6562185..be0f7c099f 100644 --- a/libs/libcurl/src/vauth/digest.c +++ b/libs/libcurl/src/vauth/digest.c @@ -165,7 +165,7 @@ static char *auth_digest_string_quoted(const char *source) {
char *dest;
const char *s = source;
- size_t n = 1; /* null terminator */
+ size_t n = 1; /* null-terminator */
/* Calculate size needed */
while(*s) {
diff --git a/libs/libcurl/src/vauth/digest_sspi.c b/libs/libcurl/src/vauth/digest_sspi.c index 9bf4c796c6..b950f8f6b8 100644 --- a/libs/libcurl/src/vauth/digest_sspi.c +++ b/libs/libcurl/src/vauth/digest_sspi.c @@ -242,7 +242,7 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, /*
* Curl_override_sspi_http_realm()
*
- * This is used to populate the domain in a SSPI identity structure
+ * This is used to populate the domain in an SSPI identity structure
* The realm is extracted from the challenge message and used as the
* domain if it is not already explicitly set.
*
diff --git a/libs/libcurl/src/vauth/vauth.c b/libs/libcurl/src/vauth/vauth.c index b98197bbdb..0a3b9acfed 100644 --- a/libs/libcurl/src/vauth/vauth.c +++ b/libs/libcurl/src/vauth/vauth.c @@ -39,7 +39,7 @@ /*
* Curl_auth_build_spn()
*
- * This is used to build a SPN string in the following formats:
+ * This is used to build an SPN string in the following formats:
*
* service/host@realm (Not currently used)
* service/host (Not used by GSS-API)
diff --git a/libs/libcurl/src/vauth/vauth.h b/libs/libcurl/src/vauth/vauth.h index 933bb4e737..0960f4a45a 100644 --- a/libs/libcurl/src/vauth/vauth.h +++ b/libs/libcurl/src/vauth/vauth.h @@ -60,7 +60,7 @@ struct gsasldata; */
bool Curl_auth_allowed_to_host(struct Curl_easy *data);
-/* This is used to build a SPN string */
+/* This is used to build an SPN string */
#if !defined(USE_WINDOWS_SSPI)
char *Curl_auth_build_spn(const char *service, const char *host,
const char *realm);
diff --git a/libs/libcurl/src/vquic/curl_osslq.c b/libs/libcurl/src/vquic/curl_osslq.c index 3067ccfbda..3a7f9b185e 100644 --- a/libs/libcurl/src/vquic/curl_osslq.c +++ b/libs/libcurl/src/vquic/curl_osslq.c @@ -2370,7 +2370,7 @@ static CURLcode cf_osslq_query(struct Curl_cfilter *cf, #else
*pres1 = 100;
#endif
- CURL_TRC_CF(data, cf, "query max_conncurrent -> %d", *pres1);
+ CURL_TRC_CF(data, cf, "query max_concurrent -> %d", *pres1);
return CURLE_OK;
}
case CF_QUERY_CONNECT_REPLY_MS:
diff --git a/libs/libcurl/src/vssh/libssh.c b/libs/libcurl/src/vssh/libssh.c index 569aa1a996..8de13c5e26 100644 --- a/libs/libcurl/src/vssh/libssh.c +++ b/libs/libcurl/src/vssh/libssh.c @@ -922,8 +922,8 @@ static int myssh_state_upload_init(struct Curl_easy *data, return rc;
}
-static int myssh_state_sftp_dowload_stat(struct Curl_easy *data,
- struct ssh_conn *sshc)
+static int myssh_state_sftp_download_stat(struct Curl_easy *data,
+ struct ssh_conn *sshc)
{
curl_off_t size;
int rc = 0;
@@ -1751,7 +1751,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, break;
case SSH_SFTP_DOWNLOAD_STAT:
- rc = myssh_state_sftp_dowload_stat(data, sshc);
+ rc = myssh_state_sftp_download_stat(data, sshc);
break;
case SSH_SFTP_CLOSE:
diff --git a/libs/libcurl/src/vssh/libssh2.c b/libs/libcurl/src/vssh/libssh2.c index 7bf1ed9fb5..f0081ecb0b 100644 --- a/libs/libcurl/src/vssh/libssh2.c +++ b/libs/libcurl/src/vssh/libssh2.c @@ -2007,7 +2007,7 @@ static CURLcode ssh_state_sftp_realpath(struct Curl_easy *data, return CURLE_AGAIN;
if(rc > 0) {
- /* It seems that this string is not always NULL terminated */
+ /* It seems that this string is not always null-terminated */
sshp->readdir_filename[rc] = '\0';
free(sshc->homedir);
sshc->homedir = strdup(sshp->readdir_filename);
diff --git a/libs/libcurl/src/vtls/gtls.c b/libs/libcurl/src/vtls/gtls.c index 1bd7793111..7f2401afd5 100644 --- a/libs/libcurl/src/vtls/gtls.c +++ b/libs/libcurl/src/vtls/gtls.c @@ -233,7 +233,7 @@ static void unload_file(gnutls_datum_t data) }
-/* this function does a SSL/TLS (re-)handshake */
+/* this function does an SSL/TLS (re-)handshake */
static CURLcode handshake(struct Curl_cfilter *cf,
struct Curl_easy *data)
{
diff --git a/libs/libcurl/src/vtls/keylog.c b/libs/libcurl/src/vtls/keylog.c index 77321c9f76..3e6bdff54e 100644 --- a/libs/libcurl/src/vtls/keylog.c +++ b/libs/libcurl/src/vtls/keylog.c @@ -94,7 +94,7 @@ Curl_tls_keylog_write_line(const char *line) linelen = strlen(line);
if(linelen == 0 || linelen > sizeof(buf) - 2) {
- /* Empty line or too big to fit in a LF and NUL. */
+ /* Empty line or too big to fit in an LF and NUL. */
return FALSE;
}
diff --git a/libs/libcurl/src/vtls/keylog.h b/libs/libcurl/src/vtls/keylog.h index 5b2df7fe8f..88151dea2d 100644 --- a/libs/libcurl/src/vtls/keylog.h +++ b/libs/libcurl/src/vtls/keylog.h @@ -61,7 +61,7 @@ bool Curl_tls_keylog_write(const char *label, const unsigned char *secret, size_t secretlen);
/*
- * Appends a line to the key log file, ensure it is terminated by a LF.
+ * Appends a line to the key log file, ensure it is terminated by an LF.
* Returns true iff the key log file is open and a valid line was provided.
*/
bool Curl_tls_keylog_write_line(const char *line);
diff --git a/libs/libcurl/src/vtls/openssl.c b/libs/libcurl/src/vtls/openssl.c index b5ae754a96..2556b5c57f 100644 --- a/libs/libcurl/src/vtls/openssl.c +++ b/libs/libcurl/src/vtls/openssl.c @@ -698,9 +698,11 @@ static long ossl_bio_cf_ctrl(BIO *bio, int cmd, long num, void *ptr) ret = 1;
break;
#ifdef BIO_CTRL_EOF
- case BIO_CTRL_EOF:
+ case BIO_CTRL_EOF: {
/* EOF has been reached on input? */
- return !cf->next || !cf->next->connected;
+ struct ssl_connect_data *connssl = cf->ctx;
+ return connssl->peer_closed;
+ }
#endif
default:
ret = 0;
@@ -4048,7 +4050,7 @@ CURLcode Curl_ossl_ctx_init(struct ossl_ctx *octx, CVE-2010-4180 when using previous OpenSSL versions we no longer enable
this option regardless of OpenSSL version and SSL_OP_ALL definition.
- OpenSSL added a work-around for a SSL 3.0/TLS 1.0 CBC vulnerability:
+ OpenSSL added a work-around for an SSL 3.0/TLS 1.0 CBC vulnerability:
https://web.archive.org/web/20240114184648/openssl.org/~bodo/tls-cbc.txt.
In 0.9.6e they added a bit to SSL_OP_ALL that _disables_ that work-around
despite the fact that SSL_OP_ALL is documented to do "rather harmless"
diff --git a/libs/libcurl/src/vtls/schannel_verify.c b/libs/libcurl/src/vtls/schannel_verify.c index 69d79182cf..b4d7241790 100644 --- a/libs/libcurl/src/vtls/schannel_verify.c +++ b/libs/libcurl/src/vtls/schannel_verify.c @@ -331,7 +331,7 @@ static CURLcode add_certs_file_to_store(HCERTSTORE trust_store, }
}
- /* Null terminate the buffer */
+ /* null-terminate the buffer */
ca_file_buffer[ca_file_bufsize] = '\0';
result = add_certs_data_to_store(trust_store,
diff --git a/libs/libcurl/src/vtls/vtls.c b/libs/libcurl/src/vtls/vtls.c index 37aaea9358..f707e92577 100644 --- a/libs/libcurl/src/vtls/vtls.c +++ b/libs/libcurl/src/vtls/vtls.c @@ -768,8 +768,8 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, do {
end_pos = strstr(begin_pos, ";sha256//");
/*
- * if there is an end_pos, null terminate,
- * otherwise it will go to the end of the original string
+ * if there is an end_pos, null-terminate, otherwise it will go to the
+ * end of the original string
*/
if(end_pos)
end_pos[0] = '\0';
@@ -845,8 +845,8 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, }
/*
- * Otherwise we will assume it is PEM and try to decode it
- * after placing null terminator
+ * Otherwise we will assume it is PEM and try to decode it after placing
+ * null-terminator
*/
pem_read = pubkey_pem_to_der(curlx_dyn_ptr(&buf), &pem_ptr, &pem_len);
/* if it was not read successfully, exit */
diff --git a/libs/libcurl/src/vtls/vtls_scache.c b/libs/libcurl/src/vtls/vtls_scache.c index d2d2718e51..3e1825d635 100644 --- a/libs/libcurl/src/vtls/vtls_scache.c +++ b/libs/libcurl/src/vtls/vtls_scache.c @@ -108,7 +108,7 @@ static struct Curl_ssl_scache *cf_ssl_scache_get(struct Curl_easy *data) return scache;
}
-static void cf_ssl_scache_sesssion_ldestroy(void *udata, void *obj)
+static void cf_ssl_scache_session_ldestroy(void *udata, void *obj)
{
struct Curl_ssl_session *s = obj;
(void)udata;
@@ -161,7 +161,7 @@ Curl_ssl_session_create2(void *sdata, size_t sdata_len, if(alpn) {
s->alpn = strdup(alpn);
if(!s->alpn) {
- cf_ssl_scache_sesssion_ldestroy(NULL, s);
+ cf_ssl_scache_session_ldestroy(NULL, s);
return CURLE_OUT_OF_MEMORY;
}
}
@@ -176,7 +176,7 @@ void Curl_ssl_session_destroy(struct Curl_ssl_session *s) if(Curl_node_llist(&s->list))
Curl_node_remove(&s->list);
else {
- cf_ssl_scache_sesssion_ldestroy(NULL, s);
+ cf_ssl_scache_session_ldestroy(NULL, s);
}
}
}
@@ -341,7 +341,7 @@ CURLcode Curl_ssl_scache_create(size_t max_peers, for(i = 0; i < scache->peer_count; ++i) {
scache->peers[i].max_sessions = max_sessions_per_peer;
Curl_llist_init(&scache->peers[i].sessions,
- cf_ssl_scache_sesssion_ldestroy);
+ cf_ssl_scache_session_ldestroy);
}
*pscache = scache;
@@ -598,9 +598,8 @@ CURLcode Curl_ssl_peer_key_make(struct Curl_cfilter *cf, goto out;
*ppeer_key = curlx_dyn_take(&buf, &key_len);
- /* we just added printable char, and dynbuf always 0 terminates,
- * no need to track length */
-
+ /* we just added printable char, and dynbuf always null-terminates, no need
+ * to track length */
out:
curlx_dyn_free(&buf);
diff --git a/libs/libcurl/src/vtls/vtls_scache.h b/libs/libcurl/src/vtls/vtls_scache.h index 9bce4c36a5..3f2a3978c8 100644 --- a/libs/libcurl/src/vtls/vtls_scache.h +++ b/libs/libcurl/src/vtls/vtls_scache.h @@ -113,7 +113,7 @@ CURLcode Curl_ssl_scache_add_obj(struct Curl_cfilter *cf, void *sobj,
Curl_ssl_scache_obj_dtor *sobj_dtor_cb);
-/* All about a SSL session ticket */
+/* All about an SSL session ticket */
struct Curl_ssl_session {
const void *sdata; /* session ticket data, plain bytes */
size_t sdata_len; /* number of bytes in sdata */
diff --git a/libs/libcurl/src/vtls/wolfssl.c b/libs/libcurl/src/vtls/wolfssl.c index fad04a997f..0971895859 100644 --- a/libs/libcurl/src/vtls/wolfssl.c +++ b/libs/libcurl/src/vtls/wolfssl.c @@ -299,9 +299,11 @@ static long wssl_bio_cf_ctrl(WOLFSSL_BIO *bio, int cmd, long num, void *ptr) ret = 1;
break;
#ifdef WOLFSSL_BIO_CTRL_EOF
- case WOLFSSL_BIO_CTRL_EOF:
+ case WOLFSSL_BIO_CTRL_EOF: {
/* EOF has been reached on input? */
- return !cf->next || !cf->next->connected;
+ struct ssl_connect_data *connssl = cf->ctx;
+ return connssl->peer_closed;
+ }
#endif
default:
ret = 0;
@@ -509,7 +511,7 @@ static CURLcode wssl_on_session_reuse(struct Curl_cfilter *cf, *do_early_data = FALSE;
#ifdef WOLFSSL_EARLY_DATA
connssl->earlydata_max = wolfSSL_SESSION_get_max_early_data(
- wolfSSL_get_session(wssl->ssl));
+ wolfSSL_get_session(wssl->ssl));
#else
(void)wssl;
connssl->earlydata_max = 0;
@@ -574,11 +576,19 @@ wssl_setup_session(struct Curl_cfilter *cf, if(result)
goto out;
}
+#ifdef WOLFSSL_EARLY_DATA
if(do_early_data) {
+ unsigned int edmax = (scs->earlydata_max < UINT_MAX) ?
+ (unsigned int)scs->earlydata_max : UINT_MAX;
/* We only try the ALPN protocol the session used before,
* otherwise we might send early data for the wrong protocol */
Curl_alpn_restrict_to(alpns, scs->alpn);
+ wolfSSL_set_max_early_data(wss->ssl, edmax);
}
+#else
+ /* Should never enable when not supported */
+ DEBUGASSERT(!do_early_data);
+#endif
}
}
wolfSSL_SESSION_free(session);
@@ -931,14 +941,6 @@ wssl_legacy_CTX_set_max_proto_version(WOLFSSL_CTX* ctx, int version) "POLY1305_SHA256:TLS_AES_128_CCM_SHA256"
#define QUIC_GROUPS "P-256:P-384:P-521"
-#if defined(HAVE_SECRET_CALLBACK)
-static void keylog_callback(const WOLFSSL *ssl, const char *line)
-{
- (void)ssl;
- Curl_tls_keylog_write_line(line);
-}
-#endif
-
CURLcode Curl_wssl_ctx_init(struct wssl_ctx *wctx,
struct Curl_cfilter *cf,
struct Curl_easy *data,
diff --git a/libs/libcurl/src/vtls/x509asn1.c b/libs/libcurl/src/vtls/x509asn1.c index d9c970d7d2..1b4821484c 100644 --- a/libs/libcurl/src/vtls/x509asn1.c +++ b/libs/libcurl/src/vtls/x509asn1.c @@ -256,7 +256,7 @@ static const char *getASN1Element(struct Curl_asn1Element *elem, #ifdef WANT_EXTRACT_CERTINFO
/*
- * Search the null terminated OID or OID identifier in local table.
+ * Search the null-terminated OID or OID identifier in local table.
* Return the table entry pointer or NULL if not found.
*/
static const struct Curl_OID *searchOID(const char *oid)
diff --git a/libs/libcurl/src/ws.c b/libs/libcurl/src/ws.c index 691710db06..e522c8941b 100644 --- a/libs/libcurl/src/ws.c +++ b/libs/libcurl/src/ws.c @@ -145,35 +145,77 @@ static int ws_frame_firstbyte2flags(struct Curl_easy *data, unsigned char firstbyte, int cont_flags)
{
switch(firstbyte) {
+ /* 0x00 - intermediate TEXT/BINARY fragment */
case WSBIT_OPCODE_CONT:
- /* continuation of a previous fragment: restore stored flags */
+ if(!(cont_flags & CURLWS_CONT)) {
+ failf(data, "[WS] no ongoing fragmented message to resume");
+ return 0;
+ }
return cont_flags | CURLWS_CONT;
+ /* 0x80 - final TEXT/BIN fragment */
case (WSBIT_OPCODE_CONT | WSBIT_FIN):
- /* continuation of a previous fragment: restore stored flags */
+ if(!(cont_flags & CURLWS_CONT)) {
+ failf(data, "[WS] no ongoing fragmented message to resume");
+ return 0;
+ }
return cont_flags & ~CURLWS_CONT;
+ /* 0x01 - first TEXT fragment */
case WSBIT_OPCODE_TEXT:
+ if(cont_flags & CURLWS_CONT) {
+ failf(data, "[WS] fragmented message interrupted by new TEXT msg");
+ return 0;
+ }
return CURLWS_TEXT | CURLWS_CONT;
+ /* 0x81 - unfragmented TEXT msg */
case (WSBIT_OPCODE_TEXT | WSBIT_FIN):
+ if(cont_flags & CURLWS_CONT) {
+ failf(data, "[WS] fragmented message interrupted by new TEXT msg");
+ return 0;
+ }
return CURLWS_TEXT;
+ /* 0x02 - first BINARY fragment */
case WSBIT_OPCODE_BIN:
+ if(cont_flags & CURLWS_CONT) {
+ failf(data, "[WS] fragmented message interrupted by new BINARY msg");
+ return 0;
+ }
return CURLWS_BINARY | CURLWS_CONT;
+ /* 0x82 - unfragmented BINARY msg */
case (WSBIT_OPCODE_BIN | WSBIT_FIN):
+ if(cont_flags & CURLWS_CONT) {
+ failf(data, "[WS] fragmented message interrupted by new BINARY msg");
+ return 0;
+ }
return CURLWS_BINARY;
+ /* 0x08 - first CLOSE fragment */
+ case WSBIT_OPCODE_CLOSE:
+ failf(data, "[WS] invalid fragmented CLOSE frame");
+ return 0;
+ /* 0x88 - unfragmented CLOSE */
case (WSBIT_OPCODE_CLOSE | WSBIT_FIN):
return CURLWS_CLOSE;
+ /* 0x09 - first PING fragment */
+ case WSBIT_OPCODE_PING:
+ failf(data, "[WS] invalid fragmented PING frame");
+ return 0;
+ /* 0x89 - unfragmented PING */
case (WSBIT_OPCODE_PING | WSBIT_FIN):
return CURLWS_PING;
+ /* 0x0a - first PONG fragment */
+ case WSBIT_OPCODE_PONG:
+ failf(data, "[WS] invalid fragmented PONG frame");
+ return 0;
+ /* 0x8a - unfragmented PONG */
case (WSBIT_OPCODE_PONG | WSBIT_FIN):
return CURLWS_PONG;
+ /* invalid first byte */
default:
- if(firstbyte & WSBIT_RSV_MASK) {
- failf(data, "WS: unknown reserved bit: %x",
- firstbyte & WSBIT_RSV_MASK);
- }
- else {
- failf(data, "WS: unknown opcode: %x",
- firstbyte & WSBIT_OPCODE_MASK);
- }
+ if(firstbyte & WSBIT_RSV_MASK)
+ /* any of the reserved bits 0x40/0x20/0x10 are set */
+ failf(data, "[WS] invalid reserved bits: %02x", firstbyte);
+ else
+ /* any of the reserved opcodes 0x3-0x7 or 0xb-0xf is used */
+ failf(data, "[WS] invalid opcode: %02x", firstbyte);
return 0;
}
}
@@ -186,20 +228,20 @@ static unsigned char ws_frame_flags2firstbyte(struct Curl_easy *data, switch(flags & ~CURLWS_OFFSET) {
case 0:
if(contfragment) {
- infof(data, "WS: no flags given; interpreting as continuation "
+ infof(data, "[WS] no flags given; interpreting as continuation "
"fragment for compatibility");
return (WSBIT_OPCODE_CONT | WSBIT_FIN);
}
- failf(data, "WS: no flags given");
+ failf(data, "[WS] no flags given");
*err = CURLE_BAD_FUNCTION_ARGUMENT;
return 0xff;
case CURLWS_CONT:
if(contfragment) {
- infof(data, "WS: setting CURLWS_CONT flag without message type is "
+ infof(data, "[WS] setting CURLWS_CONT flag without message type is "
"supported for compatibility but highly discouraged");
return WSBIT_OPCODE_CONT;
}
- failf(data, "WS: No ongoing fragmented message to continue");
+ failf(data, "[WS] No ongoing fragmented message to continue");
*err = CURLE_BAD_FUNCTION_ARGUMENT;
return 0xff;
case CURLWS_TEXT:
@@ -215,24 +257,24 @@ static unsigned char ws_frame_flags2firstbyte(struct Curl_easy *data, case CURLWS_CLOSE:
return WSBIT_OPCODE_CLOSE | WSBIT_FIN;
case (CURLWS_CLOSE | CURLWS_CONT):
- failf(data, "WS: CLOSE frame must not be fragmented");
+ failf(data, "[WS] CLOSE frame must not be fragmented");
*err = CURLE_BAD_FUNCTION_ARGUMENT;
return 0xff;
case CURLWS_PING:
return WSBIT_OPCODE_PING | WSBIT_FIN;
case (CURLWS_PING | CURLWS_CONT):
- failf(data, "WS: PING frame must not be fragmented");
+ failf(data, "[WS] PING frame must not be fragmented");
*err = CURLE_BAD_FUNCTION_ARGUMENT;
return 0xff;
case CURLWS_PONG:
return WSBIT_OPCODE_PONG | WSBIT_FIN;
case (CURLWS_PONG | CURLWS_CONT):
- failf(data, "WS: PONG frame must not be fragmented");
+ failf(data, "[WS] PONG frame must not be fragmented");
*err = CURLE_BAD_FUNCTION_ARGUMENT;
return 0xff;
default:
- failf(data, "WS: unknown flags: %x", flags);
- *err = CURLE_SEND_ERROR;
+ failf(data, "[WS] unknown flags: %x", flags);
+ *err = CURLE_BAD_FUNCTION_ARGUMENT;
return 0xff;
}
}
@@ -244,23 +286,23 @@ static void ws_dec_info(struct ws_decoder *dec, struct Curl_easy *data, case 0:
break;
case 1:
- CURL_TRC_WRITE(data, "websocket, decoded %s [%s%s]", msg,
- ws_frame_name_of_op(dec->head[0]),
- (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL");
+ CURL_TRC_WS(data, "decoded %s [%s%s]", msg,
+ ws_frame_name_of_op(dec->head[0]),
+ (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL");
break;
default:
if(dec->head_len < dec->head_total) {
- CURL_TRC_WRITE(data, "websocket, decoded %s [%s%s](%d/%d)", msg,
- ws_frame_name_of_op(dec->head[0]),
- (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL",
- dec->head_len, dec->head_total);
+ CURL_TRC_WS(data, "decoded %s [%s%s](%d/%d)", msg,
+ ws_frame_name_of_op(dec->head[0]),
+ (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL",
+ dec->head_len, dec->head_total);
}
else {
- CURL_TRC_WRITE(data, "websocket, decoded %s [%s%s payload=%"
- FMT_OFF_T "/%" FMT_OFF_T "]",
- msg, ws_frame_name_of_op(dec->head[0]),
- (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL",
- dec->payload_offset, dec->payload_len);
+ CURL_TRC_WS(data, "decoded %s [%s%s payload=%"
+ FMT_OFF_T "/%" FMT_OFF_T "]",
+ msg, ws_frame_name_of_op(dec->head[0]),
+ (dec->head[0] & WSBIT_FIN) ? "" : " NON-FINAL",
+ dec->payload_offset, dec->payload_len);
}
break;
}
@@ -318,17 +360,15 @@ static CURLcode ws_dec_read_head(struct ws_decoder *dec, dec->frame_flags = ws_frame_firstbyte2flags(data, dec->head[0],
dec->cont_flags);
if(!dec->frame_flags) {
- failf(data, "WS: invalid first byte: %x", dec->head[0]);
ws_dec_reset(dec);
return CURLE_RECV_ERROR;
}
- if(dec->frame_flags & CURLWS_CONT) {
+ /* fragmentation only applies to data frames (text/binary);
+ * control frames (close/ping/pong) do not affect the CONT status */
+ if(dec->frame_flags & (CURLWS_TEXT | CURLWS_BINARY)) {
dec->cont_flags = dec->frame_flags;
}
- else {
- dec->cont_flags = 0;
- }
dec->head_len = 1;
/* ws_dec_info(dec, data, "seeing opcode"); */
@@ -341,10 +381,30 @@ static CURLcode ws_dec_read_head(struct ws_decoder *dec, if(dec->head[1] & WSBIT_MASK) {
/* A client MUST close a connection if it detects a masked frame. */
- failf(data, "WS: masked input frame");
+ failf(data, "[WS] masked input frame");
ws_dec_reset(dec);
return CURLE_RECV_ERROR;
}
+ if(dec->frame_flags & CURLWS_PING && dec->head[1] > 125) {
+ /* The maximum valid size of PING frames is 125 bytes.
+ Accepting overlong pings would mean sending equivalent pongs! */
+ failf(data, "[WS] received PING frame is too big");
+ ws_dec_reset(dec);
+ return CURLE_RECV_ERROR;
+ }
+ if(dec->frame_flags & CURLWS_PONG && dec->head[1] > 125) {
+ /* The maximum valid size of PONG frames is 125 bytes. */
+ failf(data, "[WS] received PONG frame is too big");
+ ws_dec_reset(dec);
+ return CURLE_RECV_ERROR;
+ }
+ if(dec->frame_flags & CURLWS_CLOSE && dec->head[1] > 125) {
+ /* The maximum valid size of CLOSE frames is 125 bytes. */
+ failf(data, "[WS] received CLOSE frame is too big");
+ ws_dec_reset(dec);
+ return CURLE_RECV_ERROR;
+ }
+
/* How long is the frame head? */
if(dec->head[1] == 126) {
dec->head_total = 4;
@@ -379,7 +439,7 @@ static CURLcode ws_dec_read_head(struct ws_decoder *dec, break;
case 10:
if(dec->head[2] > 127) {
- failf(data, "WS: frame length longer than 64 signed not supported");
+ failf(data, "[WS] frame length longer than 64 signed not supported");
return CURLE_RECV_ERROR;
}
dec->payload_len = ((curl_off_t)dec->head[2] << 56) |
@@ -394,7 +454,7 @@ static CURLcode ws_dec_read_head(struct ws_decoder *dec, default:
/* this should never happen */
DEBUGASSERT(0);
- failf(data, "WS: unexpected frame header length");
+ failf(data, "[WS] unexpected frame header length");
return CURLE_RECV_ERROR;
}
@@ -430,8 +490,8 @@ static CURLcode ws_dec_pass_payload(struct ws_decoder *dec, Curl_bufq_skip(inraw, (size_t)nwritten);
dec->payload_offset += (curl_off_t)nwritten;
remain = dec->payload_len - dec->payload_offset;
- CURL_TRC_WRITE(data, "websocket, passed %zd bytes payload, %"
- FMT_OFF_T " remain", nwritten, remain);
+ CURL_TRC_WS(data, "passed %zd bytes payload, %"
+ FMT_OFF_T " remain", nwritten, remain);
}
return remain ? CURLE_AGAIN : CURLE_OK;
@@ -457,7 +517,7 @@ static CURLcode ws_dec_pass(struct ws_decoder *dec, result = ws_dec_read_head(dec, data, inraw);
if(result) {
if(result != CURLE_AGAIN) {
- infof(data, "WS: decode error %d", (int)result);
+ infof(data, "[WS] decode error %d", (int)result);
break; /* real error */
}
/* incomplete ws frame head */
@@ -555,7 +615,7 @@ static ssize_t ws_cw_dec_next(const unsigned char *buf, size_t buflen, if(auto_pong && (frame_flags & CURLWS_PING) && !remain) {
/* auto-respond to PINGs, only works for single-frame payloads atm */
size_t bytes;
- infof(data, "WS: auto-respond to PING with a PONG");
+ infof(data, "[WS] auto-respond to PING with a PONG");
/* send back the exact same content as a PONG */
*err = curl_ws_send(data, buf, buflen, &bytes, 0, CURLWS_PONG);
if(*err)
@@ -588,7 +648,7 @@ static CURLcode ws_cw_write(struct Curl_easy *data, ws = Curl_conn_meta_get(data->conn, CURL_META_PROTO_WS_CONN);
if(!ws) {
- failf(data, "WS: not a websocket transfer");
+ failf(data, "[WS] not a websocket transfer");
return CURLE_FAILED_INIT;
}
@@ -597,7 +657,7 @@ static CURLcode ws_cw_write(struct Curl_easy *data, nwritten = Curl_bufq_write(&ctx->buf, (const unsigned char *)buf,
nbytes, &result);
if(nwritten < 0) {
- infof(data, "WS: error adding data to buffer %d", result);
+ infof(data, "[WS] error adding data to buffer %d", result);
return result;
}
}
@@ -613,17 +673,17 @@ static CURLcode ws_cw_write(struct Curl_easy *data, if(result == CURLE_AGAIN) {
/* insufficient amount of data, keep it for later.
* we pretend to have written all since we have a copy */
- CURL_TRC_WRITE(data, "websocket, buffered incomplete frame head");
+ CURL_TRC_WS(data, "buffered incomplete frame head");
return CURLE_OK;
}
else if(result) {
- infof(data, "WS: decode error %d", (int)result);
+ infof(data, "[WS] decode error %d", (int)result);
return result;
}
}
if((type & CLIENTWRITE_EOS) && !Curl_bufq_is_empty(&ctx->buf)) {
- infof(data, "WS: decode ending with %zd frame bytes remaining",
+ failf(data, "[WS] decode ending with %zd frame bytes remaining",
Curl_bufq_len(&ctx->buf));
return CURLE_RECV_ERROR;
}
@@ -645,10 +705,11 @@ static const struct Curl_cwtype ws_cw_decode = { static void ws_enc_info(struct ws_encoder *enc, struct Curl_easy *data,
const char *msg)
{
- infof(data, "WS-ENC: %s [%s%s payload=%" FMT_OFF_T "/%" FMT_OFF_T "]",
- msg, ws_frame_name_of_op(enc->firstbyte),
- (enc->firstbyte & WSBIT_FIN) ? "" : " NON-FIN",
- enc->payload_len - enc->payload_remain, enc->payload_len);
+ CURL_TRC_WS(data, "WS-ENC: %s [%s%s payload=%"
+ FMT_OFF_T "/%" FMT_OFF_T "]",
+ msg, ws_frame_name_of_op(enc->firstbyte),
+ (enc->firstbyte & WSBIT_FIN) ? "" : " NON-FIN",
+ enc->payload_len - enc->payload_remain, enc->payload_len);
}
static void ws_enc_reset(struct ws_encoder *enc)
@@ -699,7 +760,7 @@ static ssize_t ws_enc_write_head(struct Curl_easy *data, ssize_t n;
if(payload_len < 0) {
- failf(data, "WS: starting new frame with negative payload length %"
+ failf(data, "[WS] starting new frame with negative payload length %"
FMT_OFF_T, payload_len);
*err = CURLE_SEND_ERROR;
return -1;
@@ -707,7 +768,7 @@ static ssize_t ws_enc_write_head(struct Curl_easy *data, if(enc->payload_remain > 0) {
/* trying to write a new frame before the previous one is finished */
- failf(data, "WS: starting new frame with %zd bytes from last one "
+ failf(data, "[WS] starting new frame with %zd bytes from last one "
"remaining to be sent", (ssize_t)enc->payload_remain);
*err = CURLE_SEND_ERROR;
return -1;
@@ -715,7 +776,6 @@ static ssize_t ws_enc_write_head(struct Curl_easy *data, firstbyte = ws_frame_flags2firstbyte(data, flags, enc->contfragment, err);
if(*err) {
- failf(data, "WS: provided flags not valid: %x", flags);
return -1;
}
@@ -725,6 +785,25 @@ static ssize_t ws_enc_write_head(struct Curl_easy *data, enc->contfragment = (flags & CURLWS_CONT) ? (bit)TRUE : (bit)FALSE;
}
+ if(flags & CURLWS_PING && payload_len > 125) {
+ /* The maximum valid size of PING frames is 125 bytes. */
+ failf(data, "[WS] given PING frame is too big");
+ *err = CURLE_TOO_LARGE;
+ return -1;
+ }
+ if(flags & CURLWS_PONG && payload_len > 125) {
+ /* The maximum valid size of PONG frames is 125 bytes. */
+ failf(data, "[WS] given PONG frame is too big");
+ *err = CURLE_TOO_LARGE;
+ return -1;
+ }
+ if(flags & CURLWS_CLOSE && payload_len > 125) {
+ /* The maximum valid size of CLOSE frames is 125 bytes. */
+ failf(data, "[WS] given CLOSE frame is too big");
+ *err = CURLE_TOO_LARGE;
+ return -1;
+ }
+
head[0] = enc->firstbyte = firstbyte;
if(payload_len > 65535) {
head[1] = 127 | WSBIT_MASK;
@@ -952,7 +1031,14 @@ CURLcode Curl_ws_accept(struct Curl_easy *data, sizeof(ws->enc.mask));
if(result)
return result;
- infof(data, "Received 101, switch to WebSocket; mask %02x%02x%02x%02x",
+
+#ifdef DEBUGBUILD
+ if(getenv("CURL_WS_FORCE_ZERO_MASK"))
+ /* force the bit mask to 0x00000000, effectively disabling masking */
+ memset(ws->enc.mask, 0, sizeof(ws->enc.mask));
+#endif
+
+ infof(data, "[WS] Received 101, switch to WebSocket; mask %02x%02x%02x%02x",
ws->enc.mask[0], ws->enc.mask[1], ws->enc.mask[2], ws->enc.mask[3]);
/* Install our client writer that decodes WS frames payload */
@@ -976,7 +1062,7 @@ CURLcode Curl_ws_accept(struct Curl_easy *data, nread, &result);
if(nwritten < 0)
return result;
- infof(data, "%zu bytes websocket payload", nread);
+ CURL_TRC_WS(data, "%zu bytes payload", nread);
}
else { /* !connect_only */
/* And pass any additional data to the writers */
@@ -1025,7 +1111,7 @@ static ssize_t ws_client_collect(const unsigned char *buf, size_t buflen, if(auto_pong && (frame_flags & CURLWS_PING) && !remain) {
/* auto-respond to PINGs, only works for single-frame payloads atm */
size_t bytes;
- infof(ctx->data, "WS: auto-respond to PING with a PONG");
+ infof(ctx->data, "[WS] auto-respond to PING with a PONG");
/* send back the exact same content as a PONG */
*err = curl_ws_send(ctx->data, buf, buflen, &bytes, 0, CURLWS_PONG);
if(*err)
@@ -1079,19 +1165,19 @@ CURL_EXTERN CURLcode curl_ws_recv(CURL *d, void *buffer, if(!conn) {
/* Unhappy hack with lifetimes of transfers and connection */
if(!data->set.connect_only) {
- failf(data, "CONNECT_ONLY is required");
+ failf(data, "[WS] CONNECT_ONLY is required");
return CURLE_UNSUPPORTED_PROTOCOL;
}
Curl_getconnectinfo(data, &conn);
if(!conn) {
- failf(data, "connection not found");
+ failf(data, "[WS] connection not found");
return CURLE_BAD_FUNCTION_ARGUMENT;
}
}
ws = Curl_conn_meta_get(conn, CURL_META_PROTO_WS_CONN);
if(!ws) {
- failf(data, "connection is not setup for websocket");
+ failf(data, "[WS] connection is not setup for websocket");
return CURLE_BAD_FUNCTION_ARGUMENT;
}
@@ -1112,7 +1198,7 @@ CURL_EXTERN CURLcode curl_ws_recv(CURL *d, void *buffer, }
else if(n == 0) {
/* connection closed */
- infof(data, "connection expectedly closed?");
+ infof(data, "[WS] connection expectedly closed?");
return CURLE_GOT_NOTHING;
}
CURL_TRC_WS(data, "curl_ws_recv, added %zu bytes from network",
@@ -1196,11 +1282,11 @@ static CURLcode ws_flush(struct Curl_easy *data, struct websocket *ws, return result;
}
else if(result) {
- failf(data, "WS: flush, write error %d", result);
+ failf(data, "[WS] flush, write error %d", result);
return result;
}
else {
- infof(data, "WS: flushed %zu bytes", n);
+ CURL_TRC_WS(data, "flushed %zu bytes", n);
Curl_bufq_skip(&ws->sendbuf, n);
}
}
@@ -1232,7 +1318,7 @@ static CURLcode ws_send_raw_blocking(CURL *d, struct websocket *ws, buflen);
left_ms = Curl_timeleft(data, NULL, FALSE);
if(left_ms < 0) {
- failf(data, "Timeout waiting for socket becoming writable");
+ failf(data, "[WS] Timeout waiting for socket becoming writable");
return CURLE_SEND_ERROR;
}
@@ -1242,7 +1328,7 @@ static CURLcode ws_send_raw_blocking(CURL *d, struct websocket *ws, ev = Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, sock,
left_ms ? left_ms : 500);
if(ev < 0) {
- failf(data, "Error while waiting for socket becoming writable");
+ failf(data, "[WS] Error while waiting for socket becoming writable");
return CURLE_SEND_ERROR;
}
}
@@ -1258,7 +1344,7 @@ static CURLcode ws_send_raw(struct Curl_easy *data, const void *buffer, ws = Curl_conn_meta_get(data->conn, CURL_META_PROTO_WS_CONN);
if(!ws) {
- failf(data, "Not a websocket transfer");
+ failf(data, "[WS] Not a websocket transfer");
return CURLE_SEND_ERROR;
}
if(!buflen)
@@ -1308,13 +1394,13 @@ CURL_EXTERN CURLcode curl_ws_send(CURL *d, const void *buffer_arg, goto out;
}
if(!data->conn) {
- failf(data, "No associated connection");
+ failf(data, "[WS] No associated connection");
result = CURLE_SEND_ERROR;
goto out;
}
ws = Curl_conn_meta_get(data->conn, CURL_META_PROTO_WS_CONN);
if(!ws) {
- failf(data, "Not a websocket transfer");
+ failf(data, "[WS] Not a websocket transfer");
result = CURLE_SEND_ERROR;
goto out;
}
@@ -1327,7 +1413,7 @@ CURL_EXTERN CURLcode curl_ws_send(CURL *d, const void *buffer_arg, goto out;
if(fragsize || flags) {
- failf(data, "ws_send, raw mode: fragsize and flags cannot be non-zero");
+ failf(data, "[WS] fragsize and flags must be zero in raw mode");
return CURLE_BAD_FUNCTION_ARGUMENT;
}
result = ws_send_raw(data, buffer, buflen, sent);
@@ -1342,7 +1428,7 @@ CURL_EXTERN CURLcode curl_ws_send(CURL *d, const void *buffer_arg, if(buflen < ws->sendbuf_payload) {
/* We have been called with LESS buffer data than before. This
* is not how it's supposed too work. */
- failf(data, "curl_ws_send() called with smaller 'buflen' than "
+ failf(data, "[WS] curl_ws_send() called with smaller 'buflen' than "
"bytes already buffered in previous call, %zu vs %zu",
buflen, ws->sendbuf_payload);
result = CURLE_BAD_FUNCTION_ARGUMENT;
@@ -1351,7 +1437,7 @@ CURL_EXTERN CURLcode curl_ws_send(CURL *d, const void *buffer_arg, if((curl_off_t)buflen >
(ws->enc.payload_remain + (curl_off_t)ws->sendbuf_payload)) {
/* too large buflen beyond payload length of frame */
- infof(data, "WS: unaligned frame size (sending %zu instead of %"
+ failf(data, "[WS] unaligned frame size (sending %zu instead of %"
FMT_OFF_T ")",
buflen, ws->enc.payload_remain + ws->sendbuf_payload);
result = CURLE_BAD_FUNCTION_ARGUMENT;
@@ -1384,11 +1470,15 @@ CURL_EXTERN CURLcode curl_ws_send(CURL *d, const void *buffer_arg, if(n < 0 && (result != CURLE_AGAIN))
goto out;
ws->sendbuf_payload += Curl_bufq_len(&ws->sendbuf) - prev_len;
+ if(!ws->sendbuf_payload) {
+ result = CURLE_AGAIN;
+ goto out;
+ }
}
/* flush, blocking when in callback */
result = ws_flush(data, ws, Curl_is_in_callback(data));
- if(!result) {
+ if(!result && ws->sendbuf_payload > 0) {
*sent += ws->sendbuf_payload;
buffer += ws->sendbuf_payload;
buflen -= ws->sendbuf_payload;
|