summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* hostip: remove conn->data from resolver functionsDaniel Stenberg2021-01-221-1/+1
| | | | | | | This also moves the 'async' struct from the connectdata struct into the Curl_easy struct, which seems like a better home for it. Closes #6497
* http: get CURLOPT_REQUEST_TARGET working with a HTTP proxyFabian Keil2021-01-202-1/+54
| | | | | | Added test 1613 to verify. Closes #6490
* Add test1181: Proxy request with --proxy-header "Connection: Keep-Alive"Fabian Keil2021-01-192-1/+49
|
* Add test1180: Proxy request with -H "Proxy-Connection: Keep-Alive"Fabian Keil2021-01-192-1/+49
| | | | | At the moment the test fails as curl sends two Proxy-Connection headers.
* runtests: preprocess DISABLED to allow conditionalsDaniel Stenberg2021-01-191-9/+19
| | | | | | | ... with this function provided, we can disable tests for specific environments and setups directly within this file. Closes #6477
* runtests: turn preprocessing into a separate functionDaniel Stenberg2021-01-191-73/+52
| | | | | ... and remove all other variable substitutions as they're now done once and for all in the preprocessor.
* test410: verify HTTPS GET with a 49K request headerDaniel Stenberg2021-01-182-1/+53
| | | | skip test 410 for mesalink in the CI as it otherwise hangs "forever"
* lib: pass in 'struct Curl_easy *' to most functionsDaniel Stenberg2021-01-172-8/+4
| | | | | | | | | | | | | | | | | | | | | ... in most cases instead of 'struct connectdata *' but in some cases in addition to. - We mostly operate on transfers and not connections. - We need the transfer handle to log, store data and more. Everything in libcurl is driven by a transfer (the CURL * in the public API). - This work clarifies and separates the transfers from the connections better. - We should avoid "conn->data". Since individual connections can be used by many transfers when multiplexing, making sure that conn->data points to the current and correct transfer at all times is difficult and has been notoriously error-prone over the years. The goal is to ultimately remove the conn->data pointer for this reason. Closes #6425
* test1918: verify curl_easy_option_by_name() and curl_easy_option_by_id()Daniel Stenberg2021-01-154-2/+95
| | | | | | | | | | | | ... and as a practical side-effect, make sure that the Curl_easyopts_check() function is asserted in debug builds, which we want to detect mismatches between the options list in easyoptions.c and the options in curl.h Found-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64#commitcomment-45991815 Closes #6461
* mime: make sure setting MIMEPOST to NULL resets properlyDaniel Stenberg2021-01-154-4/+102
| | | | | | | | | | | | ... so that a function can first use MIMEPOST and then set it to NULL to reset it back to a blank POST. Added test 584 to verify the fix. Reported-by: Christoph M. Becker Fixes #6455 Closes #6456
* misc: fix typosFabian Keil2021-01-111-1/+1
| | | | | Bug: https://curl.se/mail/lib-2021-01/0063.html Closes #6434
* test179: use consistent header line endingsDaniel Stenberg2021-01-081-1/+1
| | | | ... to make "Hyper mode" work better.
* http: have CURLOPT_FAILONERROR fail after all headersDaniel Stenberg2021-01-064-5/+73
| | | | | | | | | | ... so that Retry-After and other meta-content can still be used. Added 1634 to verify. Adjusted test 194 and 281 since --fail now also includes the header-terminating CRLF in the output before it exits. Fixes #6408 Closes #6409
* global_init: debug builds allocates a byte in initDaniel Stenberg2021-01-061-0/+1
| | | | | | | | | | ... to make build tools/valgrind warn if no curl_global_cleanup is called. This is conditionally only done for debug builds with the env variable CURL_GLOBAL_INIT set. Closes #6410
* lib/unit tests: add missing curl_global_cleanup() callsDaniel Stenberg2021-01-0616-50/+84
|
* test66: disable with HyperDaniel Stenberg2021-01-051-0/+3
| | | | ...as Hyper doesn't support HTTP/0.9
* test1633: set appropriate nameDaniel Stenberg2021-01-041-4/+4
| | | | "--retry with a 429 response and Retry-After:"
* httpauth: make multi-request auth work with custom portDaniel Stenberg2021-01-024-4/+143
| | | | | | | | | | | | When doing HTTP authentication and a port number set with CURLOPT_PORT, the code would previously have the URL's port number override as if it had been a redirect to an absolute URL. Added test 1568 to verify. Reported-by: UrsusArctos on github Fixes #6397 Closes #6400
* language: s/behaviour/behavior/gEmil Engler2021-01-024-6/+6
| | | | | | | | We currently use both spellings the british "behaviour" and the american "behavior". However "behavior" is more used in the project so I think it's worth dropping the british name. Closes #6395
* docs/examples: adjust prototypes for CURLOPT_READFUNCTIONOlaf Hering2020-12-3018-21/+21
| | | | | | | The type of the buffer in curl_read_callback is 'char *', not 'void *'. Signed-off-by: Olaf Hering <olaf@aepfle.de> Closes #6392
* tests/unit: fix empty statements with no effectDaniel Stenberg2020-12-291-37/+47
| | | | ... by making macros use "do {} while(0)"
* dns: extend CURLOPT_RESOLVE syntax for adding non-permanent entriesPaul Groke2020-12-291-14/+28
| | | | | | | | | | | | | | | | | | Extend the syntax of CURLOPT_RESOLVE strings: allow using a '+' prefix (similar to the existing '-' prefix for removing entries) to add DNS cache entries that will time out just like entries that are added by libcurl itself. Append " (non-permanent)" to info log message in case a non-permanent entry is added. Adjust relevant comments to reflect the new behavior. Adjust documentation. Extend unit1607 to test the new functionality. Closes #6294
* misc: assorted typo fixesXhmikosR2020-12-262-2/+2
| | | | Closes #6375
* tests/badsymbols.pl: ignore stand-alone single hash linesDaniel Stenberg2020-12-221-0/+3
| | | | | | | | Bug: https://curl.se/mail/lib-2020-12/0084.html Reported-by: Dennis Clarke Assisted-by: Jay Satiro Closes #6355
* examples/libtest: add .checksrc to distDaniel Stenberg2020-12-211-2/+2
| | | | | | | ... so that (auto)builds from tarballs also get the correct instructions. Fixes #6176 Closes #6353
* test: verify new --write-out variablesDaniel Stenberg2020-12-213-2/+51
| | | | Extended test 1029 and added 1188
* test970: adapted to the new internal order of variablesDaniel Stenberg2020-12-211-1/+1
|
* tests: add very simple AWS HTTP v4 Signature testMatthias Gatto2020-12-214-2/+136
| | | | Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
* curl: add --create-file-mode [mode]Daniel Stenberg2020-12-212-0/+2
| | | | | | | | This option sets the (octal) mode to use for the remote file when one is created, using the SFTP, SCP or FILE protocols. When not set, the default is 0644. Closes #6244
* badsymbols.pl: Add verbose mode -vJay Satiro2020-12-201-1/+20
| | | | | | | | | | | | | Use -v as the first option to enable verbose mode which will show source input, extracted symbol and line info. For example: Source: ./../include/curl/typecheck-gcc.h Symbol: curlcheck_socket_info(info) Line #423: #define curlcheck_socket_info(info) \ Ref: https://curl.se/mail/lib-2020-12/0084.html Closes https://github.com/curl/curl/pull/6349
* mqtt: handle POST/PUBLISH without a set POSTFIELDSIZEDaniel Stenberg2020-12-187-3/+182
| | | | | | | | | Detected by OSS-Fuzz Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28735 Added test 1916 and 1917 to verify. Closes #6338
* tests: updated tests for HyperDaniel Stenberg2020-12-1810-5/+73
|
* test1522: add debug tracingDaniel Stenberg2020-12-172-12/+22
| | | | | | | I used this to track down some issues and I figured I could just as well keep this extra logging in here for future needs. Closes #6331
* http: show the request as headers even when split-sendingDaniel Stenberg2020-12-171-2/+17
| | | | | | | | | | When the initial request isn't possible to send in its entirety, the remainder of request would be delivered to the debug callback as data and would wrongly be counted internally as body-bytes sent. Extended test 1295 to verify. Closes #6328
* test1198/9: add two mqtt publish tests without payload lengthsDaniel Stenberg2020-12-173-1/+110
| | | | Closes #6335
* tests/mqttd: extract the client id from the correct offsetbagder/mqttdDaniel Stenberg2020-12-171-1/+1
| | | | Closes #6334
* test1272: fix line endingDaniel Stenberg2020-12-151-1/+1
| | | | Follow-up to f24784f9143
* test1272: test gophersDaniel Stenberg2020-12-152-1/+41
|
* runtests: add support for gophers, gopher over TLSDaniel Stenberg2020-12-153-11/+53
|
* test1564/1565: require the 'wakeup' feature to runDaniel Stenberg2020-12-112-0/+6
| | | | | | Fixes #6299 Fixes #6300 Closes #6301
* runtests: add 'wakeup' as a featureDaniel Stenberg2020-12-112-0/+2
|
* tests/server/disabled: add "wakeup"Daniel Stenberg2020-12-111-0/+4
| | | | | To allow the test suite to know if wakeup support is disabled in the build.
* lib1564/5: verify that curl_multi_wakeup returns OKDaniel Stenberg2020-12-112-3/+3
|
* tests: make --libcurl tests only test FTP options if ftp enabledDaniel Stenberg2020-12-116-0/+10
| | | | | | | | Adjust six --libcurl tests to only check the FTP option if FTP is actually present in the build. Fixes #6303 Closes #6305
* runtests.pl: fix "uninitialized value" warningDaniel Stenberg2020-12-111-1/+1
| | | | follow-up to e12825c642a88774
* runtests: add support for %if [feature] conditionsDaniel Stenberg2020-12-112-9/+101
| | | | | | | | | ... to make tests run differently or expect different results depending on what features that are present or not in curl. Bonus: initial minor 'Hyper' awareness but nothing is using that yet Closes #6304
* cmake: don't use reserved target name 'test'Jakub Zakrzewski2020-12-071-1/+0
| | | | | | | CMake up to 3.10 always reserves this name Fixes #6257 Closes #6258
* ftp: CURLOPT_FTP_SKIP_PASV_IP by defaultDaniel Stenberg2020-12-0710-0/+9
| | | | | | | | | | | | The command line tool also independently sets --ftp-skip-pasv-ip by default. Ten test cases updated to adapt the modified --libcurl output. Bug: https://curl.se/docs/CVE-2020-8284.html CVE-2020-8284 Reported-by: Varnavas Papaioannou
* urlapi: don't accept blank port number field without schemeDaniel Stenberg2020-12-072-13/+29
| | | | | | | | | | ... as it makes the URL parser accept "very-long-hostname://" as a valid host name and we don't want that. The parser now only accepts a blank (no digits) after the colon if the URL starts with a scheme. Reported-by: d4d on hackerone Closes #6283
* tests/util.py: fix compatibility with Python 2Marc Hoersken2020-12-031-0/+15
| | | | | | | | | | Backporting the Python 3 implementation of setStream to ClosingFileHandler as a fallback within Python 2. Reported-by: Jay Satiro Fixes #6259 Closes #6270