Commit Graph

29843 Commits

Author SHA1 Message Date
Philip H
e665415a0e
HTTP3.md: update git branches
Closes #10554
2023-02-18 09:52:11 +01:00
Stefan Eissing
e187d69e48
urldata: remove now from struct SingleRequest - not needed
Closes #10549
2023-02-17 23:23:33 +01:00
Daniel Stenberg
b30b0c3840
lib1560: add IPv6 canonicalization tests
Closes #10552
2023-02-17 23:22:05 +01:00
Daniel Stenberg
912d05fec7
RELEASE-NOTES: synced 2023-02-17 23:17:01 +01:00
Daniel Stenberg
8b27799f8c
urlapi: do the port number extraction without using sscanf()
- sscanf() is rather complex and slow, strchr() much simpler

- the port number function does not need to fully verify the IPv6 address
  anyway as it is done later in the hostname_check() function and doing
  it twice is unnecessary.

Closes #10541
2023-02-17 16:21:26 +01:00
Stefan Eissing
72bb489543
setopt: allow HTTP3 when HTTP2 is not defined
Reported-by: Karthikdasari0423 on github
Fixes #10538
Closes #10544
2023-02-17 16:12:24 +01:00
jonrumsey
85721574ed
os400: correct Curl_os400_sendto()
Add const qualifier to 5th argument of Curl_os400_sendto()

Make OS400 wrapper for sendto match the normal prototype of sendto()
with a const qualifier.

Fixes #10539
Closes #10548
2023-02-17 14:49:51 +01:00
Stefan Eissing
216e4b1fb6
tests-httpd: add proxy tests
for direct and tunneling checks on http: and https:

Closes #10519
2023-02-17 11:40:57 +01:00
Daniel Stenberg
6841f2ed5f
curl: make --silent work stand-alone
- renamed the struct field to 'silent' to match the cmdline option
- make --show-error toggle independently of --silent
- make --silent independent of ->noprogress as well

By doing this, the three options --silent, --no-progress-meter and
--show-error should work independently of each other and also work with
and without '--no-' prefix as documented.

Reported-by: u20221022 on github
Fixes #10535
Closes #10536
2023-02-17 09:22:49 +01:00
Daniel Stenberg
6d860f1758
socks: allow using DoH to resolve host names
For SOCKS modes where a local host resolve is done.

It was previously disabled in 12d655d456, but a few local tests seem to
indicate that it works fine. Works now because of the SOCKS refactor of
4a4b63daaa that made it non-blocking.

Reported-by: roughtex on github
Fixes #10537
Closes #10540
2023-02-17 09:17:54 +01:00
Stefan Eissing
4437e3e344
test: add test for HTTP/2 corruption as reported in #10525
- adding test_02_20 for reproducing the situation
- using recently released mod_h2 Apache module
- skipping test if an older version is installed
- adding installation of current mod_h2 to github pytest workflow

This reproduces the error reliable (for me) on the lib/http2.c version
of curl 7.88.0. And passes with the recent curl master.

Closes #10534
2023-02-17 09:17:04 +01:00
Daniel Stenberg
5479d9916e
tool_operate: allow debug builds to set buffersize
Using the CURL_BUFFERSIZE environment variable.

Closes #10532
2023-02-16 14:36:24 +01:00
Stefan Eissing
cc52bc45f6
connnect: fix timeout handling to use full duration
- connect timeout was used at half the configured value, if the
  destination had 1 ip version 4 and other version 6 addresses
  (or the other way around)
- extended test2600 to reproduce these cases

Reported-by: Michael Kaufmann
Fixes #10514
Closes #10517
2023-02-16 11:24:29 +01:00
Daniel Stenberg
ce24ea373f
tool_getparam: make --get a true boolean
To match how it is documented in the man page.

Fixes #10527
Reported-by: u20221022 on github
Closes #10531
2023-02-16 10:53:59 +01:00
Harry Sintonen
8c939453f5
http:: include stdint.h more readily
Closes #10516
2023-02-16 10:07:52 +01:00
Stefan Eissing
79d0b3c0c0
tests: make the telnet server shut down a socket gracefully
- test 1452 failed occasionally with ECONNRESET errnos in curl when the
  server closed the connection in an unclean state.

Closes #10509
2023-02-16 10:05:54 +01:00
Harry Sintonen
87ed650d04
http2: set drain on stream end
Ensure that on_frame_recv() stream end will trigger a read if there is
pending data. Without this it could happen that the pending data is
never consumed.

This combined with https://github.com/curl/curl/pull/10529 should fix
https://github.com/curl/curl/issues/10525

Ref: https://github.com/curl/curl/issues/10525
Closes #10530
2023-02-16 09:33:52 +01:00
Stefan Eissing
3103de2053
http2: buffer/pausedata and output flush fix.
* do not process pending input data when copying pausedata to the
   caller
 * return CURLE_AGAIN if the output buffer could not be completely
   written out.

