Skip to content
Snippets Groups Projects
This project is mirrored from https://*****:*****@github.com/curl/curl. Pull mirroring updated .
  1. Jul 30, 2025
  2. Jul 29, 2025
  3. Jul 28, 2025
    • Stefan Eissing's avatar
      multi: process pending, one by one · 85e18a5b
      Stefan Eissing authored
      Before curl 8.14.0, when pending was a list, `process_pending_handles()`
      move a single transfer to processing. In 8.14.0 we changed that to move
      all pending transfers to processing. This lead to unwanted performance
      drops as reported in #18017.
      
      Restore the old behaviour.
      
      While the old behviour is better, the overall handling of "pending"
      transfers is not optimal, since we do not keep track of the "condition"
      a pending transfer is waiting on. This means, when moving a single,
      pending transfer, we might move one that still cannot be processed while
      another that could is kept pending.
      
      Since we trigger `process_pending_handles()` from various changes, the
      stalled pending will eventually make it to the processing queue, but
      this is not optimal.
      
      Fixes #18017
      Reported-by: rm-rmonaghan on github
      Closes #18056
      85e18a5b
    • Daniel Stenberg's avatar
      ws: avoid NULL pointer deref in curl_ws_recv · 9d2075bd
      Daniel Stenberg authored
      If a NULL easy handle is passed in.
      
      Pointed out by Coverity
      
      Follow-up to 960fb492
      
      Closes #18065
      9d2075bd
    • Eshan Kelkar's avatar
      libssh: Use sftp_aio instead of sftp_async for sftp_recv · f7af8ada
      Eshan Kelkar authored
      
      This commit replaces the usage of the old deprecated sftp_async API with
      the new sftp_aio API for remote file reading.
      
      Signed-off-by: default avatarEshan Kelkar <eshankelkar@galorithm.com>
      
      Closes #17440
      f7af8ada
    • Viktor Szakats's avatar
      memory: make function overrides work reliably in unity builds · 3bb5e58c
      Viktor Szakats authored
      Fixing:
      - HTTPS-RR builds with c-ares and Linux MUSL.
      - curl-for-win minimal builds with Linux MUSL.
      
      It should fix all other kinds of entaglement between curl's redefintions
      of system symbols and system (or 3rd-party) headers sensitive to that.
      
      It also syncs memory override behavior between unity & non-unity builds,
      thus reducing build variations.
      
      The idea is to define and declare everything once in `curl_setup.h`,
      without overriding any system symbols with curl ones yet. Then, like
      before this patch, override them, if necessary, in each source file via
      `curl_memory.h` and `memdebug.h`, after including system headers.
      To ensure a clean slate with no overrides at the beginning of each
      source file, reset all of them unconditionally at the end of
      `curl_setup.h`, by including `curl_mem_undef.h`. (This assumes
      `curl_setup.h` is always included first, which is already the case
      throughout the codebase.)
      
      `curl_mem_undef.h` can also be included explicitly wherever overrides
      are causing problems. E.g. in tests which use unity-style builds and
      a previously included `curl_memory.h`/`memdebug.h` can be spilling into
      other source files.
      
      The simplified role of the two override headers:
      - `curl_memory.h`: overrides system memory allocator functions to
        libcurl ones, when memory tracing (aka `CURLDEBUG`) is disabled.
      - `memdebug.h`: overrides system memory allocator and some other
        functions to curl debug functions, when memory tracing is enabled.
      
      Changed made in this patch, step-by-step:
      - curl_memory.h: move allocator typedefs and protos to `curl_setup.h`.
      - memdebug.h: move `ALLOC_*` macros to `curl_setup.h`.
      - memdebug.h: move allocator protos to `curl_setup.h`.
      - memdebug.h: move `Curl_safefree()` macro to `curl_setup.h`.
        (it's a regular macro, with a one-time, global, definition.)
      - curl_memory.h: move system symbol undefs to a new, separate header:
        `curl_mem_undef.h`.
      - curl_setup.h: include `curl_mem_undef.h` at the end, unconditionally,
        to reset system symbol macros after each inclusion.
      - handle `sclose()` and `fake_sclose()` in `curl_setup.h`. They are not
        system symbols, a one-time definition does the job.
      
      Also:
      - GHA/linux: enable unity mode for the HTTP-RR c-ares MUSL job.
        Follow-up to 17ab4d62 #16413
      
      That said, I'd still find it better to avoid redefining system macros.
      To communicate clearly the fact that they are not the original system
      calls and they do behave differently. And, it would allow dropping the
      undef/redef dance in each source file, and maintaining the logic with
      it. The "last #include files should be in this order" comments in each
      source would also become unnecessary. Also the trick of using
      `(func)` (or interim macros) to call the non-overridden function where
      required. This method works for printf and most everything else already.
      For `_tcsdup`, socket and fopen functions this could work without
      disturbing the codebase much.
      
      Ref: #16428 (clean reboot of)
      
      Closes #17827
      3bb5e58c
    • Viktor Szakats's avatar
      CURLOPT: bump `CURLHEADER_*` macros to `long`, drop casts · 113f6aac
      Viktor Szakats authored
      This patch bumps the size of these macros from `int` to `long`, while
      keeping their actual values the same. It may cause incompatibilities in
      user code, requiring the bump of holder variables and/or adding casts:
      
      - CURLHEADER_SEPARATE
      - CURLHEADER_UNIFIED
      
      Also:
      - keep existing cast within the documentation to make sure it applies
        to older curl versions as well.
      
      Closes #18055
      113f6aac
    • Viktor Szakats's avatar
      CURLOPT: bump `CURLPROXY_*` enums to `long`, drop casts · 1a12663d
      Viktor Szakats authored
      This patch bumps the size of these macros from `int` to `long`, while
      keeping their actual values the same. It may cause incompatibilities in
      user code, requiring the bump of holder variables and/or adding casts:
      
      - CURLPROXY_HTTP
      - CURLPROXY_HTTP_1_0
      - CURLPROXY_HTTPS
      - CURLPROXY_HTTPS2
      - CURLPROXY_SOCKS4
      - CURLPROXY_SOCKS4A
      - CURLPROXY_SOCKS5
      - CURLPROXY_SOCKS5_HOSTNAME
      
      Also:
      - keep existing cast within the documentation to make sure it applies
        to older curl versions as well.
      
      Closes #18054
      1a12663d
    • Viktor Szakats's avatar
      CURLOPT: bump `CURLALTSVC_*` macros to `long` · d45b85d7
      Viktor Szakats authored
      This patch bumps the size of these macros from `int` to `long`, while
      keeping their actual values the same. It may cause incompatibilities in
      user code, requiring the bump of holder variables and/or adding casts:
      
      - CURLALTSVC_H1
      - CURLALTSVC_H2
      - CURLALTSVC_H3
      - CURLALTSVC_READONLYFILE
      
      Also:
      - keep existing cast within the documentation to make sure it applies
        to older curl versions as well.
      
      Closes #18063
      d45b85d7
    • Viktor Szakats's avatar
      lib1560: replace an `int` with `bool` · 81f5991e
      Viktor Szakats authored
      Follow-up to 7d1ca2e7 #17933
      
      Closes #18064
      81f5991e
    • Viktor Szakats's avatar
      contrithanks: fix for BSD `sed` tool · 577ec094
      Viktor Szakats authored
      Fixing on macOS, and possibly other BSDs:
      ```
      sed: 83: ./docs/THANKS-filter: RE error: illegal byte sequence
      ```
      Where line 83 contains `\xED`.
      
      Switch to raw encoding to avoid `sed` evaluating the stream of bytes.
      
      Ref: #18061
      
      Closes #18062
      577ec094
    • Viktor Szakats's avatar
      delta: fix warnings, fix for non-GNU `date` tool · b1df1d38
      Viktor Szakats authored
      It makes the script run on BSD-like envs.
      
      Follow-up to f63bdea7 #18058
      Follow-up to 2ec54556 #17877
      
      Closes #18061
      b1df1d38
Loading