Commit Graph

28413 Commits

Author SHA1 Message Date
Daniel Stenberg
5a9d7c4e68
pop3/smtp: return *WEIRD_SERVER_REPLY when not understood
This leaves the CURLE_RECV_ERROR error code for explicit failure to
receive network data and allows users to better separate the problems.

Ref #8356
Reported-by: Rianov Viacheslav
Closes #8506
2022-03-29 14:01:53 +02:00
Daniel Stenberg
3a4182d468
docs: lots of minor language polish
Mostly based on recent language decisions from "everything curl":

- remove contractions (isn't => is not)
- *an* HTTP (consistency)
- runtime (no hyphen)
- backend (no hyphen)
- URL is uppercase

Closes #8646
2022-03-29 13:58:14 +02:00
Jay Satiro
f7376547bf projects: Update VC version names for VS2017, VS2022
- Rename VC15 -> VC14.10, VC17 -> VC14.30.

The projects directory that holds the pre-generated Visual Studio
project files uses VC<ver> to indicate the MSVC version. At some point
support for Visual Studio 2017 (Visual Studio version 15 which uses MSVC
14.10) was added as VC15. Visual Studio 2022 (Visual Studio version 17
which uses MSVC 14.30) project files were recently added and followed
that same format using VC17.

There is no such MSVC version (yet) as VC15 or VC17.

For VS 2017 for example, the name we use is correct as either VS17,
VS2017, VC14.10. I opted for the latter since we use VC for earlier
versions (eg VC10, VC12, etc).

Ref: https://github.com/curl/curl/pull/8438#issuecomment-1037070192

Closes https://github.com/curl/curl/pull/8447
2022-03-29 03:39:36 -04:00
Daniel Stenberg
87da3e845b
mqtt: better handling of TCP disconnect mid-message
Reported-by: Jenny Heino
Bug: https://hackerone.com/reports/1521610
Closes #8644
2022-03-29 08:43:14 +02:00
Daniel Stenberg
301bd97965
CURLOPT_DISALLOW_USERNAME_IN_URL.3: use uppercase URL 2022-03-28 19:40:47 +02:00
Ian Blanes
884098665d
docs/DYNBUF: clarify documentation for Curl_dyn_ptr and Curl_dyn_uptr
Closes #8606
2022-03-28 09:39:09 +02:00
Ian Blanes
9e5bd9ba19
curl: fix segmentation fault for empty output file names.
Function glob_match_url set *result to NULL when called with filename =
"", producing an indirect NULL pointer dereference.

Closes #8606
2022-03-28 09:39:09 +02:00
Daniel Stenberg
a6c3b7d6f5
TODO: Read keys from ~/.ssh/id_ecdsa, id_ed25519
It would be nice to expand the list of key locations curl uses for the
newer key types supported by libssh2.

Closes #8586
2022-03-27 16:21:29 +02:00
Daniel Stenberg
235535cf23
ngtcp2: update to work after recent ngtcp2 updates
Assisted-by: Tatsuhiro Tsujikawa
Reported-by: jurisuk on github
Fixes #8638
Closes #8639
2022-03-26 18:35:23 +01:00
Farzin
47048e0287
CURLOPT_PROGRESSFUNCTION.3: fix typo in example
Closes #8636
2022-03-25 16:53:30 +01:00
Daniel Stenberg
e7793cb57b
curl/header_json: output the header names in lowercase
To better allow json[“header”].

Reported-by: Peter Korsgaard
Bug: https://daniel.haxx.se/blog/2022/03/24/easier-header-picking-with-curl/comment-page-1/#comment-25878
Closes #8633
2022-03-25 11:24:27 +01:00
Daniel Stenberg
f718a91547
RELEASE-NOTES: synced 2022-03-24 15:51:43 +01:00
Daniel Stenberg
c2610db63e
headers.h: make Curl_headers_push() be CURLE_OK when not built
... to avoid errors when the function isn't there.

Reported-by: Marcel Raad
Fixes #8627
Closes #8628
2022-03-24 00:52:34 +01:00
Daniel Stenberg
8e22fc68e7
scripts: move three scripts from lib/ to scripts/
Move checksrc.pl, firefox-db2pem.sh and mk-ca-bundle.pl since they don't
particularly belong in lib/

Also created an EXTRA_DIST= in scripts/Makefile.am instead of specifying
those files in the root Makefile.am

Closes #8625
2022-03-23 15:26:11 +01:00
Marc Hoersken
b478d59e9d
lib/warnless.[ch]: only check for WIN32 and ignore _WIN32
curl_setup.h automatically defines WIN32 if just _WIN32 is defined.

Therefore make sure curl_setup.h is included through warnless.h.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro

Closes #8594
2022-03-23 05:00:10 +01:00
Marc Hoersken
24f0fec405
tests/server/util.h: align WIN32 condition with util.c
There is no need to test for both _WIN32 and WIN32 as curl_setup.h
automatically defines the later if the first one is defined.

Also tests/server/util.c is only checking for WIN32 arouund the
implementation of win32_perror, so just defining _WIN32
would not be sufficient for a successful compilation.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro

Closes #8594
2022-03-23 05:00:04 +01:00
Philip H
98b40c61bc
firefox-db2pem.sh: make the shell script safer
Reported by lift

Closes #8616
2022-03-22 23:14:34 +01:00
Jay Satiro
8b1cae63b7 gtls: fix build for disabled TLS-SRP
Prior to this change if, at build time, the GnuTLS backend was found to
have TLS-SRP support (HAVE_GNUTLS_SRP) but TLS-SRP was disabled in curl
via --disable-tls-srp (!USE_TLS_SRP) then a build error would occur.

Bug: https://curl.se/mail/lib-2022-03/0046.html
Reported-by: Robert Brose

Closes https://github.com/curl/curl/pull/8604
2022-03-22 14:24:08 -04:00
Jay Satiro
ccea329848 winbuild: Add a Visual Studio example to the README
- Add an example that explains in detail how the user can add libcurl to
  their Visual Studio project.

Ref: https://github.com/curl/curl/issues/8591

Closes https://github.com/curl/curl/pull/8592
2022-03-22 14:24:07 -04:00
Jay Satiro
cabcf403ed docs/opts: Mention Schannel client cert type is P12
Schannel backend code behaves same as Secure Transport, it expects a P12
certificate file or the name of a certificate already in the user's OS
key store. Also, both backends ignore CURLOPT_SSLKEY (tool: --key)
because they expect the private key to already be available from the
keystore or P12 certificate.

Ref: https://github.com/curl/curl/discussions/8581#discussioncomment-2337260

Closes https://github.com/curl/curl/pull/8587
2022-03-22 14:24:06 -04:00
Daniel Stenberg
ba4a8fa4d1
lib1945: fix compiler warning 4706 on MSVC
Follow-up from d1e4a67734

Closes #8623
2022-03-22 16:40:03 +01:00
Philip H
8c3859b2a3
ci/event-based.yml: improve impacket install
skip python3-pip
install impacket with library module

Closes #8621
2022-03-22 16:38:47 +01:00
Daniel Stenberg
23540923e1
test1459: disable for oldlibssh
This test with libssh 0.9.3 works fine on github but fails on circleci.
Might as well disable this test for oldlibssh installations.

Closes #8622
2022-03-22 16:36:10 +01:00
Daniel Stenberg
2e1ef61560
test1135: sync with recent API updates
This test verifies that the order of functions in public headers remain
the same but hasn't been updated to care for recently added header
files. The order is important for some few platforms - or VERSIONINFO
needs to updated.

This fix also updates VERSIONINFO to be sure.

Closes #8620
2022-03-22 14:28:18 +01:00
Daniel Stenberg
f07be5d1fa
curl_easy_nextheader.3: fix two typos
Reported-by: Timothe Litt
Bug: https://curl.se/mail/lib-2022-03/0060.html
2022-03-22 11:52:37 +01:00
Daniel Stenberg
ca2c30bcc0
options: remove mistaken space before paren in prototype 2022-03-22 11:09:22 +01:00
Daniel Stenberg
d79b1ead74
cirrus: add --enable-headers-api for some windows builds 2022-03-22 08:24:26 +01:00
Daniel Stenberg
ea0ada834e
GHA: --enable-headers-api in all workflows 2022-03-22 08:24:26 +01:00
Daniel Stenberg
ac81a9c9ae
lib: make the headers API depend on --enable-headers-api 2022-03-22 08:24:26 +01:00
Daniel Stenberg
7c8c723682
configure: add --enable-headers-api to enable the headers API
Defaults to disabled while labeled EXPERIMENTAL.

Make all the headers API tests require 'headers-api' to run.
2022-03-22 08:24:26 +01:00
Daniel Stenberg
160b640a8b
test1671: verify -w '%{header_json} 2022-03-22 08:24:25 +01:00
Daniel Stenberg
62b60ed1a0
test1670: verify -w %header{} 2022-03-22 08:24:25 +01:00
Daniel Stenberg
4133a69f2d
curl: add %{header_json} support in -w handling
Outputs all response headers as a JSON object.
2022-03-22 08:24:25 +01:00
Daniel Stenberg
2d45137e1e
curl: add %header{name} support in -w handling
Outputs the response header 'name'
2022-03-22 08:24:25 +01:00
Daniel Stenberg
d1e4a67734
header api: add curl_easy_header and curl_easy_nextheader
Add test 1940 to 1946 to verify.

Closes #8593
2022-03-22 08:24:22 +01:00
Daniel Stenberg
bdc664a640
test1459: remove the different exit code for oldlibssh
When using libssh/0.9.3/openssl/zlib, we seem to be getting the "right"
error code.

Closes #8490
2022-03-21 17:41:30 +01:00
Daniel Stenberg
59c44c76de
libssh: unstick SFTP transfers when done event-based
Test 604 and 606 (at least).

Closes #8490
2022-03-21 17:41:20 +01:00
Daniel Stenberg
5bb4d3ec06
gha: move the event-based test over from Zuul
Switched libssh2 to libssh

Closes #8490
2022-03-21 17:39:49 +01:00
Daniel Stenberg
02173e2341
RELEASE-NOTES: synced 2022-03-21 08:43:14 +01:00
Daniel Stenberg
dcdf2e8a36
http: return error on colon-less HTTP headers
It's a protocol violation and accepting them leads to no good.

Add test case 398 to verify

Closes #8610
2022-03-21 08:37:24 +01:00
Daniel Stenberg
33fe8251cb
test718: edited slightly to return better HTTP
Since hyper is picky and won't play ball otherwise.

Bug: https://github.com/hyperium/hyper/issues/2783
Reported-by: Daniel Valenzuela
Closes #8614
2022-03-20 22:54:49 +01:00
Daniel Stenberg
7e145dd270
hyper: no h2c support
Make tests require h2c feature present to run, and only set h2c if
nghttp2 is used in the build. Hyper does not support it.

Remove those tests from DISABLED

Fixes #8605
Closes #8613
2022-03-20 16:45:08 +01:00
Daniel Stenberg
a7ee34259e
configure: bump the copyright year range int the generated output 2022-03-19 22:21:30 +01:00
Andreas Falkenhahn
c20a516d03
BINDINGS.md: add Hollywood binding
Closes #8609
2022-03-18 23:03:42 +01:00
Daniel Stenberg
563d1f9037
HISTORY: add some 2022 data 2022-03-18 10:04:20 +01:00
Daniel Stenberg
5ab9b15427
scripts/copyright.pl: ignore the new mlc_config.json file 2022-03-18 09:15:15 +01:00
Philip H
fe4913ff55
mlc_config.json: add file to ignore known troublesome URLs
This is the config file for the CI markdown link checker and lets us
filter URLs that are known to cause problems. Like
https://curl.zuul.vexxhost.dev/ for now.

Closes #8597
2022-03-18 09:13:09 +01:00
Philip H
c652621928
winbuild/README.md: fixup dead link
Closes #8597
2022-03-18 09:10:56 +01:00
Jay Satiro
acf46b1bba rtsp: don't let CSeq error override earlier errors
- When done, if an error has already occurred then don't check the
  sequence numbers for mismatch.

A sequence number may not have been received if an error occurred.

Prior to this change a sequence mismatch error would override earlier
errors. For example, a server that returns nothing would cause error
CURLE_GOT_NOTHING in Curl_http_done which was then overridden by
CURLE_RTSP_CSEQ_ERROR in rtsp_done.

Closes https://github.com/curl/curl/pull/8525
2022-03-18 03:24:37 -04:00
Jay Satiro
d3cb3be520 lib: fix some misuse of curlx_convert_wchar_to_UTF8
curlx_convert_wchar_to_UTF8 must be freed by curlx_unicodefree, but
prior to this change some uses mistakenly called free.

I've reviewed all other uses of curlx_convert_wchar_to_UTF8 and
curlx_convert_UTF8_to_wchar.

Ref: https://github.com/curl/curl/commit/1d5d0ae

Closes https://github.com/curl/curl/pull/8521
2022-03-18 03:20:03 -04:00