Commit Graph

2402 Commits

Author SHA1 Message Date
Sean McArthur
d6010c2106
hyper: customize test1274 to how hyper unfolds headers
Closes #9217
2022-08-10 23:49:18 +02:00
Daniel Stenberg
0ad7c8d7d5
digest: pass over leading spaces in qop values
When parsing the "qop=" parameter of the digest authentication, and the
value is provided within quotes, the list of values can have leading
white space which the parser previously did not handle correctly.

Add test case 388 to verify.

Reported-by: vlubart on github
Fixes #9264
Closes #9270
2022-08-08 08:28:04 +02:00
Fabian Keil
073268a6de
test44[2-4]: add '--resolve' to the keywords
... so the tests can be automatically skipped when
using an external proxy like Privoxy.

Closes #9250
2022-08-07 14:24:18 +02:00
Sean McArthur
3b52a80c05
hyper: enable obs-folded multiline headers
Closes #9216
2022-07-28 00:36:18 +02:00
Marc Hoersken
40b6206085
test3026: add support for Windows using native Win32 threads
Reviewed-by: Viktor Szakats
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg

Follow up to 7ade9c50b3
Closes #9012
2022-07-25 21:24:57 +02:00
Daniel Stenberg
4c0ac2aa59
cookie: treat a blank domain in Set-Cookie: as non-existing
This matches what RFC 6265 section 5.2.3 says.

Extended test 31 to verify.

Fixes #9164
Reported-by: Gwen Shapira
Closes #9177
2022-07-19 11:52:54 +02:00
Daniel Stenberg
945a81e143
test3026: require 'threadsafe'
Reported-by: Sukanya Hanumanthu
Fixes #9141
Closes #9142
2022-07-12 22:56:48 +02:00
Daniel Stenberg
e6f8445ede
setopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR
... as replacements for deprecated CURLOPT_PROTOCOLS and
CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the
32 bit limit the old ones are facing.

CURLINFO_PROTCOOL is now deprecated.

The curl tool is updated to use the new options.

Added test 1597 to verify the libcurl protocol parser.

Closes #8992
2022-07-04 08:35:09 +02:00
Sean McArthur
be8d2b037d
hyper: use wakers for curl pause/resume
Closes #9070
2022-06-30 10:19:08 +02:00
Daniel Stenberg
1dda49a1d3
curl.h: CURLE_CONV_FAILED is obsoleted
The last use was removed in 7.82.0. Updated some docs too to reflect the
current error code situation.

Closes #9067
2022-06-29 16:03:02 +02:00
Daniel Stenberg
46f8911d39
test444: test many received Set-Cookie:
The amount of sent cookies in the test is limited to 80 because hyper
has its own strict limits in how many headers it allows to be received
which triggers at some point beyond this number.
2022-06-26 11:01:56 +02:00
Daniel Stenberg
ff2b2bcf68
test442/443: test cookie caps
442 - verify that only 150 cookies are sent
443 - verify that the cookie: header remains less than 8K in size
2022-06-26 11:01:01 +02:00
Daniel Stenberg
7230b19a2e
test387: verify rejection of compression chain attack 2022-06-25 22:14:32 +02:00
Daniel Stenberg
2b7f7d04f7
reuse/dep5: adjusted to parse better
... adjusted a few files to contain copyright and license info.

Closes #9006
2022-06-14 14:07:02 +02:00
Daniel Stenberg
7ade9c50b3
test3026: disable on win32
... as it's not likely to have working pthreads

Closes #8996
2022-06-13 17:51:30 +02:00
max.mehl
ad9bc5976d
copyright: make repository REUSE compliant
Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869
2022-06-13 09:13:00 +02:00
Daniel Stenberg
95f5aae9ad
test390: verify --parallel
Closes #8985
2022-06-10 09:05:25 +02:00
Daniel Stenberg
5121d98c22
test1543: verify CURLINFO_EFFECTIVE_URL with CURLOPT_CURLU set
Triggered by a bug report from Adam Light:
https://curl.se/mail/lib-2022-06/0013.html - which ended up being mostly
a misunderstanding of how CURLINFO_EFFECTIVE_URL works.