Ref: #10525
Closes #10529
2023-02-16 09:33:01 +01:00
Marcel Raad
c1c969052f
krb5: silence cast-align warning
Add an intermediate cast to `void *`, as done everywhere else when
casting from `sockaddr *` to `sockaddr_in *`.

Closes https://github.com/curl/curl/pull/10528
2023-02-16 08:54:24 +01:00
Daniel Stenberg
8161b8fb79
RELEASE-NOTES: synced
bumped to 7.88.1
2023-02-15 23:49:01 +01:00
Daniel Stenberg
2fdc1d816e
tests: make sure gnuserv-tls has SRP support before using it
Reported-by: fundawang on github
Fixes #10522
Closes #10524
2023-02-15 23:42:42 +01:00
Daniel Stenberg
f1d09231ad
runtests: fix "uninitialized value $port"
by using a more appropriate variable

Reported-by: fundawang on github
Fixes #10518
Closes #10520
2023-02-15 16:09:05 +01:00
Daniel Stenberg
3027611ca6
RELEASE-NOTES: synced
7.88.0 release
2023-02-15 08:10:15 +01:00
Daniel Stenberg
e248439004
THANKS: added contributors from 7.88.0 2023-02-15 08:10:15 +01:00
Daniel Stenberg
964ff76863
openssl: rename 'errcode_t' to 'sslerr_t'
Turns out "/usr/include/et/com_err.h" typedefs this type (without proper
variable scoping).

comerr is the "common error description library" that apparently might be used
by krb5 code, which then makes this header get used in a curl build.

Reported-by: Bruno Henrique Batista Cruz da Silva
Fixed #10502
Closes #10500
2023-02-14 08:25:11 +01:00
Dan Fandrich
1807eb5e1f CONTRIBUTE: More formally specify the commit description
This codifies what people have actually used in git commits over the
past 6 years. I've left off some lesser-used headers that appear to
duplicate others and tried to describe a consistent use for several
others that were used more arbitrarily.

This makes it easier for new committers to find out the kinds of things
we want to acknowledge, makes it easier to perform statistical analysis
on commits, and opens the possibility of performing lint checks on
descriptions before submission.

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

Closes #10478
2023-02-13 12:15:26 -08:00
Stefan Eissing
ce0cad713d
openssl: test and fix for forward proxy handling (non-tunneling).
- adding pytest test_10 cases for proxy httpd setup tests
- fixing openssl bug in https: proxy hostname verification that
  used the hostname of the request and not the proxy name.

Closes #10498
2023-02-13 20:54:57 +01:00
Daniel Stenberg
17153e173d
cmdline-opts/Makefile: on error, do not leave a partial
And support 'make V=1' to show the full command line

Closes #10497
2023-02-13 20:53:45 +01:00
Daniel Stenberg
daf4e6a3a1
curl.1: make help, version and manual sections "custom"
Instead of using "multi: boolean", as these are slightly special as in
they do are not enable/disable ones.

Fixes #10490
Reported-by: u20221022 on github
Closes #10497
2023-02-13 20:52:11 +01:00
Stefan Eissing
c74bad29fd
tests: add tests for HTTP/2 and HTTP/3 to verify the header API
Test 2403 and 2503 check "header_json" output and therefore use of
header-api

Closes #10495
2023-02-13 17:14:21 +01:00
Philip H
6f20596768
CI: update wolfssl / wolfssh to 5.5.4 / 1.4.12
Closes #10493
2023-02-13 17:13:32 +01:00
Daniel Stenberg
a6ae169540
KNOW_BUGS: cleanups with some changed to TODOs
- remove "Excessive HTTP/2 packets with TCP_NODELAY"

  This is not a bug. Rather room for improvement.

I believe these have been fixed:

- 17.4 Connection failures with parallel HTTP/2
- 17.5 HTTP/2 connections through HTTPS proxy frequently stall

- remove "FTPS needs session reuse"

That is still true, but curl should also do session reuse now.

- remove "ASCII FTP"

It is documented behavior, and not single user has asked for extended
functionality here the last decade or so.

- remove "Passive transfer tries only one IP address"

add as a TODO

- remove "DoH leaks memory after followlocation"

With a recipe on how to reproduce, this is pointless to keep around

- remove "DoH does not inherit all transfer options"

add it as a TODO

Closes #10487
2023-02-13 17:10:57 +01:00
Tatsuhiro Tsujikawa
5c9ee8cef4
GHA: bump ngtcp2 workflow dependencies
Closes #10494
2023-02-13 17:07:49 +01:00
Patrick Monnerat
119fb18719
content_encoding: do not reset stage counter for each header
Test 418 verifies

