Commit Graph

4816 Commits

Author SHA1 Message Date
Josh Soref de1004eb0f
cleanup: spell DoH with a lowercase o
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Closes #7413
2021-07-16 23:53:13 +02:00
Daniel Stenberg 9053dbbf62
msnprintf: return number of printed characters excluding null byte
... even when the output is "capped" by the maximum length argument.

Clarified in the docs.

Closes #7361
2021-07-08 10:05:39 +02:00
Daniel Stenberg e7416cfd2b
infof: remove newline from format strings, always append it
- the data needs to be "line-based" anyway since it's also passed to the
  debug callback/application

- it makes infof() work like failf() and consistency is good

- there's an assert that triggers on newlines in the format string

- Also removes a few instances of "..."

- Removes the code that would append "..." to the end of the data *iff*
  it was truncated in infof()

Closes #7357
2021-07-07 22:54:01 +02:00
Daniel Stenberg c3d612662d
test1147: hyper doesn't allow "crazy" request headers like built-in
... so strip that from the test.

Closes #7349
2021-07-05 22:51:13 +02:00
Daniel Stenberg a62ece3f57
c-hyper: bail on too long response headers
To match with built-in behaviors. Makes test 1154 work.

Closes #7350
2021-07-05 22:49:12 +02:00
Daniel Stenberg 0965348cd8
test1151: added missing CRLF to work with hyper
Closes #7350
2021-07-05 22:49:02 +02:00
Daniel Stenberg e41feede34
test1116: hyper doesn't pass through "surprise-trailers"
Closes #7344
2021-07-05 22:39:42 +02:00
Daniel Stenberg 07fa74d34a
test1519: adjusted to work with hyper
Closes #7333
2021-07-01 14:26:06 +02:00
Daniel Stenberg a80f8ea182
test1518: adjusted to work with hyper
... by making sure the stdout output doesn't look like HTTP headers.

Closes #7333
2021-07-01 14:25:57 +02:00
Daniel Stenberg 7f11282d5f
test1514: add a CRLF to the response to make it correct
Makes hyper accept it fine instead returning HYPERE_UNEXPECTED_EOF on
us.

Closes #7334
2021-07-01 14:19:55 +02:00
Daniel Stenberg ca60a4398f
lib677: make it survive torture testing
Follow-up to a5ab72d5ed

Closes #7300
2021-06-27 23:20:18 +02:00
Daniel Stenberg a5ab72d5ed
test677: IMAP CONNECT_ONLY, custom command and then exit
Adjusted ftpserver.pl to add support for the IMAP IDLE command

Adjusted test 660 to sync with the fix
2021-06-24 09:07:40 +02:00
Li Xinwei 30e491e5c9
cmake: fix support for UnixSockets feature on Win32
Move the definition of sockaddr_un struct from config-win32.h to
curl_setup.h, so that it could be shared by all build systems.

Add ADDRESS_FAMILY typedef for old mingw, now old mingw can also use
unix sockets.

Also fix the build of tests/server/sws.c on Win32 when USE_UNIX_SOCKETS
is defined.

Closes #7034
2021-06-21 14:52:27 +02:00
Daniel Stenberg 80e1054fe5
hyper: propagate errors back up from read callbacks
Makes test 513 work with hyper

Closes #7266
2021-06-17 08:19:31 +02:00
Daniel Stenberg b67d3ba73e
curl_url_set: reject spaces in URLs w/o CURLU_ALLOW_SPACE
They were never officially allowed and slipped in only due to sloppy
parsing. Spaces (ascii 32) should be correctly encoded (to %20) before
being part of a URL.

The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl
allow spaces.

Updated test 1560 to verify.

Closes #7073
2021-06-15 10:49:49 +02:00
Daniel Stenberg bbbc5de93f
netrc: skip 'macdef' definitions
Add test 494 to verify

Reported-by: Harry Sintonen
Fixes #7238
Closes #7244
2021-06-13 23:44:41 +02:00
Gealber Morales 791937b881
mqtt: add support for username and password
Minor-edits-by: Daniel Stenberg
Added test 2200 to 2205

Closes #7243
2021-06-12 23:50:13 +02:00
Daniel Stenberg f60f51721c
runtests: init $VERSION to avoid warnings when using -l 2021-06-11 14:26:32 +02:00
Daniel Stenberg a15d146f47
tests: update README about servers and port numbers
Closes #7242
2021-06-11 12:48:56 +02:00
Christian Weisgerber 02dfe71937
sws: malloc request struct instead of using stack
... 2MB requests is otherwise just too big for some systems.

(The allocations are not freed properly.)

Bug: https://curl.se/mail/lib-2021-06/0018.html

Closes #7235
2021-06-11 11:13:24 +02:00
yb999 b9cdcc7a17
tests: update README.md with a missing single quote
Closes #7231
2021-06-10 16:11:03 +02:00
Daniel Stenberg 7cfd8f037a
tests/data/DISABLED: add tests not working with hyper
The goal is to remove them all from here over time.