Closes #8971
2022-06-08 16:32:46 +02:00
Daniel Stenberg
5912da253b
select: return error from "lethal" poll/select errors
Adds two new error codes: CURLE_UNRECOVERABLE_POLL and
CURLM_UNRECOVERABLE_POLL one each for the easy and the multi interfaces.

Reported-by: Harry Sintonen
Fixes #8921
Closes #8961
2022-06-08 11:07:01 +02:00
Daniel Stenberg
7007324a6a
test3026: add missing control file
Follow-up from 2ed1012564

Makes the test run, makes 'make dist' work

This single test takes 24-25 seconds on my machine (with valgrind). For
this reason I tag it with a "slow" keyword.

Closes #8976
2022-06-08 11:00:02 +02:00
Daniel Stenberg
5394cbf570
test391: verify --path-as-is with redirect 2022-06-08 10:30:28 +02:00
Thomas Guillem
2ed1012564
curl_version_info: add CURL_VERSION_THREADSAFE_INIT
This flag can be used to make sure that curl_global_init() is
thread-safe.

This can be useful for libraries that can't control what other
dependencies are doing with Curl.

Closes #8680
2022-06-07 13:34:03 +02:00
Fabian Keil
77ad759366
test414: add the '--resolve' keyword
... so the test can be automatically skipped when
using an external proxy like Privoxy.

Closes #8959
2022-06-06 12:26:26 +02:00
Fabian Keil
d313db70f8
test{440,441,493,977}: add "HTTP proxy" keywords
... so the tests can be automatically skipped when
using an external proxy like Privoxy.

Closes #8959
2022-06-06 12:26:23 +02:00
Fabian Keil
1d288d46d5
test 2081: add a valid reply for the second request
... so the test works when using a HTTP proxy like
Privoxy that sends an error message if the server
doesn't send data.

Closes #8959
2022-06-06 12:26:14 +02:00
Fabian Keil
9dfa1dcfa0
test 675: add missing CR so the test passes when run through Privoxy
Closes #8959
2022-06-06 12:26:06 +02:00
Fabian Keil
9dbce9b3d0
misc: spelling improvements
Closes #8956
2022-06-05 12:15:23 +02:00
Evgeny Grin
3a6fe0c767
digest: unquote realm and nonce before processing
RFC 7616 (and 2617) requires values to be "unquoted" before used for
digest calculations. The only place where unquoting can be done
correctly is header parsing function (realm="DOMAIN\\host" and
realm=DOMAN\\host are different realms).

This commit adds unquoting (de-escaping) of all values during header
parsing and quoting of the values during header forming. This approach
should be most straightforward and easy to read/maintain as all values
are processed in the same way as required by RFC.

Closes #8912
2022-06-02 08:18:34 +02:00
Daniel Stenberg
f810047f9d
headers: handle unfold of space-cleansed headers
Detected by OSS-fuzz

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47767

Updated test 1274

