- tool_bname: scope an include.
- `endif` comments.
- Markdown fixes.
- comment tidy-ups.
- whitespace, newlines, indent.
Closes #20309
name: ${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.name }}
needs:
- build-cache
- runs-on: 'ubuntu-latest'
+ runs-on: ubuntu-latest
timeout-minutes: 10
env:
MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
jobs:
cmake-autotools:
name: 'autotools & cmake'
- runs-on: 'ubuntu-latest'
+ runs-on: ubuntu-latest
container: 'debian:stretch'
env:
jobs:
ios:
name: "iOS, ${{ (matrix.build.generator && format('CM-{0}', matrix.build.generator)) || (matrix.build.generate && 'CM' || 'AM' )}} ${{ matrix.build.name }} arm64"
- runs-on: 'macos-latest'
+ runs-on: macos-latest
timeout-minutes: 10
env:
DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer"
macos:
name: "${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.compiler }} ${{ matrix.build.name }}"
- runs-on: 'macos-15'
+ runs-on: macos-15
timeout-minutes: 15
env:
DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer"
android:
name: "Android ${{ matrix.platform }}, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.name }} arm64"
- runs-on: 'ubuntu-latest'
+ runs-on: ubuntu-latest
timeout-minutes: 5
env:
MAKEFLAGS: -j 5
msdos:
name: "MS-DOS, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} djgpp !ssl i586"
- runs-on: 'ubuntu-latest'
+ runs-on: ubuntu-latest
timeout-minutes: 5
env:
MAKEFLAGS: -j 5
ACLOCAL_AMFLAGS = -I m4
-CMAKE_DIST = \
- CMake/cmake_uninstall.in.cmake \
- CMake/curl-config.in.cmake \
- CMake/CurlSymbolHiding.cmake \
- CMake/CurlTests.c \
- CMake/FindBrotli.cmake \
- CMake/FindCares.cmake \
- CMake/FindGnuTLS.cmake \
- CMake/FindGSS.cmake \
- CMake/FindLDAP.cmake \
- CMake/FindLibbacktrace.cmake \
- CMake/FindLibgsasl.cmake \
- CMake/FindLibidn2.cmake \
- CMake/FindLibpsl.cmake \
- CMake/FindLibrtmp.cmake \
- CMake/FindLibssh.cmake \
- CMake/FindLibssh2.cmake \
- CMake/FindLibuv.cmake \
- CMake/FindMbedTLS.cmake \
- CMake/FindNGHTTP2.cmake \
- CMake/FindNGHTTP3.cmake \
- CMake/FindNGTCP2.cmake \
- CMake/FindNettle.cmake \
- CMake/FindQuiche.cmake \
- CMake/FindRustls.cmake \
- CMake/FindWolfSSL.cmake \
- CMake/FindZstd.cmake \
- CMake/Macros.cmake \
- CMake/OtherTests.cmake \
- CMake/PickyWarnings.cmake \
- CMake/Utilities.cmake \
- CMake/unix-cache.cmake \
- CMake/win32-cache.cmake \
- CMakeLists.txt \
- tests/cmake/CMakeLists.txt \
- tests/cmake/test.c \
- tests/cmake/test.sh
+CMAKE_DIST = \
+ CMake/cmake_uninstall.in.cmake \
+ CMake/curl-config.in.cmake \
+ CMake/CurlSymbolHiding.cmake \
+ CMake/CurlTests.c \
+ CMake/FindBrotli.cmake \
+ CMake/FindCares.cmake \
+ CMake/FindGnuTLS.cmake \
+ CMake/FindGSS.cmake \
+ CMake/FindLDAP.cmake \
+ CMake/FindLibbacktrace.cmake \
+ CMake/FindLibgsasl.cmake \
+ CMake/FindLibidn2.cmake \
+ CMake/FindLibpsl.cmake \
+ CMake/FindLibrtmp.cmake \
+ CMake/FindLibssh.cmake \
+ CMake/FindLibssh2.cmake \
+ CMake/FindLibuv.cmake \
+ CMake/FindMbedTLS.cmake \
+ CMake/FindNGHTTP2.cmake \
+ CMake/FindNGHTTP3.cmake \
+ CMake/FindNGTCP2.cmake \
+ CMake/FindNettle.cmake \
+ CMake/FindQuiche.cmake \
+ CMake/FindRustls.cmake \
+ CMake/FindWolfSSL.cmake \
+ CMake/FindZstd.cmake \
+ CMake/Macros.cmake \
+ CMake/OtherTests.cmake \
+ CMake/PickyWarnings.cmake \
+ CMake/Utilities.cmake \
+ CMake/unix-cache.cmake \
+ CMake/win32-cache.cmake \
+ CMakeLists.txt \
+ tests/cmake/CMakeLists.txt \
+ tests/cmake/test.c \
+ tests/cmake/test.sh
EXTRA_DIST = CHANGES.md COPYING RELEASE-NOTES Dockerfile .editorconfig $(CMAKE_DIST)
The first line is a succinct description of the change and should ideally work
as a single line in the RELEASE NOTES.
- - use the imperative, present tense: **change** not "changed" nor "changes"
- - do not capitalize the first letter
- - no period (.) at the end
+- use the imperative, present tense: **change** not "changed" nor "changes"
+- do not capitalize the first letter
+- no period (.) at the end
The `[area]` in the first line can be `http2`, `cookies`, `openssl` or
similar. There is no fixed list to select from but using the same "area" as
work.
- `Follow-up to {shorthash}` - if this fixes or continues a previous commit;
-add a `Ref:` that commit's PR or issue if it is not a small, obvious fix;
-followed by an empty line
+ add a `Ref:` that commit's PR or issue if it is not a small, obvious fix;
+ followed by an empty line
- `Bug: URL` to the source of the report or more related discussion; use
-`Fixes` for GitHub issues instead when that is appropriate.
+ `Fixes` for GitHub issues instead when that is appropriate.
- `Approved-by: John Doe` - credit someone who approved the PR.
- `Authored-by: John Doe` - credit the original author of the code; only use
-this if you cannot use `git commit --author=...`.
+ this if you cannot use `git commit --author=...`.
- `Signed-off-by: John Doe` - we do not use this, but do not bother removing
it.
- `whatever-else-by:` credit all helpers, finders, doers; try to use one of
-the following keywords if at all possible, for consistency: `Acked-by:`,
-`Assisted-by:`, `Co-authored-by:`, `Found-by:`, `Reported-by:`,
-`Reviewed-by:`, `Suggested-by:`, `Tested-by:`.
+ the following keywords if at all possible, for consistency: `Acked-by:`,
+ `Assisted-by:`, `Co-authored-by:`, `Found-by:`, `Reported-by:`,
+ `Reviewed-by:`, `Suggested-by:`, `Tested-by:`.
- `Ref: #1234` - if this is related to a GitHub issue or PR, possibly one that
-has already been closed.
+ has already been closed.
- `Ref: URL` to more information about the commit; use `Bug:` instead for a
-reference to a bug on another bug tracker]
+ reference to a bug on another bug tracker]
- `Fixes #1234` - if this fixes a GitHub issue; GitHub closes the issue once
-this commit is merged.
+ this commit is merged.
- `Closes #1234` - if this merges a GitHub PR; GitHub closes the PR once this
-commit is merged.
+ commit is merged.
Do not forget to use commit with `--author` if you commit someone else's work,
and make sure that you have your own user and email setup correctly in git
several high quality patches first, before you can be granted push access.
## Useful resources
- - [Webinar on getting code into curl](https://youtu.be/QmZ3W1d6LQI)
+
+- [Webinar on getting code into curl](https://youtu.be/QmZ3W1d6LQI)
# Update copyright and license information
with as an entry-point into the project, perhaps because you are a newcomer or
even maybe not a terribly experienced developer, here's our advice:
- - Read through this document to get a grasp on a general approach to use
- - Consider adding a test case for something not currently tested (correctly)
- - Consider updating or adding documentation
- - One way to get started gently in the project, is to participate in an
- existing issue/PR and help out by reproducing the issue, review the code in
- the PR etc.
+- Read through this document to get a grasp on a general approach to use
+- Consider adding a test case for something not currently tested (correctly)
+- Consider updating or adding documentation
+- One way to get started gently in the project, is to participate in an
+ existing issue/PR and help out by reproducing the issue, review the code in
+ the PR etc.
## Help wanted
## `curl_easy_setopt()` options:
- - `CURLOPT_HSTS_CTRL` - enable HSTS for this easy handle
- - `CURLOPT_HSTS` - specify filename where to store the HSTS cache on close
- (and possibly read from at startup)
+- `CURLOPT_HSTS_CTRL` - enable HSTS for this easy handle
+- `CURLOPT_HSTS` - specify filename where to store the HSTS cache on close
+ (and possibly read from at startup)
## curl command line options
- - `--hsts [filename]` - enable HSTS, use the file as HSTS cache. If filename
- is `""` (no length) then no file is used, only in-memory cache.
+- `--hsts [filename]` - enable HSTS, use the file as HSTS cache. If filename
+ is `""` (no length) then no file is used, only in-memory cache.
## HSTS cache file format
## Possible future additions
- - `CURLOPT_HSTS_PRELOAD` - provide a set of HSTS hostnames to load first
- - ability to save to something else than a file
+- `CURLOPT_HSTS_PRELOAD` - provide a set of HSTS hostnames to load first
+- ability to save to something else than a file
To fix before we remove the experimental label:
- - the used QUIC library needs to consider itself non-beta
- - it is fine to "leave" individual backends as experimental if necessary
+- the used QUIC library needs to consider itself non-beta
+- it is fine to "leave" individual backends as experimental if necessary
# ngtcp2 version
You can configure for in source tree builds or for a build tree
that is apart from the source tree.
- - Build in the source tree.
+- Build in the source tree.
- $ cmake -B .
+ $ cmake -B .
- - Build in a separate directory (parallel to the curl source tree in this
- example). The build directory is created for you. This is recommended over
- building in the source tree to separate source and build artifacts.
+- Build in a separate directory (parallel to the curl source tree in this
+ example). The build directory is created for you. This is recommended over
+ building in the source tree to separate source and build artifacts.
- $ cmake -B ../curl-build
+ $ cmake -B ../curl-build
For the full list of CMake build configuration variables see
[the corresponding section](#cmake-build-options).
These options are provided to select the TLS backend to use.
- - AmiSSL: `--with-amissl`
- - GnuTLS: `--with-gnutls`.
- - mbedTLS: `--with-mbedtls`
- - OpenSSL: `--with-openssl` (also for BoringSSL, AWS-LC, LibreSSL, and quictls)
- - Rustls: `--with-rustls`
- - Schannel: `--with-schannel`
- - wolfSSL: `--with-wolfssl`
+- AmiSSL: `--with-amissl`
+- GnuTLS: `--with-gnutls`.
+- mbedTLS: `--with-mbedtls`
+- OpenSSL: `--with-openssl` (also for BoringSSL, AWS-LC, LibreSSL, and quictls)
+- Rustls: `--with-rustls`
+- Schannel: `--with-schannel`
+- wolfSSL: `--with-wolfssl`
You can build curl with *multiple* TLS backends at your choice, but some TLS
backends cannot be combined: if you build with an OpenSSL fork (or wolfSSL),
While the build system tries to find good defaults on the platform you
use, you may specify these explicitly. The following options are provided:
- - `--with-ca-bundle=FILE`: the file that libcurl loads default root
- certificates from.
- - `--with-ca-path=DIRECTORY`: a directory in which root certificates files
- are found.
- - `--with-ca-embed=FILE`: a file read *at build time* and added to `libcurl`.
- - `--with-ca-fallback`: an OpenSSL specific option for delegating default
- trust anchor selection to what OpenSSL thinks is best, *if* there are
-no other certificates configured by the application.
- - `--with-apple-sectrust`: use the system "SecTrust" service on Apple
- operating systems for verification. (Added in 8.17.0)
+- `--with-ca-bundle=FILE`: the file that libcurl loads default root
+ certificates from.
+- `--with-ca-path=DIRECTORY`: a directory in which root certificates files
+ are found.
+- `--with-ca-embed=FILE`: a file read *at build time* and added to `libcurl`.
+- `--with-ca-fallback`: an OpenSSL specific option for delegating default
+ trust anchor selection to what OpenSSL thinks is best, *if* there are
+ no other certificates configured by the application.
+- `--with-apple-sectrust`: use the system "SecTrust" service on Apple
+ operating systems for verification. (Added in 8.17.0)
## MultiSSL and HTTP/3
## Building Windows DLLs and C runtime (CRT) linkage issues
- As a general rule, building a DLL with static CRT linkage is highly
- discouraged, and intermixing CRTs in the same app is something to avoid at
- any cost.
+As a general rule, building a DLL with static CRT linkage is highly
+discouraged, and intermixing CRTs in the same app is something to avoid at
+any cost.
- Reading and comprehending Microsoft Knowledge Base articles KB94248 and
- KB140584 is a must for any Windows developer. Especially important is full
- understanding if you are not going to follow the advice given above.
+Reading and comprehending Microsoft Knowledge Base articles KB94248 and
+KB140584 is a must for any Windows developer. Especially important is full
+understanding if you are not going to follow the advice given above.
- - [How To Use the C Runtime](https://learn.microsoft.com/troubleshoot/developer/visualstudio/cpp/libraries/use-c-run-time)
- - [Runtime Library Compiler Options](https://learn.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library)
- - [Potential Errors Passing CRT Objects Across DLL Boundaries](https://learn.microsoft.com/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries)
+- [How To Use the C Runtime](https://learn.microsoft.com/troubleshoot/developer/visualstudio/cpp/libraries/use-c-run-time)
+- [Runtime Library Compiler Options](https://learn.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library)
+- [Potential Errors Passing CRT Objects Across DLL Boundaries](https://learn.microsoft.com/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries)
If your app is misbehaving in some strange way, or it is suffering from memory
corruption, before asking for further help, please try first to rebuild every
single library your app uses as well as your app using the debug
multi-threaded dynamic C runtime.
- If you get linkage errors read section 5.7 of the FAQ document.
+If you get linkage errors read section 5.7 of the FAQ document.
## Cygwin
<summary>Package List</summary>
```
- binutil - required
- gcc-core - required
- libpsl-devel - required
- libtool - required
- perl - required
- make - required
- - NOTE - if there is an error regarding make, open the cygwin terminal, and run:
- ln -s /usr/bin/make /usr/bin/gmake
+ binutil - required
+ gcc-core - required
+ libpsl-devel - required
+ libtool - required
+ perl - required
+ make - required
+ - NOTE - if there is an error regarding make, open the cygwin terminal, and run:
+ ln -s /usr/bin/make /usr/bin/gmake
```
</details>
</details>
- 1. `sh configure <configure_options>`
- 2. `make`
+1. `sh configure <configure_options>`
+2. `make`
If any error occurs during curl installation, try:
- - reinstalling the required `cygwin` packages from the list above
- - temporarily move `cygwin` to the top of your path
- - install all of the suggested `cygwin` packages
+
+- reinstalling the required `cygwin` packages from the list above
+- temporarily move `cygwin` to the top of your path
+- install all of the suggested `cygwin` packages
## MS-DOS
Notes:
- - Requires DJGPP 2.04 or upper.
+- Requires DJGPP 2.04 or upper.
- - Compile Watt-32 (and OpenSSL) with the same version of DJGPP. Otherwise
- things go wrong because things like FS-extensions and `errno` values have
- been changed between releases.
+- Compile Watt-32 (and OpenSSL) with the same version of DJGPP. Otherwise
+ things go wrong because things like FS-extensions and `errno` values have
+ been changed between releases.
## AmigaOS
If you want to set any of these defines you have the following options:
- - Modify `lib/config-win32.h`
- - Modify `lib/curl_setup.h`
- - Modify the "Preprocessor Definitions" in the libcurl project
+- Modify `lib/config-win32.h`
+- Modify `lib/curl_setup.h`
+- Modify the "Preprocessor Definitions" in the libcurl project
Note: The pre-processor settings can be found using the Visual Studio IDE
under "Project -> Properties -> Configuration Properties -> C/C++ ->
visible to libcurl and curl compilation processes. To set this definition you
have the following alternatives:
- - Modify `lib/config-win32.h`
- - Modify the "Preprocessor Definitions" in the libcurl project
+- Modify `lib/config-win32.h`
+- Modify the "Preprocessor Definitions" in the libcurl project
Note: The pre-processor settings can be found using the Visual Studio IDE
under "Project -> Properties -> Configuration Properties -> C/C++ ->
use, here are some other flags that can reduce the size of the library by
disabling support for some features (run `./configure --help` to see them all):
- - `--disable-aws` (cryptographic authentication)
- - `--disable-basic-auth` (cryptographic authentication)
- - `--disable-bearer-auth` (cryptographic authentication)
- - `--disable-digest-auth` (cryptographic authentication)
- - `--disable-http-auth` (all HTTP authentication)
- - `--disable-kerberos-auth` (cryptographic authentication)
- - `--disable-negotiate-auth` (cryptographic authentication)
- - `--disable-ntlm` (NTLM authentication)
- - `--disable-alt-svc` (HTTP Alt-Svc)
- - `--disable-ares` (the C-ARES DNS library)
- - `--disable-cookies` (HTTP cookies)
- - `--disable-dateparse` (date parsing for time conditionals)
- - `--disable-dnsshuffle` (internal server load spreading)
- - `--disable-doh` (DNS-over-HTTP)
- - `--disable-form-api` (POST form API)
- - `--disable-get-easy-options` (lookup easy options at runtime)
- - `--disable-headers-api` (API to access headers)
- - `--disable-hsts` (HTTP Strict Transport Security)
- - `--disable-ipv6` (IPv6)
- - `--disable-libcurl-option` (--libcurl C code generation support)
- - `--disable-manual` (--manual built-in documentation)
- - `--disable-mime` (MIME API)
- - `--disable-netrc` (.netrc file)
- - `--disable-progress-meter` (graphical progress meter in library)
- - `--disable-proxy` (HTTP and SOCKS proxies)
- - `--disable-socketpair` (socketpair for asynchronous name resolving)
- - `--disable-threaded-resolver` (threaded name resolver)
- - `--disable-tls-srp` (Secure Remote Password authentication for TLS)
- - `--disable-unix-sockets` (Unix sockets)
- - `--disable-verbose` (eliminates debugging strings and error code strings)
- - `--disable-versioned-symbols` (versioned symbols)
- - `--enable-symbol-hiding` (eliminates unneeded symbols in the shared library)
- - `--without-brotli` (Brotli on-the-fly decompression)
- - `--without-libpsl` (Public Suffix List in cookies)
- - `--without-nghttp2` (HTTP/2 using nghttp2)
- - `--without-ngtcp2` (HTTP/2 using ngtcp2)
- - `--without-zstd` (Zstd on-the-fly decompression)
- - `--without-libidn2` (internationalized domain names)
- - `--without-librtmp` (RTMP)
- - `--without-ssl` (SSL/TLS)
- - `--without-zlib` (gzip/deflate on-the-fly decompression)
+- `--disable-aws` (cryptographic authentication)
+- `--disable-basic-auth` (cryptographic authentication)
+- `--disable-bearer-auth` (cryptographic authentication)
+- `--disable-digest-auth` (cryptographic authentication)
+- `--disable-http-auth` (all HTTP authentication)
+- `--disable-kerberos-auth` (cryptographic authentication)
+- `--disable-negotiate-auth` (cryptographic authentication)
+- `--disable-ntlm` (NTLM authentication)
+- `--disable-alt-svc` (HTTP Alt-Svc)
+- `--disable-ares` (the C-ARES DNS library)
+- `--disable-cookies` (HTTP cookies)
+- `--disable-dateparse` (date parsing for time conditionals)
+- `--disable-dnsshuffle` (internal server load spreading)
+- `--disable-doh` (DNS-over-HTTP)
+- `--disable-form-api` (POST form API)
+- `--disable-get-easy-options` (lookup easy options at runtime)
+- `--disable-headers-api` (API to access headers)
+- `--disable-hsts` (HTTP Strict Transport Security)
+- `--disable-ipv6` (IPv6)
+- `--disable-libcurl-option` (--libcurl C code generation support)
+- `--disable-manual` (--manual built-in documentation)
+- `--disable-mime` (MIME API)
+- `--disable-netrc` (.netrc file)
+- `--disable-progress-meter` (graphical progress meter in library)
+- `--disable-proxy` (HTTP and SOCKS proxies)
+- `--disable-socketpair` (socketpair for asynchronous name resolving)
+- `--disable-threaded-resolver` (threaded name resolver)
+- `--disable-tls-srp` (Secure Remote Password authentication for TLS)
+- `--disable-unix-sockets` (Unix sockets)
+- `--disable-verbose` (eliminates debugging strings and error code strings)
+- `--disable-versioned-symbols` (versioned symbols)
+- `--enable-symbol-hiding` (eliminates unneeded symbols in the shared library)
+- `--without-brotli` (Brotli on-the-fly decompression)
+- `--without-libpsl` (Public Suffix List in cookies)
+- `--without-nghttp2` (HTTP/2 using nghttp2)
+- `--without-ngtcp2` (HTTP/2 using ngtcp2)
+- `--without-zstd` (Zstd on-the-fly decompression)
+- `--without-libidn2` (internationalized domain names)
+- `--without-librtmp` (RTMP)
+- `--without-ssl` (SSL/TLS)
+- `--without-zlib` (gzip/deflate on-the-fly decompression)
Be sure also to strip debugging symbols from your binaries after compiling
using 'strip' or an option like `-s`. If space is really tight, you may be able
line. Following is a list of appropriate key words for those configure options
that are not automatically detected:
- - `--disable-cookies` !cookies
- - `--disable-dateparse` !RETRY-AFTER !`CURLOPT_TIMECONDITION` !`CURLINFO_FILETIME` !`If-Modified-Since` !`curl_getdate` !`-z`
- - `--disable-libcurl-option` !`--libcurl`
- - `--disable-verbose` !verbose\ logs
+- `--disable-cookies` !cookies
+- `--disable-dateparse` !RETRY-AFTER !`CURLOPT_TIMECONDITION` !`CURLINFO_FILETIME` !`If-Modified-Since` !`curl_getdate` !`-z`
+- `--disable-libcurl-option` !`--libcurl`
+- `--disable-verbose` !verbose\ logs
# Ports
## Portability
- We write curl and libcurl to compile with C89 compilers on 32-bit and up
- machines. Most of libcurl assumes more or less POSIX compliance but that is
- not a requirement.
+We write curl and libcurl to compile with C89 compilers on 32-bit and up
+machines. Most of libcurl assumes more or less POSIX compliance but that is
+not a requirement.
- We write libcurl to build and work with lots of third party tools, and we
- want it to remain functional and buildable with these and later versions
- (older versions may still work but is not what we work hard to maintain):
+We write libcurl to build and work with lots of third party tools, and we
+want it to remain functional and buildable with these and later versions
+(older versions may still work but is not what we work hard to maintain):
## Dependencies
- We aim to support these or later versions.
+We aim to support these or later versions.
- - brotli 1.0.0 (2017-09-21)
- - c-ares 1.6.0 (2008-12-09)
- - GnuTLS 3.6.5 (2018-12-01)
- - libidn2 2.0.0 (2017-03-29)
- - LibreSSL 2.9.1 (2019-04-22)
- - libssh 0.9.0 (2019-06-28)
- - libssh2 1.9.0 (2019-06-20)
- - mbedTLS 3.2.0 (2022-07-11)
- - MIT Kerberos 1.3 (2003-07-31)
- - nghttp2 1.15.0 (2016-09-25)
- - OpenLDAP 2.0 (2000-08-01)
- - OpenSSL 3.0.0 (2021-09-07)
- - Windows XP 5.1 (2001-08-24 - 2009-04-14)
- - wolfSSL 3.4.6 (2017-09-22)
- - zlib 1.2.5.2 (2011-12-11)
- - zstd 1.0 (2016-08-31)
+- brotli 1.0.0 (2017-09-21)
+- c-ares 1.6.0 (2008-12-09)
+- GnuTLS 3.6.5 (2018-12-01)
+- libidn2 2.0.0 (2017-03-29)
+- LibreSSL 2.9.1 (2019-04-22)
+- libssh 0.9.0 (2019-06-28)
+- libssh2 1.9.0 (2019-06-20)
+- mbedTLS 3.2.0 (2022-07-11)
+- MIT Kerberos 1.3 (2003-07-31)
+- nghttp2 1.15.0 (2016-09-25)
+- OpenLDAP 2.0 (2000-08-01)
+- OpenSSL 3.0.0 (2021-09-07)
+- Windows XP 5.1 (2001-08-24 - 2009-04-14)
+- wolfSSL 3.4.6 (2017-09-22)
+- zlib 1.2.5.2 (2011-12-11)
+- zstd 1.0 (2016-08-31)
## Build tools
- When writing code (mostly for generating stuff included in release tarballs)
- we use a few "build tools" and we make sure that we remain functional with
- these versions:
+When writing code (mostly for generating stuff included in release tarballs)
+we use a few "build tools" and we make sure that we remain functional with
+these versions:
- - cmake 3.7 (2016-11-11)
- - GNU autoconf 2.59 (2003-11-06)
- - GNU automake 1.7 (2002-09-25)
- - GNU libtool 1.4.2 (2001-09-11)
- - GNU m4 1.4 (2007-09-21)
- - mingw-w64 3.0 (2013-09-20)
- - perl 5.8 (2002-07-19), on Windows: 5.22 (2015-06-01)
- - Visual Studio 2010 10.0 (2010-04-12 - 2020-07-14)
+- cmake 3.7 (2016-11-11)
+- GNU autoconf 2.59 (2003-11-06)
+- GNU automake 1.7 (2002-09-25)
+- GNU libtool 1.4.2 (2001-09-11)
+- GNU m4 1.4 (2007-09-21)
+- mingw-w64 3.0 (2013-09-20)
+- perl 5.8 (2002-07-19), on Windows: 5.22 (2015-06-01)
+- Visual Studio 2010 10.0 (2010-04-12 - 2020-07-14)
-Library Symbols
-===============
+## Library Symbols
- All symbols used internally in libcurl must use a `Curl_` prefix if they are
- used in more than a single file. Single-file symbols must be made static.
- Public ("exported") symbols must use a `curl_` prefix. Public API functions
- are marked with `CURL_EXTERN` in the public header files so that all others
- can be hidden on platforms where this is possible.
+All symbols used internally in libcurl must use a `Curl_` prefix if they are
+used in more than a single file. Single-file symbols must be made static.
+Public ("exported") symbols must use a `curl_` prefix. Public API functions
+are marked with `CURL_EXTERN` in the public header files so that all others
+can be hidden on platforms where this is possible.
_UNICODE and UNICODE defined. Except for Cygwin, Windows cannot use UTF-8 as a
locale.
- https://curl.se/bug/?i=345
- https://curl.se/bug/?i=731
- https://curl.se/bug/?i=3747
+https://curl.se/bug/?i=345
+https://curl.se/bug/?i=731
+https://curl.se/bug/?i=3747
NTLM authentication and Unicode
prevent them from appearing in process listings. It does not blank all
arguments, even though some that are not blanked might contain sensitive data.
- - not all systems allow the arguments to be blanked in the first place
- - since curl blanks the argument itself they are readable for a short moment
- no matter what
- - virtually every argument can contain sensitive data, depending on use
- - blanking all arguments would make it impractical for users to differentiate
- curl command lines in process listings
+- not all systems allow the arguments to be blanked in the first place
+- since curl blanks the argument itself they are readable for a short moment
+ no matter what
+- virtually every argument can contain sensitive data, depending on use
+- blanking all arguments would make it impractical for users to differentiate
+ curl command lines in process listings
## HTTP headers in redirects
From left-to-right:
- - `%` - percentage completed of the whole transfer
- - `Total` - total size of the whole expected transfer
- - `%` - percentage completed of the download
- - `Received` - currently downloaded amount of bytes
- - `%` - percentage completed of the upload
- - `Xferd` - currently uploaded amount of bytes
- - `Average Speed Dload` - the average transfer speed of the download
- - `Average Speed Upload` - the average transfer speed of the upload
- - `Time Total` - expected time to complete the operation
- - `Time Current` - time passed since the invoke
- - `Time Left` - expected time left to completion
- - `Curr.Speed` - the average transfer speed the last 5 seconds (the first
+- `%` - percentage completed of the whole transfer
+- `Total` - total size of the whole expected transfer
+- `%` - percentage completed of the download
+- `Received` - currently downloaded amount of bytes
+- `%` - percentage completed of the upload
+- `Xferd` - currently uploaded amount of bytes
+- `Average Speed Dload` - the average transfer speed of the download
+- `Average Speed Upload` - the average transfer speed of the upload
+- `Time Total` - expected time to complete the operation
+- `Time Current` - time passed since the invoke
+- `Time Left` - expected time left to completion
+- `Curr.Speed` - the average transfer speed the last 5 seconds (the first
5 seconds of a transfer is based on less time of course.)
The `-#` option displays a totally different progress bar that does not need
Other interesting options for it `-t` include:
- - `XDISPLOC=<X display>` Sets the X display location.
- - `NEW_ENV=<var,val>` Sets an environment variable.
+- `XDISPLOC=<X display>` Sets the X display location.
+- `NEW_ENV=<var,val>` Sets an environment variable.
NOTE: The telnet protocol does not specify any way to login with a specified
user and password so curl cannot do that automatically. To do that, you need to
CLEANFILES = $(MK_CA_DOCS) $(man_MANS) $(TEST_DOCS)
endif
-TESTDOCS = \
- tests/FILEFORMAT.md \
- tests/HTTP.md \
- tests/TEST-SUITE.md
-
-INTERNALDOCS = \
- internals/BUFQ.md \
- internals/BUFREF.md \
- internals/CHECKSRC.md \
- internals/CLIENT-READERS.md \
- internals/CLIENT-WRITERS.md \
- internals/CODE_STYLE.md \
- internals/CONNECTION-FILTERS.md \
- internals/CURLX.md \
- internals/DYNBUF.md \
- internals/HASH.md \
- internals/LLIST.md \
- internals/MID.md \
- internals/MQTT.md \
- internals/MULTI-EV.md \
- internals/NEW-PROTOCOL.md \
- internals/PORTING.md \
- internals/RATELIMITS.md \
- internals/README.md \
- internals/SCORECARD.md \
- internals/SPLAY.md \
- internals/STRPARSE.md \
- internals/TIME-KEEPING.md \
- internals/TLS-SESSIONS.md \
- internals/UINT_SETS.md \
- internals/WEBSOCKET.md
-
-EXTRA_DIST = \
- $(CURLPAGES) \
- $(INTERNALDOCS) \
- $(TESTDOCS) \
- ALTSVC.md \
- BINDINGS.md \
- BUG-BOUNTY.md \
- BUGS.md \
- CIPHERS.md \
- CIPHERS-TLS12.md \
- CMakeLists.txt \
- CODE_OF_CONDUCT.md \
- CODE_REVIEW.md \
- CONTRIBUTE.md \
- CURL-DISABLE.md \
- CURLDOWN.md \
- DEPRECATE.md \
- DISTROS.md \
- EARLY-RELEASE.md \
- ECH.md \
- EXPERIMENTAL.md \
- FAQ.md \
- FEATURES.md \
- GOVERNANCE.md \
- HELP-US.md \
- HISTORY.md \
- HSTS.md \
- HTTP-COOKIES.md \
- HTTP3.md \
- HTTPSRR.md \
- INFRASTRUCTURE.md \
- INSTALL \
- INSTALL-CMAKE.md \
- INSTALL.md \
- INTERNALS.md \
- IPFS.md \
- KNOWN_BUGS.md \
- KNOWN_RISKS.md \
- MAIL-ETIQUETTE.md \
- MANUAL.md \
- options-in-versions \
- README.md \
- RELEASE-PROCEDURE.md \
- RUSTLS.md \
- ROADMAP.md \
- SECURITY-ADVISORY.md \
- SPONSORS.md \
- SSL-PROBLEMS.md \
- SSLCERTS.md \
- THANKS \
- TODO.md \
- TheArtOfHttpScripting.md \
- URL-SYNTAX.md \
- VERSIONS.md \
- VULN-DISCLOSURE-POLICY.md
+TESTDOCS = \
+ tests/FILEFORMAT.md \
+ tests/HTTP.md \
+ tests/TEST-SUITE.md
+
+INTERNALDOCS = \
+ internals/BUFQ.md \
+ internals/BUFREF.md \
+ internals/CHECKSRC.md \
+ internals/CLIENT-READERS.md \
+ internals/CLIENT-WRITERS.md \
+ internals/CODE_STYLE.md \
+ internals/CONNECTION-FILTERS.md \
+ internals/CURLX.md \
+ internals/DYNBUF.md \
+ internals/HASH.md \
+ internals/LLIST.md \
+ internals/MID.md \
+ internals/MQTT.md \
+ internals/MULTI-EV.md \
+ internals/NEW-PROTOCOL.md \
+ internals/PORTING.md \
+ internals/RATELIMITS.md \
+ internals/README.md \
+ internals/SCORECARD.md \
+ internals/SPLAY.md \
+ internals/STRPARSE.md \
+ internals/TIME-KEEPING.md \
+ internals/TLS-SESSIONS.md \
+ internals/UINT_SETS.md \
+ internals/WEBSOCKET.md
+
+EXTRA_DIST = \
+ $(CURLPAGES) \
+ $(INTERNALDOCS) \
+ $(TESTDOCS) \
+ ALTSVC.md \
+ BINDINGS.md \
+ BUG-BOUNTY.md \
+ BUGS.md \
+ CIPHERS.md \
+ CIPHERS-TLS12.md \
+ CMakeLists.txt \
+ CODE_OF_CONDUCT.md \
+ CODE_REVIEW.md \
+ CONTRIBUTE.md \
+ CURL-DISABLE.md \
+ CURLDOWN.md \
+ DEPRECATE.md \
+ DISTROS.md \
+ EARLY-RELEASE.md \
+ ECH.md \
+ EXPERIMENTAL.md \
+ FAQ.md \
+ FEATURES.md \
+ GOVERNANCE.md \
+ HELP-US.md \
+ HISTORY.md \
+ HSTS.md \
+ HTTP-COOKIES.md \
+ HTTP3.md \
+ HTTPSRR.md \
+ INFRASTRUCTURE.md \
+ INSTALL \
+ INSTALL-CMAKE.md \
+ INSTALL.md \
+ INTERNALS.md \
+ IPFS.md \
+ KNOWN_BUGS.md \
+ KNOWN_RISKS.md \
+ MAIL-ETIQUETTE.md \
+ MANUAL.md \
+ options-in-versions \
+ README.md \
+ RELEASE-PROCEDURE.md \
+ RUSTLS.md \
+ ROADMAP.md \
+ SECURITY-ADVISORY.md \
+ SPONSORS.md \
+ SSL-PROBLEMS.md \
+ SSLCERTS.md \
+ THANKS \
+ TODO.md \
+ TheArtOfHttpScripting.md \
+ URL-SYNTAX.md \
+ VERSIONS.md \
+ VULN-DISCLOSURE-POLICY.md
CD2NROFF = $(top_srcdir)/scripts/cd2nroff $< >$@
`CURLOPT_SSL_CTX_FUNCTION` works perfectly for HTTPS and email protocols, but
it has no effect for LDAPS connections.
- [curl issue 4108](https://github.com/curl/curl/issues/4108)
+[curl issue 4108](https://github.com/curl/curl/issues/4108)
## Paged searches on LDAP server
The official "URL syntax" is primarily defined in these two different
specifications:
- - [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) (although URL is called
- "URI" in there)
- - [The WHATWG URL Specification](https://url.spec.whatwg.org/)
+- [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) (although URL is called
+ "URI" in there)
+- [The WHATWG URL Specification](https://url.spec.whatwg.org/)
RFC 3986 is the earlier one, and curl has always tried to adhere to that one
(since it shipped in January 2005).
Based on what the hostname starts with, curl "guesses" what protocol to use:
- - `ftp.` means FTP
- - `dict.` means DICT
- - `ldap.` means LDAP
- - `imap.` means IMAP
- - `smtp.` means SMTP
- - `pop3.` means POP3
- - all other means HTTP
+- `ftp.` means FTP
+- `dict.` means DICT
+- `ldap.` means LDAP
+- `imap.` means IMAP
+- `smtp.` means SMTP
+- `pop3.` means POP3
+- all other means HTTP
### Globbing letters
data. We consider this functionality a best-effort and omissions are not
security vulnerabilities.
- - not all systems allow the arguments to be blanked in the first place
- - since curl blanks the argument itself they are readable for a short moment
- no matter what
- - virtually every argument can contain sensitive data, depending on use
- - blanking all arguments would make it impractical for users to differentiate
- curl command lines in process listings
+- not all systems allow the arguments to be blanked in the first place
+- since curl blanks the argument itself they are readable for a short moment
+ no matter what
+- virtually every argument can contain sensitive data, depending on use
+- blanking all arguments would make it impractical for users to differentiate
+ curl command lines in process listings
## Busy-loops
* Get a webpage, extract the title with libxml.
* </DESC>
- Written by Lars Nilsson
+ Written by Lars Nilsson
- GNU C++ compile command line suggestion (edit paths accordingly):
+ GNU C++ compile command line suggestion (edit paths accordingly):
- g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cpp \
- -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
+ g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cpp \
+ -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
*/
#include <stdio.h>
#include <string.h>
#include <libxml/HTMLparser.h>
//
-// Case-insensitive string comparison
+// Case-insensitive string comparison
//
#ifdef _WIN32
#endif
//
-// libxml callback context structure
+// libxml callback context structure
//
struct Context {
Context() : addTitle(false) {}
};
//
-// libcurl variables for error strings and returned data
+// libcurl variables for error strings and returned data
static char errorBuffer[CURL_ERROR_SIZE];
static std::string buffer;
//
-// libcurl write callback function
+// libcurl write callback function
//
static size_t writer(char *data, size_t size, size_t nmemb,
std::string *writerData)
}
//
-// libcurl connection initialization
+// libcurl connection initialization
//
static bool init(CURL *&curl, const char *url)
{
}
//
-// libxml start element callback function
+// libxml start element callback function
//
static void StartElement(void *voidContext,
const xmlChar *name,
}
//
-// libxml end element callback function
+// libxml end element callback function
//
static void EndElement(void *voidContext,
const xmlChar *name)
}
//
-// Text handling helper function
+// Text handling helper function
//
static void handleCharacters(Context *context,
const xmlChar *chars,
}
//
-// libxml PCDATA callback function
+// libxml PCDATA callback function
//
static void Characters(void *voidContext,
const xmlChar *chars,
}
//
-// libxml CDATA callback function
+// libxml CDATA callback function
//
static void cdata(void *voidContext,
const xmlChar *chars,
}
//
-// libxml SAX callback structure
+// libxml SAX callback structure
//
static htmlSAXHandler saxHandler = {
NULL,
};
//
-// Parse given (assumed to be) HTML text and return the title
+// Parse given (assumed to be) HTML text and return the title
//
static void parseHtml(const std::string &html,
std::string &title)
|https://curl.se/|----> | properties |----> | keys |---> | socket |--> OS --> network
+----------------+ +-----------------+ +-------+ +--------+
- Curl_write(data, buffer)
+Curl_write(data, buffer)
--> Curl_cfilter_write(data, data->conn, buffer)
- ---> conn->filter->write(conn->filter, data, buffer)
+ --> conn->filter->write(conn->filter, data, buffer)
```
While connection filters all do different things, they look the same from the
Each filter does in principle the following:
```
-static CURLcode
-myfilter_cf_connect(struct Curl_cfilter *cf,
- struct Curl_easy *data,
- bool *done)
+static CURLcode myfilter_cf_connect(struct Curl_cfilter *cf,
+ struct Curl_easy *data,
+ bool *done)
{
CURLcode result;
implementations look like this:
```
-ssize_t Curl_cf_def_send(struct Curl_cfilter *cf, struct Curl_easy *data,
- const void *buf, size_t len, CURLcode *err)
+ssize_t Curl_cf_def_send(struct Curl_cfilter *cf, struct Curl_easy *data,
+ const void *buf, size_t len, CURLcode *err)
{
return cf->next->cft->do_send(cf->next, data, buf, len, err);
}
## Caveats
Remaining limitations:
- - Only QoS level 0 is implemented for publish
- - No way to set retain flag for publish
- - No TLS (mqtts) support
- - Naive EAGAIN handling does not handle split messages
+
+- Only QoS level 0 is implemented for publish
+- No way to set retain flag for publish
+- No TLS (mqtts) support
+- Naive EAGAIN handling does not handle split messages
Ideas:
- - Read stdin and send off as messages. Consider newline as end of fragment.
- (default to text? offer option to set binary)
- - Respond to PINGs automatically
- - Issue PINGs at some default interval (option to switch off/change interval?)
- - Allow `-d` to specify (initial) data to send (should the format allow for
- multiple separate frames?)
- - Exit after N messages received, where N can be zero.
+- Read stdin and send off as messages. Consider newline as end of fragment.
+ (default to text? offer option to set binary)
+- Respond to PINGs automatically
+- Issue PINGs at some default interval (option to switch off/change interval?)
+- Allow `-d` to specify (initial) data to send (should the format allow for
+ multiple separate frames?)
+- Exit after N messages received, where N can be zero.
## Future work
# Shared between CMakeLists.txt and Makefile.am
man_MANS = \
- curl_easy_cleanup.3 \
- curl_easy_duphandle.3 \
- curl_easy_escape.3 \
- curl_easy_getinfo.3 \
- curl_easy_header.3 \
- curl_easy_init.3 \
- curl_easy_nextheader.3 \
- curl_easy_option_by_id.3 \
- curl_easy_option_by_name.3 \
- curl_easy_option_next.3 \
- curl_easy_pause.3 \
- curl_easy_perform.3 \
- curl_easy_recv.3 \
- curl_easy_reset.3 \
- curl_easy_send.3 \
- curl_easy_setopt.3 \
- curl_easy_ssls_export.3 \
- curl_easy_ssls_import.3 \
- curl_easy_strerror.3 \
- curl_easy_unescape.3 \
- curl_easy_upkeep.3 \
- curl_escape.3 \
- curl_formadd.3 \
- curl_formfree.3 \
- curl_formget.3 \
- curl_free.3 \
- curl_getdate.3 \
- curl_getenv.3 \
- curl_global_cleanup.3 \
- curl_global_init.3 \
- curl_global_init_mem.3 \
- curl_global_sslset.3 \
- curl_global_trace.3 \
- curl_mime_addpart.3 \
- curl_mime_data.3 \
- curl_mime_data_cb.3 \
- curl_mime_encoder.3 \
- curl_mime_filedata.3 \
- curl_mime_filename.3 \
- curl_mime_free.3 \
- curl_mime_headers.3 \
- curl_mime_init.3 \
- curl_mime_name.3 \
- curl_mime_subparts.3 \
- curl_mime_type.3 \
- curl_mprintf.3 \
- curl_multi_add_handle.3 \
- curl_multi_assign.3 \
- curl_multi_cleanup.3 \
- curl_multi_fdset.3 \
- curl_multi_get_handles.3 \
- curl_multi_get_offt.3 \
- curl_multi_info_read.3 \
- curl_multi_init.3 \
- curl_multi_notify_disable.3 \
- curl_multi_notify_enable.3 \
- curl_multi_perform.3 \
- curl_multi_poll.3 \
- curl_multi_remove_handle.3 \
- curl_multi_setopt.3 \
- curl_multi_socket.3 \
- curl_multi_socket_action.3 \
- curl_multi_socket_all.3 \
- curl_multi_strerror.3 \
- curl_multi_timeout.3 \
- curl_multi_wait.3 \
- curl_multi_waitfds.3 \
- curl_multi_wakeup.3 \
- curl_pushheader_byname.3 \
- curl_pushheader_bynum.3 \
- curl_share_cleanup.3 \
- curl_share_init.3 \
- curl_share_setopt.3 \
- curl_share_strerror.3 \
- curl_slist_append.3 \
- curl_slist_free_all.3 \
- curl_strequal.3 \
- curl_strnequal.3 \
- curl_unescape.3 \
- curl_url.3 \
- curl_url_cleanup.3 \
- curl_url_dup.3 \
- curl_url_get.3 \
- curl_url_set.3 \
- curl_url_strerror.3 \
- curl_version.3 \
- curl_version_info.3 \
- curl_ws_meta.3 \
- curl_ws_recv.3 \
- curl_ws_send.3 \
- curl_ws_start_frame.3 \
- libcurl-easy.3 \
- libcurl-env-dbg.3 \
- libcurl-env.3 \
- libcurl-errors.3 \
- libcurl-multi.3 \
- libcurl-security.3 \
- libcurl-share.3 \
- libcurl-symbols.3 \
- libcurl-thread.3 \
- libcurl-tutorial.3 \
- libcurl-url.3 \
- libcurl-ws.3 \
- libcurl.3
+ curl_easy_cleanup.3 \
+ curl_easy_duphandle.3 \
+ curl_easy_escape.3 \
+ curl_easy_getinfo.3 \
+ curl_easy_header.3 \
+ curl_easy_init.3 \
+ curl_easy_nextheader.3 \
+ curl_easy_option_by_id.3 \
+ curl_easy_option_by_name.3 \
+ curl_easy_option_next.3 \
+ curl_easy_pause.3 \
+ curl_easy_perform.3 \
+ curl_easy_recv.3 \
+ curl_easy_reset.3 \
+ curl_easy_send.3 \
+ curl_easy_setopt.3 \
+ curl_easy_ssls_export.3 \
+ curl_easy_ssls_import.3 \
+ curl_easy_strerror.3 \
+ curl_easy_unescape.3 \
+ curl_easy_upkeep.3 \
+ curl_escape.3 \
+ curl_formadd.3 \
+ curl_formfree.3 \
+ curl_formget.3 \
+ curl_free.3 \
+ curl_getdate.3 \
+ curl_getenv.3 \
+ curl_global_cleanup.3 \
+ curl_global_init.3 \
+ curl_global_init_mem.3 \
+ curl_global_sslset.3 \
+ curl_global_trace.3 \
+ curl_mime_addpart.3 \
+ curl_mime_data.3 \
+ curl_mime_data_cb.3 \
+ curl_mime_encoder.3 \
+ curl_mime_filedata.3 \
+ curl_mime_filename.3 \
+ curl_mime_free.3 \
+ curl_mime_headers.3 \
+ curl_mime_init.3 \
+ curl_mime_name.3 \
+ curl_mime_subparts.3 \
+ curl_mime_type.3 \
+ curl_mprintf.3 \
+ curl_multi_add_handle.3 \
+ curl_multi_assign.3 \
+ curl_multi_cleanup.3 \
+ curl_multi_fdset.3 \
+ curl_multi_get_handles.3 \
+ curl_multi_get_offt.3 \
+ curl_multi_info_read.3 \
+ curl_multi_init.3 \
+ curl_multi_notify_disable.3 \
+ curl_multi_notify_enable.3 \
+ curl_multi_perform.3 \
+ curl_multi_poll.3 \
+ curl_multi_remove_handle.3 \
+ curl_multi_setopt.3 \
+ curl_multi_socket.3 \
+ curl_multi_socket_action.3 \
+ curl_multi_socket_all.3 \
+ curl_multi_strerror.3 \
+ curl_multi_timeout.3 \
+ curl_multi_wait.3 \
+ curl_multi_waitfds.3 \
+ curl_multi_wakeup.3 \
+ curl_pushheader_byname.3 \
+ curl_pushheader_bynum.3 \
+ curl_share_cleanup.3 \
+ curl_share_init.3 \
+ curl_share_setopt.3 \
+ curl_share_strerror.3 \
+ curl_slist_append.3 \
+ curl_slist_free_all.3 \
+ curl_strequal.3 \
+ curl_strnequal.3 \
+ curl_unescape.3 \
+ curl_url.3 \
+ curl_url_cleanup.3 \
+ curl_url_dup.3 \
+ curl_url_get.3 \
+ curl_url_set.3 \
+ curl_url_strerror.3 \
+ curl_version.3 \
+ curl_version_info.3 \
+ curl_ws_meta.3 \
+ curl_ws_recv.3 \
+ curl_ws_send.3 \
+ curl_ws_start_frame.3 \
+ libcurl-easy.3 \
+ libcurl-env-dbg.3 \
+ libcurl-env.3 \
+ libcurl-errors.3 \
+ libcurl-multi.3 \
+ libcurl-security.3 \
+ libcurl-share.3 \
+ libcurl-symbols.3 \
+ libcurl-thread.3 \
+ libcurl-tutorial.3 \
+ libcurl-url.3 \
+ libcurl-ws.3 \
+ libcurl.3
first argument to the curl_formget_callback function.
~~~c
- typedef size_t (*curl_formget_callback)(void *userp, const char *buf,
- size_t len);"
+typedef size_t (*curl_formget_callback)(void *userp, const char *buf,
+ size_t len);
~~~
The *curl_formget_callback* is invoked for each part of the HTTP POST chain.
curl_easy_getinfo(3) calls (or similar):
~~~c
- struct CURLMsg {
- CURLMSG msg; /* what this message means */
- CURL *easy_handle; /* the handle it concerns */
- union {
- void *whatever; /* message-specific data */
- CURLcode result; /* return code for transfer */
- } data;
- };
+struct CURLMsg {
+ CURLMSG msg; /* what this message means */
+ CURL *easy_handle; /* the handle it concerns */
+ union {
+ void *whatever; /* message-specific data */
+ CURLcode result; /* return code for transfer */
+ } data;
+};
~~~
When **msg** is *CURLMSG_DONE*, the message identifies a transfer that
is done, and then **result** contains the return code for the easy handle
the future, you should be aware of the following current restrictions:
~~~c
- - Name resolves unless the c-ares or threaded-resolver backends are used
- - file:// transfers
- - TELNET transfers
+- Name resolves unless the c-ares or threaded-resolver backends are used
+- file:// transfers
+- TELNET transfers
~~~
If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
For example:
~~~c
- #define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
+#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
~~~
The iconv code in libcurl defaults the network and UTF8 codeset names as
curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data);
curl_easy_perform(curl);
- }
+ }
}
~~~
Section: 1
Source: runtests
See-also:
- - runtests.pl
+ - runtests.pl
Added-in: 7.5
---
Section: 1
Source: testcurl
See-also:
- - runtests.pl
+ - runtests.pl
Added-in: 7.11.2
---
Every pull request is verified for each of the following:
- - it still builds, warning-free, on Linux, macOS, Windows, BSDs, with both
- clang and gcc, autotools and cmake, out-of-tree and in-tree.
- - it still builds fine on Windows with all supported MSVC versions
- - it follows rudimentary code style rules
- - the test suite still runs 100% fine
- - the release tarball (the "dist") still works
- - different TLS backends and options still compile and pass tests
+- it still builds, warning-free, on Linux, macOS, Windows, BSDs, with both
+ clang and gcc, autotools and cmake, out-of-tree and in-tree.
+- it still builds fine on Windows with all supported MSVC versions
+- it follows rudimentary code style rules
+- the test suite still runs 100% fine
+- the release tarball (the "dist") still works
+- different TLS backends and options still compile and pass tests
If the pull-request fails one of these tests, it shows up as a red X and you
are expected to fix the problem. If you do not understand what the issue is or
Consider the following table while looking at pull request failures:
- | CI platform as shown in PR | State | What to look at next |
- | ----------------------------------- | ------ | -------------------------- |
- | Linux / macOS / Windows / ... | stable | all errors and failures |
- | Fuzzer | stable | fuzzing results |
- | Code analyzers | stable | new findings |
- | checkdocs / checksrc / dist / ... | stable | all errors and failures |
- | AppVeyor | stable | all errors and failures |
- | buildbot/curl_Schannel ... | stable | all errors and failures |
- | curl.curl (linux ...) | stable | all errors and failures |
+| CI platform as shown in PR | State | What to look at next |
+| ----------------------------------- | ------ | -------------------------- |
+| Linux / macOS / Windows / ... | stable | all errors and failures |
+| Fuzzer | stable | fuzzing results |
+| Code analyzers | stable | new findings |
+| checkdocs / checksrc / dist / ... | stable | all errors and failures |
+| AppVeyor | stable | all errors and failures |
+| buildbot/curl_Schannel ... | stable | all errors and failures |
+| curl.curl (linux ...) | stable | all errors and failures |
Sometimes the tests fail or run slowly due to a dependency service temporarily
having issues, for example package downloads, or virtualized (non-native)
Send back this contents instead of the `<data>` one. The `NUM` is set by:
- - The test number in the request line is >10000 and this is the remainder
- of [test case number]%10000.
- - The request was HTTP and included digest details, which adds 1000 to `NUM`
- - If an HTTP request is NTLM type-1, it adds 1001 to `NUM`
- - If an HTTP request is NTLM type-3, it adds 1002 to `NUM`
- - If an HTTP request is Basic and `NUM` is already >=1000, it adds 1 to `NUM`
- - If an HTTP request is Negotiate, `NUM` gets incremented by one for each
- request with Negotiate authorization header on the same test case.
+- The test number in the request line is >10000 and this is the remainder of
+ [test case number]%10000.
+- The request was HTTP and included digest details, which adds 1000 to `NUM`
+- If an HTTP request is NTLM type-1, it adds 1001 to `NUM`
+- If an HTTP request is NTLM type-3, it adds 1002 to `NUM`
+- If an HTTP request is Basic and `NUM` is already >=1000, it adds 1 to `NUM`
+- If an HTTP request is Negotiate, `NUM` gets incremented by one for each
+ request with Negotiate authorization header on the same test case.
Dynamically changing `NUM` in this way allows the test harness to be used to
test authentication negotiation where several different requests must be sent
curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \
typecheck-gcc.h system.h urlapi.h options.h header.h websockets.h
-pkgincludedir= $(includedir)/curl
+pkgincludedir = $(includedir)/curl
CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_ = $(CS_0)
checksrc:
- $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \
- $(CSOURCES) $(HHEADERS))
+ $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(CSOURCES) $(HHEADERS))
if NOT_CURL_CI
if DEBUGBUILD
/* Only include this function if one or more of FTP, FILE are enabled. */
#if !defined(CURL_DISABLE_FTP) || !defined(CURL_DISABLE_FILE)
-/*
- Check if this is a range download, and if so, set the internal variables
- properly.
-*/
+/* Check if this is a range download, and if so, set the internal variables
+ properly. */
CURLcode Curl_range(struct Curl_easy *data)
{
if(data->state.use_range && data->state.range) {
struct kerberos5data *krb5 = Curl_auth_krb5_get(conn);
result = !krb5 ? CURLE_OUT_OF_MEMORY :
Curl_auth_create_gssapi_user_message(data, conn->user, conn->passwd,
- service, conn->host.name,
- sasl->mutual_auth, NULL,
- krb5, &resp);
+ service, conn->host.name,
+ sasl->mutual_auth, NULL,
+ krb5, &resp);
newstate = SASL_GSSAPI_TOKEN;
break;
}
*
* @param context the calculation context
* @param[out] digest set to the hash, must be #CURL_SHA512_256_DIGEST_SIZE
- # bytes
+ * bytes
* @return CURLE_OK if succeed,
* error code otherwise
*/
*
* @param context the calculation context
* @param[out] digest set to the hash, must be #CURL_SHA512_256_DIGEST_SIZE
- # bytes
+ * bytes
* @return always CURLE_OK
*/
static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
*
* @param context the calculation context
* @param[out] digest set to the hash, must be #CURL_SHA512_256_DIGEST_SIZE
- # bytes
+ * bytes
* @return always CURLE_OK
*/
static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
#define curlx_open curlx_win32_open
#define curlx_rename curlx_win32_rename
#else
-#define CURLX_FOPEN_LOW fopen
-#define CURLX_FREOPEN_LOW freopen
-#define curlx_stat(fname, stp) stat(fname, stp)
-#define curlx_open open
-#define curlx_rename rename
+#define CURLX_FOPEN_LOW fopen
+#define CURLX_FREOPEN_LOW freopen
+#define curlx_stat(fname, stp) stat(fname, stp)
+#define curlx_open open
+#define curlx_rename rename
#endif
#ifdef CURLDEBUG
}
global_init_unlock();
- /* We use curl_open() with undefined URL so far */
+ /* We use Curl_open() with undefined URL so far */
result = Curl_open(&data);
if(result) {
DEBUGF(curl_mfprintf(stderr, "Error: Curl_open failed\n"));
return result;
}
-#else
-/* if disabled */
+#else /* if disabled */
CURLFORMcode curl_formadd(struct curl_httppost **httppost,
struct curl_httppost **last_post, ...)
{
}
#endif
}
+
#ifdef USE_BACKTRACE
static void error_bt_callback(void *data, const char *message,
int error_number)
#include "curlx/fopen.h"
#include "curlx/base64.h"
-#if !defined(CURL_DISABLE_MIME) && \
- (!defined(CURL_DISABLE_HTTP) || \
- !defined(CURL_DISABLE_SMTP) || \
- !defined(CURL_DISABLE_IMAP))
+#if !defined(CURL_DISABLE_MIME) && (!defined(CURL_DISABLE_HTTP) || \
+ !defined(CURL_DISABLE_SMTP) || \
+ !defined(CURL_DISABLE_IMAP))
#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
#include <libgen.h>
"\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x41\x42\x43\x44\x45\x46";
#ifndef __VMS
-#define filesize(name, stat_data) (stat_data.st_size)
+#define filesize(name, stat_data) stat_data.st_size
#define fopen_read curlx_fopen
#else
}
#define fopen_read vmsfopenread
-#endif
+#endif /* !__VMS */
#ifndef HAVE_BASENAME
/*
}
#define basename(x) Curl_basename(x)
-#endif
+#endif /* !HAVE_BASENAME */
/* Set readback state. */
static void mimesetstate(struct mime_state *state,
}
#else /* !CURL_DISABLE_MIME && (!CURL_DISABLE_HTTP ||
- !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP) */
+ !CURL_DISABLE_SMTP ||
+ !CURL_DISABLE_IMAP) */
/* Mime not compiled in: define stubs for externally-referenced functions. */
curl_mime *curl_mime_init(CURL *easy)
*/
CURLcode Curl_creader_set_mime(struct Curl_easy *data, curl_mimepart *part);
-#else
-/* if disabled */
+#else /* if disabled */
#define Curl_mime_initpart(x)
#define Curl_mime_cleanpart(x)
#define Curl_mime_duppart(x, y, z) CURLE_OK /* Nothing to duplicate. Succeed */
data->set.server_response_timeout;
multi->admin->set.no_signal = data->set.no_signal;
- CURL_TRC_M(data, "added to multi, mid=%u, running=%u"
- ", total=%u", data->mid, Curl_multi_xfers_running(multi),
+ CURL_TRC_M(data, "added to multi, mid=%u, running=%u, total=%u",
+ data->mid, Curl_multi_xfers_running(multi),
Curl_uint32_tbl_count(&multi->xfers));
return CURLM_OK;
}
CURL_TRC_M(data, "multi_done_locked, in use=%u", conn->attached_xfers);
if(CONN_INUSE(conn)) {
/* Stop if still used. */
- CURL_TRC_M(data,
- "Connection still in use %u, no more multi_done now!",
+ CURL_TRC_M(data, "Connection still in use %u, no more multi_done now!",
conn->attached_xfers);
return;
}
return mresult;
}
- CURL_TRC_M(data, "removed from multi, mid=%u, running=%u"
- ", total=%u", mid, Curl_multi_xfers_running(multi),
+ CURL_TRC_M(data, "removed from multi, mid=%u, running=%u, total=%u",
+ mid, Curl_multi_xfers_running(multi),
Curl_uint32_tbl_count(&multi->xfers));
return CURLM_OK;
}
/* A sub transfer, not for msgsent to application */
struct Curl_easy *mdata;
- CURL_TRC_M(data, "sub xfer done for master %u",
- data->master_mid);
+ CURL_TRC_M(data, "sub xfer done for master %u", data->master_mid);
mdata = Curl_multi_get_easy(multi, data->master_mid);
if(mdata) {
if(mdata->sub_xfer_done)
mdata->sub_xfer_done(mdata, data, result);
else
- CURL_TRC_M(data, "master easy %u"
- " without sub_xfer_done callback.", data->master_mid);
+ CURL_TRC_M(data, "master easy %u without sub_xfer_done callback.",
+ data->master_mid);
}
else {
- CURL_TRC_M(data, "master easy %u already gone.",
- data->master_mid);
+ CURL_TRC_M(data, "master easy %u already gone.", data->master_mid);
}
}
else {
}
}
else {
- CURL_TRC_M(multi->admin,
- "multi_run_dirty, %u no longer found", mid);
+ CURL_TRC_M(multi->admin, "multi_run_dirty, %u no longer found", mid);
Curl_uint32_bset_remove(&multi->dirty, mid);
}
} while(Curl_uint32_bset_next(&multi->dirty, mid, &mid));
Curl_uint32_bset_remove(&multi->dirty, mid);
}
else {
- CURL_TRC_M(multi->admin, "dirty transfer %u no longer found",
- mid);
+ CURL_TRC_M(multi->admin, "dirty transfer %u no longer found", mid);
Curl_uint32_bset_remove(&multi->dirty, mid);
}
} while(Curl_uint32_bset_next(&multi->dirty, mid, &mid));
struct Curl_easy *data = Curl_uint32_tbl_get(&multi->xfers, mid);
if(data && GOOD_EASY_HANDLE(data))
return data;
- CURL_TRC_M(multi->admin,
- "invalid easy handle in xfer table for mid=%u", mid);
+ CURL_TRC_M(multi->admin, "invalid easy handle in xfer table for mid=%u",
+ mid);
Curl_uint32_tbl_remove(&multi->xfers, mid);
return NULL;
}
Curl_multi_mark_dirty(data);
}
else {
- CURL_TRC_M(multi->admin,
- "socket transfer %u no longer found", mid);
+ CURL_TRC_M(multi->admin, "socket transfer %u no longer found", mid);
Curl_uint32_spbset_remove(&entry->xfers, mid);
}
} while(Curl_uint32_spbset_next(&entry->xfers, mid, &mid));
/* only when notification has not been disabled in the meantime */
if(data && Curl_uint32_bset_contains(&multi->ntfy.enabled, e->type)) {
/* this may cause new notifications to be added! */
- CURL_TRC_M(multi->admin,
- "[NTFY] dispatch %u to xfer %u",
+ CURL_TRC_M(multi->admin, "[NTFY] dispatch %u to xfer %u",
e->type, e->mid);
multi->ntfy.ntfy_cb(multi, e->type, data, multi->ntfy.ntfy_cb_data);
}
if(pp->sendleft)
return Curl_pp_flushsend(data, pp);
- do {
- /* Read the response from the server */
- result = Curl_pp_readresp(data, FIRSTSOCKET, pp, &pop3code, &nread);
- if(result)
- return result;
+ do {
+ /* Read the response from the server */
+ result = Curl_pp_readresp(data, FIRSTSOCKET, pp, &pop3code, &nread);
+ if(result)
+ return result;
if(!pop3code)
break;
}
/*
-
New proposed interface, 9th of February 2000:
pgrsStartNow() - sets start time
pgrsSetUploadCounter() - amount of data currently uploaded
pgrsUpdate() - show progress
pgrsDone() - transfer complete
-
*/
int Curl_pgrsDone(struct Curl_easy *data)
}
/*
- *
* Curl_pgrsTimeWas(). Store the timestamp time at the given label.
*/
void Curl_pgrsTimeWas(struct Curl_easy *data, timerid timer,
case TIMER_STARTTRANSFER:
delta = &data->progress.t_starttransfer;
/* prevent updating t_starttransfer unless:
- * 1) this is the first time we are setting t_starttransfer
- * 2) a redirect has occurred since the last time t_starttransfer was set
+ * 1. this is the first time we are setting t_starttransfer
+ * 2. a redirect has occurred since the last time t_starttransfer was set
* This prevents repeated invocations of the function from incorrectly
* changing the t_starttransfer time.
*/
}
/*
- *
* Curl_pgrsTime(). Store the current time at the given label. This fetches a
* fresh "now" and returns it.
*
/* we flush the output stream to make it appear as soon as possible */
fflush(data->set.err);
}
-#else
- /* progress bar disabled */
+#else /* CURL_DISABLE_PROGRESS_METER */
#define progress_meter(x) Curl_nop_stmt
#endif
-#ifndef HEADER_Curl_rlimit_H
-#define HEADER_Curl_rlimit_H
+#ifndef HEADER_CURL_RLIMIT_H
+#define HEADER_CURL_RLIMIT_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
bool activate,
const struct curltime *pts);
-#endif /* HEADER_Curl_rlimit_H */
+#endif /* HEADER_CURL_RLIMIT_H */
*buf = '\0';
#ifndef CURL_DISABLE_VERBOSE_STRINGS
-
switch(err) {
case SEC_E_OK:
txt = "No error";
else
curl_msnprintf(buf, buflen, "%s (0x%08lx)", txt, err);
}
-
#else
if(err == SEC_E_OK)
txt = "No error";
void Curl_freeset(struct Curl_easy *data);
CURLcode Curl_uc_to_curlcode(CURLUcode uc);
-CURLcode Curl_close(struct Curl_easy **datap); /* opposite of curl_open() */
+CURLcode Curl_close(struct Curl_easy **datap); /* opposite of Curl_open() */
CURLcode Curl_connect(struct Curl_easy *, bool *async, bool *protocol_connect);
CURLcode Curl_setup_conn(struct Curl_easy *data,
struct Curl_dns_entry *dns,
#include "../curl_hmac.h"
#include "../curl_md5.h"
-
/*
* Curl_auth_create_cram_md5_message()
*
}
#ifdef USE_NTLM
-
static void ntlm_conn_dtor(void *key, size_t klen, void *entry)
{
struct ntlmdata *ntlm = entry;
Curl_conn_meta_remove(conn, proxy ? CURL_META_NTLM_PROXY_CONN
: CURL_META_NTLM_CONN);
}
-
#endif /* USE_NTLM */
#ifdef USE_KERBEROS5
-
static void krb5_conn_dtor(void *key, size_t klen, void *entry)
{
struct kerberos5data *krb5 = entry;
}
return krb5;
}
-
#endif /* USE_KERBEROS5 */
#ifdef USE_GSASL
-
static void gsasl_conn_dtor(void *key, size_t klen, void *entry)
{
struct gsasldata *gsasl = entry;
}
return gsasl;
}
-
#endif /* USE_GSASL */
#ifdef USE_SPNEGO
-
static void nego_conn_dtor(void *key, size_t klen, void *entry)
{
struct negotiatedata *nego = entry;
}
return nego;
}
-
#endif /* USE_SPNEGO */
inbuf[1].cbBuffer));
/*
There are two cases where we could be getting extra data here:
- 1) If we are renegotiating a connection and the handshake is already
- complete (from the server perspective), it can encrypted app data
- (not handshake data) in an extra buffer at this point.
- 2) (sspi_status == SEC_I_CONTINUE_NEEDED) We are negotiating a
- connection and this extra data is part of the handshake.
- We should process the data immediately; waiting for the socket to
- be ready may fail since the server is done sending handshake data.
+ 1. If we are renegotiating a connection and the handshake is already
+ complete (from the server perspective), it can encrypted app data
+ (not handshake data) in an extra buffer at this point.
+ 2. (sspi_status == SEC_I_CONTINUE_NEEDED) We are negotiating a
+ connection and this extra data is part of the handshake.
+ We should process the data immediately; waiting for the socket to
+ be ready may fail since the server is done sending handshake data.
*/
/* check if the remaining data is less than the total amount
and therefore begins after the already processed data */
AC_MSG_CHECKING([whether to disable dependency on -lrt])
OPT_RT="default"
AC_ARG_ENABLE(rt,
- AS_HELP_STRING([--disable-rt],[disable dependency on -lrt]),
+AS_HELP_STRING([--disable-rt],[disable dependency on -lrt]),
OPT_RT=$enableval)
case "$OPT_RT" in
no)
# Packages
- This directory and all its subdirectories are for special package
-information, templates, scripts and docs. The files herein should be of use
-for those of you who want to package curl in a binary or source format for
-these platforms.
+This directory and all its subdirectories are for special package
+information, templates, scripts and docs. The files herein should be of
+use for those of you who want to package curl in a binary or source
+format for these platforms.
version of Visual C++ that you use. Each version of Visual Studio has a
default version of Visual C++. We offer these versions:
- - VC10 (Visual Studio 2010 Version 10.0)
- - VC11 (Visual Studio 2012 Version 11.0)
- - VC12 (Visual Studio 2013 Version 12.0)
+- VC10 (Visual Studio 2010 Version 10.0)
+- VC11 (Visual Studio 2012 Version 11.0)
+- VC12 (Visual Studio 2013 Version 12.0)
Separate solutions are provided for both libcurl and the curl command line
tool as well as a solution that includes both projects. libcurl.sln, curl.sln
the search path of these DLLs to the configuration's PATH environment. To do
that:
- 1. Open the 'curl-all.sln' or 'curl.sln' solutions
- 2. Right-click on the 'curl' project and select Properties
- 3. Navigate to 'Configuration Properties > Debugging > Environment'
- 4. Add `PATH='Path to DLL';C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem`
+1. Open the 'curl-all.sln' or 'curl.sln' solutions
+2. Right-click on the 'curl' project and select Properties
+3. Navigate to 'Configuration Properties > Debugging > Environment'
+4. Add `PATH='Path to DLL';C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem`
... where `Path to DLL` is the configuration specific path. For example the
following configurations in Visual Studio 2010 might be:
The following keywords have been used in the directory hierarchy:
- - `<platform>` - The platform (For example: Windows)
- - `<ide>` - The IDE (For example: VC10)
- - `<architecture>` - The platform architecture (For example: Win32, Win64)
- - `<configuration>` - The target configuration (For example: DLL Debug, LIB
- Release - LIB OpenSSL)
+- `<platform>` - The platform (For example: Windows)
+- `<ide>` - The IDE (For example: VC10)
+- `<architecture>` - The platform architecture (For example: Win32, Win64)
+- `<configuration>` - The target configuration (For example: DLL Debug, LIB
+ Release - LIB OpenSSL)
Should you wish to help out with some of the items on the TODO list, or find
bugs in the project files that need correcting, and would like to submit
#
###########################################################################
EXTRA_DIST = \
- backup_gnv_curl_src.com \
- build_curl-config_script.com \
- build_gnv_curl.com \
- build_gnv_curl_pcsi_desc.com \
- build_gnv_curl_pcsi_text.com \
- build_gnv_curl_release_notes.com \
- build_libcurl_pc.com \
- build_vms.com \
- clean_gnv_curl.com \
- compare_curl_source.com \
- config_h.com \
- curl_crtl_init.c \
- curl_gnv_build_steps.txt \
- curl_release_note_start.txt \
- curl_startup.com \
- curlmsg.h \
- curlmsg.msg \
- curlmsg.sdl \
- curlmsg_vms.h \
- generate_config_vms_h_curl.com \
- generate_vax_transfer.com \
- gnv_conftest.c_first \
- gnv_curl_configure.sh \
- gnv_libcurl_symbols.opt \
- gnv_link_curl.com \
- macro32_exactcase.patch \
- make_gnv_curl_install.sh \
- make_pcsi_curl_kit_name.com \
- pcsi_gnv_curl_file_list.txt \
- pcsi_product_gnv_curl.com \
- readme \
- report_openssl_version.c \
- setup_gnv_curl_build.com \
- stage_curl_install.com \
- vms_eco_level.h
+ backup_gnv_curl_src.com \
+ build_curl-config_script.com \
+ build_gnv_curl.com \
+ build_gnv_curl_pcsi_desc.com \
+ build_gnv_curl_pcsi_text.com \
+ build_gnv_curl_release_notes.com \
+ build_libcurl_pc.com \
+ build_vms.com \
+ clean_gnv_curl.com \
+ compare_curl_source.com \
+ config_h.com \
+ curl_crtl_init.c \
+ curl_gnv_build_steps.txt \
+ curl_release_note_start.txt \
+ curl_startup.com \
+ curlmsg.h \
+ curlmsg.msg \
+ curlmsg.sdl \
+ curlmsg_vms.h \
+ generate_config_vms_h_curl.com \
+ generate_vax_transfer.com \
+ gnv_conftest.c_first \
+ gnv_curl_configure.sh \
+ gnv_libcurl_symbols.opt \
+ gnv_link_curl.com \
+ macro32_exactcase.patch \
+ make_gnv_curl_install.sh \
+ make_pcsi_curl_kit_name.com \
+ pcsi_gnv_curl_file_list.txt \
+ pcsi_product_gnv_curl.com \
+ readme \
+ report_openssl_version.c \
+ setup_gnv_curl_build.com \
+ stage_curl_install.com \
+ vms_eco_level.h
cd ../..
#
#
-./configure --prefix=/usr --exec-prefix=/usr --disable-dependency-tracking \
- --disable-libtool-lock --with-gssapi --disable-ntlm-wb \
- --with-ca-path=gnv\$curl_ca_path
+./configure --prefix=/usr --exec-prefix=/usr --disable-dependency-tracking \
+ --disable-libtool-lock --with-gssapi --disable-ntlm-wb \
+ --with-ca-path=gnv\$curl_ca_path
#
my @files;
if(system('git rev-parse --is-inside-work-tree >/dev/null 2>&1') == 0) {
- @files = `git ls-files '*.[ch]'`;
+ @files = `git ls-files '*.[ch]'`;
}
else {
- find(sub { if(/\.[ch]$/) { push(@files, $File::Find::name) } }, ('.'));
+ find(sub { if(/\.[ch]$/) { push(@files, $File::Find::name) } }, ('.'));
}
if(@ARGV) {
- find(sub { if(/\.[ch]$/) { push(@files, $File::Find::name) } }, @ARGV);
+ find(sub { if(/\.[ch]$/) { push(@files, $File::Find::name) } }, @ARGV);
}
@files = grep !/\/CMakeFiles\//, @files;
sort -fu | \
awk '
{
- if(length($0)) {
- num++;
- n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
- #print n;
- if(length(n) > 77) {
- printf(" %s\n", p);
- n=sprintf("%s,", $0);
- }
- p=n;
- }
+ if(length($0)) {
+ num++;
+ n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
+ #print n;
+ if(length(n) > 77) {
+ printf(" %s\n", p);
+ n=sprintf("%s,", $0);
+ }
+ p=n;
+ }
}
END {
my $include = "../../include";
my $cmd = shift @ARGV || '';
- check:
+check:
+
if($cmd eq "-d") {
# specifies source directory
$dir = shift @ARGV;
my %urls = (
'autoland' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/autoland/security/nss/lib/ckfw/builtins/certdata.txt',
- 'beta' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/beta/security/nss/lib/ckfw/builtins/certdata.txt',
- 'release' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/release/security/nss/lib/ckfw/builtins/certdata.txt',
+ 'beta' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/beta/security/nss/lib/ckfw/builtins/certdata.txt',
+ 'release' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/release/security/nss/lib/ckfw/builtins/certdata.txt',
);
$opt_d = 'release';
if($opt_d =~ m/^risk$/i) { # Long Form Warning and Exit
print "Warning: Use of this script may pose some risk:\n";
print "\n";
- print " 1) If you use HTTP URLs they are subject to a man in the middle attack\n";
- print " 2) Default to 'release', but more recent updates may be found in other trees\n";
- print " 3) certdata.txt file format may change, lag time to update this script\n";
- print " 4) Generally unwise to blindly trust CAs without manual review & verification\n";
- print " 5) Mozilla apps use additional security checks are not represented in certdata\n";
- print " 6) Use of this script will make a security engineer grind his teeth and\n";
+ print " 1. If you use HTTP URLs they are subject to a man in the middle attack\n";
+ print " 2. Default to 'release', but more recent updates may be found in other trees\n";
+ print " 3. certdata.txt file format may change, lag time to update this script\n";
+ print " 4. Generally unwise to blindly trust CAs without manual review & verification\n";
+ print " 5. Mozilla apps use additional security checks are not represented in certdata\n";
+ print " 6. Use of this script will make a security engineer grind his teeth and\n";
print " swear at you. ;)\n";
exit;
} else { # Short Form Warning
#endif
#ifndef SOL_IP
-# define SOL_IP IPPROTO_IP
+#define SOL_IP IPPROTO_IP
#endif
#if defined(IP_TOS) || defined(IPV6_TCLASS) || defined(SO_PRIORITY)
***************************************************************************/
#include "tool_setup.h"
-#include "tool_bname.h"
-
#ifndef HAVE_BASENAME
+#include "tool_bname.h"
+
char *tool_basename(char *path)
{
char *s1;
curlx_free(copyloc);
}
}
-#endif
+#endif /* LINK */
/*
* Copies a filename part and returns an ALLOCATED data buffer.
my $pi = 3.1415;
foreach my $i (1 .. 200) {
- printf "%d, ", sin($i/200 * 2 * $pi) * 500000 + 500000;
+ printf "%d, ", sin($i / 200 * 2 * $pi) * 500000 + 500000;
}
*/
static const int sinus[] = {
#endif
}
else
-#endif
+#endif /* _WIN32 */
{
rc = read(per->infd, buffer, sz * nmemb);
if(rc < 0) {
/*
** callback for CURLOPT_SEEKFUNCTION
*/
-
int tool_seek_cb(void *userdata, curl_off_t offset, int whence);
#endif /* HEADER_CURL_TOOL_CB_SEE_H */
*retp = bytes;
return 0;
}
-#endif
+#endif /* _WIN32 */
/*
** callback for CURLOPT_WRITEFUNCTION
return CURL_WRITEFUNC_ERROR;
}
}
-#endif
+#endif /* DEBUGBUILD */
if(!outs->stream && !tool_create_output_file(outs, per->config))
return CURL_WRITEFUNC_ERROR;
#ifndef CURL_DISABLE_IPFS
tool_safefree(config->ipfs_gateway);
-#endif /* !CURL_DISABLE_IPFS */
+#endif
tool_safefree(config->doh_url);
tool_safefree(config->cipher_list);
tool_safefree(config->proxy_cipher_list);
size_t num_urls; /* number of URLs added to the list */
#ifndef CURL_DISABLE_IPFS
char *ipfs_gateway;
-#endif /* !CURL_DISABLE_IPFS */
+#endif
char *doh_url;
char *cipher_list;
char *proxy_cipher_list;
return checkhome(home, fname, FALSE);
}
}
-#endif /* PWD-stuff */
+#endif /* HAVE_GETPWUID && HAVE_GETEUID */
return NULL;
}
{"ip-tos", ARG_STRG, ' ', C_IP_TOS},
#ifndef CURL_DISABLE_IPFS
{"ipfs-gateway", ARG_STRG, ' ', C_IPFS_GATEWAY},
-#endif /* !CURL_DISABLE_IPFS */
+#endif
{"ipv4", ARG_NONE, '4', C_IPV4},
{"ipv6", ARG_NONE, '6', C_IPV6},
{"json", ARG_STRG, ' ', C_JSON},
case C_IPFS_GATEWAY: /* --ipfs-gateway */
err = getstr(&config->ipfs_gateway, nextarg, DENY_BLANK);
break;
-#endif /* !CURL_DISABLE_IPFS */
+#endif
case C_AWS_SIGV4: /* --aws-sigv4 */
config->authtype |= CURLAUTH_AWS_SIGV4;
err = getstr(&config->aws_sigv4, nextarg, ALLOW_BLANK);
long sts;
short chan;
- /* iosbdef.h was not in VAX V7.2 or CC 6.4 */
+ /* iosbdef.h was not in VAX V7.2 or CC 6.4 */
struct _isb {
- short int iosb$w_status; /* status */
+ short int iosb$w_status; /* status */
short int iosb$w_bcnt; /* byte count */
- int unused; /* unused */
+ int unused; /* unused */
} iosb;
$DESCRIPTOR(ttdesc, "TT");
#endif /* __VMS */
#ifdef _WIN32
-
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
size_t i;
}
else if(buffer[i] == '\b')
/* remove this letter and if this is not the first key, remove the
- previous one as well */
+ previous one as well */
i = i - (i >= 1 ? 2 : 1);
}
/* since echo is disabled, print a newline */
};
/*
- * The bitmask output is generated with the following command
- ------------------------------------------------------------
+ The bitmask output is generated with the following command:
+ ------------------------------------------------------------
make -C docs/cmdline-opts listcats
*/
#ifndef CURL_DISABLE_IPFS
const char *proto_ipfs = "ipfs";
const char *proto_ipns = "ipns";
-#endif /* !CURL_DISABLE_IPFS */
+#endif
static struct proto_name_tokenp {
const char *proto_name;
#endif
#endif
-#endif /* ndef UNITTESTS */
+#endif /* !UNITTESTS */
#ifdef UNITTESTS
UNITTEST char *max5data(curl_off_t bytes, char *max5, size_t mlen);
UNITTEST void time2str(char *r, size_t rlen, curl_off_t seconds);
-
#endif
#endif /* HEADER_CURL_TOOL_PROGRESS_H */
* 'utf8seq' member holds an incomplete UTF-8 sequence destined for the console
* until it can be completed (1-4 bytes) + NUL.
*/
-
struct OutStruct {
char *filename;
FILE *stream;
* as well as information relative to where URL contents should
* be stored or which file should be uploaded.
*/
-
struct getout {
struct getout *next; /* next one */
char *url; /* the URL we deal with */
BIT(noglob); /* disable globbing for this URL */
BIT(out_null); /* discard output for this URL */
};
+
/*
* 'trace' enumeration represents curl's output look'n feel possibilities.
*/
-
typedef enum {
TRACE_NONE, /* no trace/verbose output at all */
TRACE_BIN, /* tcpdump inspired look */
/*
* 'HttpReq' enumeration represents HTTP request types.
*/
-
typedef enum {
TOOL_HTTPREQ_UNSPEC, /* first in list */
TOOL_HTTPREQ_GET,
* Complete struct declarations which have OperationConfig struct members,
* just in case this header is directly included in some source file.
*/
-
#include "tool_cfgable.h"
#endif /* HEADER_CURL_TOOL_SDECLS_H */
# scripts used in test cases
TESTSCRIPTS = \
- test1119.pl \
- test1135.pl \
- test1139.pl \
- test1140.pl \
- test1165.pl \
- test1167.pl \
- test1173.pl \
- test1175.pl \
- test1177.pl \
- test1222.pl \
- test1275.pl \
- test1276.pl \
- test1477.pl \
- test1486.pl \
- test1488.pl \
- test1544.pl \
- test1707.pl \
- test745.pl \
- test971.pl
-
-EXTRA_DIST = \
- CMakeLists.txt \
- allversions.pm \
- appveyor.pm \
- azure.pm \
- devtest.pl \
- dictserver.py \
- directories.pm \
- ech_combos.py \
- ech_tests.sh \
- ftpserver.pl \
- getpart.pm \
- globalconfig.pm \
- http-server.pl \
- http2-server.pl \
- http3-server.pl \
- memanalyze.pl \
- memanalyzer.pm \
- negtelnetserver.py \
- nghttpx.conf \
- pathhelp.pm \
- processhelp.pm \
- requirements.txt \
- rtspserver.pl \
- runner.pm \
- runtests.pl \
- secureserver.pl \
- serverhelp.pm \
- servers.pm \
- smbserver.py \
- sshhelp.pm \
- sshserver.pl \
- testcurl.pl \
- testutil.pm \
- tftpserver.pl \
- util.py \
- valgrind.pm \
- valgrind.supp \
- $(TESTSCRIPTS)
+ test1119.pl \
+ test1135.pl \
+ test1139.pl \
+ test1140.pl \
+ test1165.pl \
+ test1167.pl \
+ test1173.pl \
+ test1175.pl \
+ test1177.pl \
+ test1222.pl \
+ test1275.pl \
+ test1276.pl \
+ test1477.pl \
+ test1486.pl \
+ test1488.pl \
+ test1544.pl \
+ test1707.pl \
+ test745.pl \
+ test971.pl
+
+EXTRA_DIST = \
+ CMakeLists.txt \
+ allversions.pm \
+ appveyor.pm \
+ azure.pm \
+ devtest.pl \
+ dictserver.py \
+ directories.pm \
+ ech_combos.py \
+ ech_tests.sh \
+ ftpserver.pl \
+ getpart.pm \
+ globalconfig.pm \
+ http-server.pl \
+ http2-server.pl \
+ http3-server.pl \
+ memanalyze.pl \
+ memanalyzer.pm \
+ negtelnetserver.py \
+ nghttpx.conf \
+ pathhelp.pm \
+ processhelp.pm \
+ requirements.txt \
+ rtspserver.pl \
+ runner.pm \
+ runtests.pl \
+ secureserver.pl \
+ serverhelp.pm \
+ servers.pm \
+ smbserver.py \
+ sshhelp.pm \
+ sshserver.pl \
+ testcurl.pl \
+ testutil.pm \
+ tftpserver.pl \
+ util.py \
+ valgrind.pm \
+ valgrind.supp \
+ $(TESTSCRIPTS)
# we have two variables here to make sure DIST_SUBDIRS does not get 'unit'
# added twice as then targets such as 'distclean' misbehave and try to
Replaced internal headers with a blank one
</name>
<command>
- -H "Host;" -H "Accept;" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-H "Host;" -H "Accept;" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
HTTP with proxy authorization
</name>
<command>
- -U fake@user:loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x %HOSTIP:%HTTPPORT http://we.want.that.site.com/%TESTNUMBER
+-U fake@user:loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x %HOSTIP:%HTTPPORT http://we.want.that.site.com/%TESTNUMBER
</command>
<features>
proxy
HTTPS-proxy with Basic auth to HTTP without auth
</name>
<command>
- -U fake@user:loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x https://%HOSTIP:%HTTPSPROXYPORT http://we.want.that.site.com/%TESTNUMBER --proxy-insecure
+-U fake@user:loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x https://%HOSTIP:%HTTPSPROXYPORT http://we.want.that.site.com/%TESTNUMBER --proxy-insecure
</command>
<features>
proxy
HTTP GET with user and password
</name>
<command>
- -u fake:user http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-u fake:user http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
HTTP PUT from a file but enforce chunked transfer-encoding
</name>
<command>
- -T %LOGDIR/file%TESTNUMBER -H "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-T %LOGDIR/file%TESTNUMBER -H "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
<file name="%LOGDIR/file%TESTNUMBER">
just some tiny teeny contents
HTTP POST with auth and contents but with content-length set to 0
</name>
<command>
- -d "fooo=mooo%AMPpooo=clue%AMPdoo=%20%20%20++++" -u "fake:-user" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-d "fooo=mooo%AMPpooo=clue%AMPdoo=%20%20%20++++" -u "fake:-user" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
# Bang on RTP by
-# 1) giving an evil payload (with $)
-# 2) Giving evil content (SDP starting with $)
-# 3) packing rtp after headers, after content, and at the start
+# 1. giving an evil payload (with $)
+# 2. Giving evil content (SDP starting with $)
+# 3. packing rtp after headers, after content, and at the start
<info>
<keywords>
RTSP
HTTP POST with custom content-type
</name>
<command>
- -d "hejsanallabarn" -H "Content-Type: silly/type" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-d "hejsanallabarn" -H "Content-Type: silly/type" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
HTTP PUT from stdin with set size, disabling chunked transfer-encoding
</name>
<command>
- -T - -H "Transfer-Encoding:" -H "Content-Length: 14" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-T - -H "Transfer-Encoding:" -H "Content-Length: 14" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
<stdin>
data on stdin
my %hash;
my $inside=0;
- # print "Section: $section, part: $part\n";
+ # print "Section: $section, part: $part\n";
for(@xml) {
- # print "$inside: $_";
+ # print "$inside: $_";
if(!$inside && ($_ =~ /^ *\<$section/)) {
$inside++;
}
}
return 0; # does not exist
}
+
# The code currently never calls this more than once per part per file, so
# caching a result that will never be used again just slows things down.
# memoize('partexists', NORMALIZER => 'normalize_part'); # cache each result
#
###########################################################################
-TESTENV = \
-testenv/__init__.py \
-testenv/caddy.py \
-testenv/certs.py \
-testenv/client.py \
-testenv/curl.py \
-testenv/dante.py \
-testenv/env.py \
-testenv/httpd.py \
-testenv/mod_curltest/mod_curltest.c \
-testenv/nghttpx.py \
-testenv/ports.py \
-testenv/sshd.py \
-testenv/vsftpd.py \
-testenv/ws_echo_server.py
+TESTENV = \
+ testenv/__init__.py \
+ testenv/caddy.py \
+ testenv/certs.py \
+ testenv/client.py \
+ testenv/curl.py \
+ testenv/dante.py \
+ testenv/env.py \
+ testenv/httpd.py \
+ testenv/mod_curltest/mod_curltest.c \
+ testenv/nghttpx.py \
+ testenv/ports.py \
+ testenv/sshd.py \
+ testenv/vsftpd.py \
+ testenv/ws_echo_server.py
-EXTRA_DIST = \
-CMakeLists.txt \
-conftest.py \
-requirements.txt \
-scorecard.py \
-test_01_basic.py \
-test_02_download.py \
-test_03_goaway.py \
-test_04_stuttered.py \
-test_05_errors.py \
-test_06_eyeballs.py \
-test_07_upload.py \
-test_08_caddy.py \
-test_09_push.py \
-test_10_proxy.py \
-test_11_unix.py \
-test_12_reuse.py \
-test_13_proxy_auth.py \
-test_14_auth.py \
-test_15_tracing.py \
-test_16_info.py \
-test_17_ssl_use.py \
-test_18_methods.py \
-test_19_shutdown.py \
-test_20_websockets.py \
-test_30_vsftpd.py \
-test_31_vsftpds.py \
-test_32_ftps_vsftpd.py \
-test_40_socks.py \
-test_50_scp.py \
-test_51_sftp.py \
-$(TESTENV)
+EXTRA_DIST = \
+ CMakeLists.txt \
+ conftest.py \
+ requirements.txt \
+ scorecard.py \
+ test_01_basic.py \
+ test_02_download.py \
+ test_03_goaway.py \
+ test_04_stuttered.py \
+ test_05_errors.py \
+ test_06_eyeballs.py \
+ test_07_upload.py \
+ test_08_caddy.py \
+ test_09_push.py \
+ test_10_proxy.py \
+ test_11_unix.py \
+ test_12_reuse.py \
+ test_13_proxy_auth.py \
+ test_14_auth.py \
+ test_15_tracing.py \
+ test_16_info.py \
+ test_17_ssl_use.py \
+ test_18_methods.py \
+ test_19_shutdown.py \
+ test_20_websockets.py \
+ test_30_vsftpd.py \
+ test_31_vsftpds.py \
+ test_32_ftps_vsftpd.py \
+ test_40_socks.py \
+ test_50_scp.py \
+ test_51_sftp.py \
+ $(TESTENV)
clean-local:
rm -rf *.pyc __pycache__
#include "first.h"
/*
- * From "KNOWN_BUGS" April 2009:
-
- 59. If the CURLOPT_PORT option is used on an FTP URL like
- "ftp://example.com/file;type=A" the ";type=A" is stripped off.
+ From "KNOWN_BUGS" April 2009:
+ 59. If the CURLOPT_PORT option is used on an FTP URL like
+ "ftp://example.com/file;type=A" the ";type=A" is stripped off.
*/
static CURLcode test_lib562(const char *URL)
/*****************************************************************************
* This is a rewrite/clone of the arpa/tftp.h file for systems without it. *
*****************************************************************************/
+
#define SEGSIZE 512 /* data segment size */
+#define PKTSIZE (SEGSIZE + 4) /* SEGSIZE defined in arpa/tftp.h */
#if defined(__GNUC__) && ((__GNUC__ >= 3) || \
((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
* STRUCT DECLARATIONS AND DEFINES *
*****************************************************************************/
-#define PKTSIZE (SEGSIZE + 4) /* SEGSIZE defined in arpa/tftp.h */
-
struct testcase {
char *buffer; /* holds the file data to send to the client */
size_t bufsize; /* size of the data in buffer */
/* CURLOPT_RESOLVE address parsing test - to test the following defect fix:
- 1) if there is already existing host:port pair in the DNS cache and
- we call CURLOPT_RESOLVE, it should also replace addresses.
- for example, if there is "test.com:80" with address "1.1.1.1"
- and we called CURLOPT_RESOLVE with address "2.2.2.2", then DNS entry needs to
- reflect that.
-
- 2) when cached address is already there and close to expire, then by the
- time request is made, it can get expired. This happens because, when
- we set address using CURLOPT_RESOLVE,
- it usually marks as permanent (by setting timestamp to zero). However,
- if address already exists
-in the cache, then it does not mark it, but just leaves it as it is.
- So we fixing this by timestamp to zero if address already exists too.
-
-Test:
-
- - insert new entry
- - verify that timestamp is not zero
- - call set options with CURLOPT_RESOLVE
- - then, call Curl_loadhostpairs
-
- expected result: cached address has zero timestamp.
-
- - call set options with CURLOPT_RESOLVE with same host:port pair,
- different address.
- - then, call Curl_loadhostpairs
-
- expected result: cached address has zero timestamp and new address
+ 1. if there is already existing host:port pair in the DNS cache and
+ we call CURLOPT_RESOLVE, it should also replace addresses.
+ for example, if there is "test.com:80" with address "1.1.1.1"
+ and we called CURLOPT_RESOLVE with address "2.2.2.2", then DNS entry
+ needs to reflect that.
+
+ 2. when cached address is already there and close to expire, then by the
+ time request is made, it can get expired. This happens because, when
+ we set address using CURLOPT_RESOLVE,
+ it usually marks as permanent (by setting timestamp to zero). However,
+ if address already exists
+ in the cache, then it does not mark it, but just leaves it as it is.
+ So we fixing this by timestamp to zero if address already exists too.
+
+ Test:
+
+ - insert new entry
+ - verify that timestamp is not zero
+ - call set options with CURLOPT_RESOLVE
+ - then, call Curl_loadhostpairs
+
+ expected result: cached address has zero timestamp.
+
+ - call set options with CURLOPT_RESOLVE with same host:port pair,
+ different address.
+ - then, call Curl_loadhostpairs
+
+ expected result: cached address has zero timestamp and new address
*/
static CURLcode test_unit1609(const char *arg)
for(i = 1; i < slen; ++i) {
fail_unless(Curl_uint32_bset_next(&bset, n, &n), "next failed");
if(n != s[i]) {
- curl_mfprintf(stderr, "expected next to be %u"
- ", not %u\n", s[i], n);
+ curl_mfprintf(stderr, "expected next to be %u, not %u\n", s[i], n);
fail_unless(n == s[i], "next not correct number");
}
}
for(i = 1; i < slen; ++i) {
fail_unless(Curl_uint32_spbset_next(&bset, n, &n), "next failed");
if(n != s[i]) {
- curl_mfprintf(stderr, "expected next to be %u"
- ", not %u\n", s[i], n);
+ curl_mfprintf(stderr, "expected next to be %u, not %u\n", s[i], n);
fail_unless(n == s[i], "next not correct number");
}
}