Closes #7209
2021-06-10 08:42:55 +02:00
Daniel Stenberg dd47b0cce9
runtests: also find the last test in Makefile.inc
Closes #7209
2021-06-10 08:42:52 +02:00
Daniel Stenberg 77ae8f26ad
test3010: work with hyper mode
Closes #7209
2021-06-10 08:42:50 +02:00
Daniel Stenberg 75391045cf
test1594/1595/1596: fix to work in hyper mode
Closes #7209
2021-06-10 08:42:44 +02:00
Daniel Stenberg 30e50de53e
test1438/1457: add HTTP keyword to make hyper mode work
Closes #7209
2021-06-10 08:42:41 +02:00
Daniel Stenberg 5f70cb6461
test1340/1341: adjusted for hyper mode
Closes #7209
2021-06-10 08:42:38 +02:00
Daniel Stenberg 769d9176e3
test1218: adjusted for hyper mode
Closes #7209
2021-06-10 08:42:35 +02:00
Daniel Stenberg 6101ddc24e
test1216: adjusted for hyper mode
Closes #7209
2021-06-10 08:42:33 +02:00
Daniel Stenberg 340d6b4589
test1230: adjust to work in hyper mode
Closes #7209
2021-06-10 08:42:30 +02:00
Daniel Stenberg c214a6a17b
c-hyper: abort CONNECT response reading early on non 2xx responses
Fixes test 493

Closes #7209
2021-06-10 08:42:27 +02:00
Daniel Stenberg aeb064db03
test434: add HTTP keyword
Closes #7209
2021-06-10 08:42:23 +02:00
Daniel Stenberg e7ae6f013d
test599: adjusted to work in hyper mode
Closes #7209
2021-06-10 08:42:19 +02:00
Daniel Stenberg cd5ca9bb38
test566: adjust to work with hyper mode
Closes #7209
2021-06-10 08:42:13 +02:00
Daniel Stenberg 76035e612a
runtests: skip disabled tests unless -f is used
To make it easier to write ranges like '115 to 229' without that
explicitly enabling tests that are listed in DISABLED, this makes
runtests always skip disabled tests unless the -f command line option is
used.

Previously the code attempted to not run such tests, but didn't do it
correctly.

Closes #7212
2021-06-08 23:35:37 +02:00
Daniel Stenberg 3ac9b80525
test644: remove as duplicate of test 587
Closes #7208
2021-06-08 16:07:56 +02:00
Daniel Stenberg 48b0cca65e
test500: adjust to work with hyper mode 2021-06-07 23:54:54 +02:00
Daniel Stenberg 57e46dce58
test433: adjust for hyper mode
Closes #7205
2021-06-07 23:14:09 +02:00
Daniel Stenberg 528f22736d
test395: hyper cannot work around > 64 bit content-lengths like built-in
Closes #7205
2021-06-07 23:14:06 +02:00
Daniel Stenberg 77590673e9
test394: hyper returns a different error
Closes #7205
2021-06-07 23:14:03 +02:00
Daniel Stenberg 1449713dd3
test393: make Content-Length fit within 64 bit for hyper
Closes #7205
2021-06-07 23:14:00 +02:00
Daniel Stenberg ae37f46e80
test347: CRLFify to work in hyper mode
Closes #7205
2021-06-07 23:13:55 +02:00
Daniel Stenberg 71da11a49d
test339: CRLFify better to work in hyper mode
Closes #7205
2021-06-07 23:13:47 +02:00
Daniel Stenberg b26f1dc14f
test328: avoid a header-looking body to make hyper mode work
The test still works the same, just modified two bytes in the content.

Closes #7203
2021-06-07 13:26:27 +02:00
Daniel Stenberg 265b14d6b3
metalink: remove
Warning: this will make existing curl command lines that use metalink to
stop working.

Reasons for removal:

1. We've found several security problems and issues involving the
   metalink support in curl. The issues are not detailed here. When
   working on those, it become apparent to the team that several of the
   problems are due to the system design, metalink library API and what
   the metalink RFC says. They are very hard to fix on the curl side
   only.

2. The metalink usage with curl was only very briefly documented and was
   not following the "normal" curl usage pattern in several ways, making
   it surprising and non-intuitive which could lead to further security
   issues.

3. The metalink library was last updated 6 years ago and wasn't so
   active the years before that either. An unmaintained library means
   there's a security problem waiting to happen. This is probably reason
   enough.

4. Metalink requires an XML parsing library, which is complex code (even
   the smaller alternatives) and to this day often gets security
   updates.

5. Metalink is not a widely used curl feature. In the 2020 curl user
   survey, only 1.4% of the responders said that they'd are using it. In
   2021 that number was 1.2%. Searching the web also show very few
   traces of it being used, even with other tools.

6. The torrent format and associated technology clearly won for
   downloading large files from multiple sources in parallel.

Cloes #7176
2021-06-07 08:14:25 +02:00
Daniel Stenberg 510e6e9a19
tests/data/Makefile.inc: error: trailing backslash on last line
Follow-up to d8dcb399b8
2021-06-04 16:52:34 +02:00
Alexis Vachette d8dcb399b8
url: bad CURLOPT_CONNECT_TO syntax now returns error
Added test 3020 to verify

Closes #7183
2021-06-04 14:08:30 +02:00
Daniel Stenberg 628ebd82b9
test269: disable for hyper
--ignore-content-length / CURLOPT_IGNORE_CONTENT_LENGTH doesn't work
with hyper.

Closes #7184
2021-06-03 23:11:11 +02:00
Daniel Stenberg b193fd3bbd
runtests: enable 'hyper mode' only for HTTP tests
The 'hyper mode' makes line-ending checks work in the test suite for
when hyper is used. Now it also requires that HTTP or HTTPS are
mentioned as keywords to be enabled so that it doesn't wrongly adjusts
tests for other protocols.

This makes test 271 (TFTP) work again in hyper enabled builds.

Closes #7185
2021-06-03 23:08:47 +02:00
Alexis Vachette cb39b4b7c4
hostip: bad CURLOPT_RESOLVE syntax now returns error
Added test 3019
Fixes #7170
Closes #7174
2021-06-03 13:53:18 +02:00