Closes #10492
2023-02-13 17:06:19 +01:00
Daniel Stenberg
4858e7af1c
RELEASE-NOTES: synced 2023-02-13 11:31:28 +01:00
Jay Satiro
f438ce099b multi: stop sending empty HTTP/3 UDP datagrams on Windows
- Limit the 0-sized send procedure that is used to reset a SOCKET's
  FD_WRITE to TCP sockets only.

Prior to this change the reset was used on UDP sockets as well, but
unlike TCP sockets a 0-sized send actually sends out a datagram.

Assisted-by: Marc Hörsken

Ref: https://github.com/curl/curl/pull/9203

Fixes https://github.com/curl/curl/issues/9086
Closes https://github.com/curl/curl/pull/10430
2023-02-13 03:25:12 -05:00
Viktor Szakats
7ce140ba97
h3: silence compiler warnings
Reviewed-by: Daniel Stenberg
Fixes #10485
Closes #10486
2023-02-12 17:11:46 +00:00
Daniel Stenberg
efbf02111a
smb: return error on upload without size
The protocol needs to know the size ahead of time, this is now a known
restriction and not a bug.

Also output a clearer error if the URL path does not contain proper
share.

Ref: #7896
Closes #10484
2023-02-12 18:04:41 +01:00
Viktor Szakats
5309e32141
windows: always use curl's basename() implementation
The `basename()` [1][2] implementation provided by mingw-w64 [3] makes
assumptions about input encoding and may break with non-ASCII strings.

`basename()` was auto-detected with CMake, autotools and since
68fa9bf3f5 (2022-10-13), also in
`Makefile.mk` after syncing its behaviour with the mainline build
methods. A similar patch for curl-for-win broke official Windows
builds earlier, in release 7.83.1_4 (2022-06-15).

This patch forces all Windows builds to use curl's internal
`basename()` implementation to avoid such problems.

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/basename.html
[2]: https://www.man7.org/linux/man-pages/man3/basename.3.html
[3]: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/misc/basename.c

Reported-by: UnicornZhang on Github
Assisted-by: Cherish98 on Github
Reviewed-by: Daniel Stenberg

Fixes #10261
Closes #10475
2023-02-12 12:52:59 +00:00
Philip H
82348603e8
Linux CI: Bump rustls-ffi to v0.9.1
Closes #10476
2023-02-12 12:36:25 +01:00
Daniel Stenberg
36fca647a4
libtest: build lib2305 with multibyte as well
Fixes a build regression.

Follow-up to 5a9a04d556
Reported-by: Viktor Szakats
Ref: https://github.com/curl/curl/pull/10475#issuecomment-1426831800

Closes #10477
2023-02-12 11:20:34 +01:00
Dmitry Atamanov
1df2dfb514 cmake: fix dev warning due to mismatched arg
The package name passed to find_package_handle_standard_args (BROTLI)
does not match the name of the calling package (Brotli). This can lead
to problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.

Closes https://github.com/curl/curl/pull/10471
2023-02-12 01:45:48 -05:00
James Keast
635bf5a6b2 setopt: Address undefined behaviour by checking for null
This addresses undefined behaviour found using clang's UBsan:

curl/lib/setopt.c:177:14: runtime error: applying non-zero offset 1 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior curl/lib/setopt.c:177:14 in

Closes #10472
2023-02-11 10:13:38 -08:00
Jacob Hoffman-Andrews
38262c944d
rustls: improve error messages
Changes numeric error codes into verbose error codes in two places.
Adds a prefix indicating that the error came from rustls, and in some
places which function it came from.

Adds special handling for RUSTLS_RESULT_UNEXPECTED_EOF, since the
default message of "Unexpected EOF" is insufficiently explanatory.

Closes #10463
2023-02-11 10:11:08 +01:00
Daniel Stenberg
0a9488c7cc
openssl: remove dead code
Follow-up to e8b00fcd6a

Due to the new 'if(!nonblocking)' check on the block a level above,
there is no need to check for it again within the same conditional.

Detected by Coverity

Closes #10473
2023-02-11 09:50:23 +01:00
Daniel Stenberg
03ce27ae2f
ngtcp2: replace removed define and stop using removed function
They were removed upstream.

Reported-by: Karthikdasari0423 on github
Fixes #10469
Closes #10474
2023-02-11 09:49:13 +01:00
Daniel Stenberg
0900997250
scripts/delta: show percent of number of files changed since last tag 2023-02-10 18:52:16 +01:00
Daniel Stenberg
251af47507
RELEASE-NOTES: synced 2023-02-10 18:49:34 +01:00
Stefan Eissing
ca95d391ea
pytest: add a test case for PUSH related things.
- checking that "103 Early Hints" are visible in curl's header dump file

Closes #10452
2023-02-10 10:30:22 +01:00
Gregory Panakkal
01772a3c39
WEBSOCKET.md: typo
Fixing missing slash for ws protocol scheme

Closes #10464
2023-02-10 10:28:40 +01:00