Closes #8947
2022-06-01 15:24:49 +02:00
Daniel Stenberg
bb130871c0
DISABLED: disable 1021 for hyper again
due to flakiness in the CI builds
2022-06-01 09:43:48 +02:00
Daniel Stenberg
ef94c972bc
test681: verify --no-remote-name
Follow-up to 83ee5c428d (from #8931)

Closes #8942
2022-05-31 16:09:53 +02:00
Daniel Stenberg
472831256d
test680: require 'http' since it uses such a URL
Follow-up to d1b376c035
2022-05-31 13:14:28 +02:00
Daniel Stenberg
d1b376c035
test680: verify rejection of malformatted .netrc quoted password 2022-05-31 09:05:01 +02:00
Daniel Stenberg
19f981b4ff
test679: verify netrc quoted string 2022-05-31 09:05:01 +02:00
Marc Hoersken
2d7044a191
tests/data/test1940: use binary mode for expected stdout
The generated stdout data is written in binary mode with [LF]
line endings, therefore we also need to do a binary comparison.

Assisted-by: Jay Satiro
Assisted-by: Daniel Stenberg

Follow up to c9b60f0053
Fixes #8920
Closes #8936
2022-05-30 09:23:41 +02:00
Daniel Stenberg
ba6a3fd3ee
DISABLED: add six tests that fail with hyper
1117 1274 1940 1941 1942 1943
2022-05-25 13:07:12 +02:00
Marc Hoersken
2d5b8048a5
tests/data/test1501: kill ftp server after slow LIST response
This test is contributing to flakiness on the Windows CI runs.
Killing the ftp server after the test run like other slowness
tests already do may help resolve or reduce the flakiness.

Closes #8907
2022-05-25 12:39:52 +02:00
Daniel Stenberg
c9b60f0053
http: restore header folding behavior
Folded header lines will now get passed through like before. The headers
API is adapted and will provide the content unfolded.

Added test 1274 and extended test 1940 to verify.

Reported-by: Petr Pisar
Fixes #8844
Closes #8899
2022-05-24 23:33:47 +02:00
Daniel Gustafsson
a8a1b666c4 ntlm: fix one more hostname test fallout
This fixup was missed in commit 5a41abef6d.

Closes: #8901
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-05-24 12:51:28 +02:00
Daniel Gustafsson
5a41abef6d ntlm: copy NTLM_HOSTNAME to host buffer
Commit 709ae2454f added a fake hostname to avoid leaking the local
hostname, but omitted copying it to the host buffer.  Fix by copying
and adjust the test fallout.

Closes: #8895
Fixes: #8893
Reported-by: Patrick Monnerat <patrick@monnerat.net>
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-05-22 23:26:24 +02:00
Daniel Stenberg
cb41a0169c
tests: update NTLM tests to use new host name
Also drop the debug requirement, remove the setenv sections, remove
prechecks and add NTLM to the top keywords.

Closes #8889
2022-05-20 16:24:13 +02:00
Balakrishnan Balasubramanian
dfa84a0450
socks: support unix sockets for socks proxy
Usage:
  curl -x "socks5h://localhost/run/tor/socks" "https://example.com"

Updated runtests.pl to run a socksd server listening on unix socket

Added tests test1467 test1468

Added documentation for proxy command line option and socks proxy
options

Closes #8668
2022-05-19 15:35:03 +02:00
Daniel Stenberg
b6487eb3d4
test1561: adjusted for the cookie fix 2022-05-19 14:48:26 +02:00
Daniel Stenberg
9ec22e4fe6
test414: verify secure cookie domain overlay 2022-05-19 14:48:26 +02:00
Daniel Gustafsson
d17db5713a test412/413: Use version macro for User-Agent
Commit 46d45ea3a incorrectly hardcoded the User-Agent in the test
output file which breaks when curlver is updated. Shift to using
the %VERSION macro instead.

Closes: #8856
2022-05-16 10:45:41 +02:00
Daniel Stenberg
3ead914303
test1635: verify --fail-with-body with --retry
Almost a dupe of 1634

Closes #8847
2022-05-16 10:04:21 +02:00
Daniel Stenberg
5227367903
test1919: verify CURLOPT_XOAUTH2_BEARER leak fix 2022-05-14 18:05:20 +02:00
Fabian Keil
75e9035921
tests 266, 116 and 1540: add a small write delay
This makes it more likely that the trailer is received
seperately from the last-chunk.

curl doesn't seem to care about this but it makes the tests
more useful when testing external proxies like Privoxy.
2022-05-11 11:14:18 +02:00
Fabian Keil
9e6ec8b6d5
tests 1117,1238,1523: adjust writedelay servercmds
... so the delays are the same now that the unit
is in milliseconds.
2022-05-11 11:14:18 +02:00
Daniel Stenberg
f8cb6c610a
test977: reproduce ability to set cookie on TLD
When PSL is not enabled
2022-05-09 16:47:28 +02:00