summaryrefslogtreecommitdiff
path: root/tests/data
Commit message (Collapse)AuthorAgeFilesLines
* 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-171-0/+1
| | | | | | | | | | | | | | | | | | | | | ... 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-152-1/+36
| | | | | | | | | | | | ... 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-152-1/+82
| | | | | | | | | | | | ... 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
* 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
* lib/unit tests: add missing curl_global_cleanup() callsDaniel Stenberg2021-01-061-0/+2
|
* 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-022-2/+89
| | | | | | | | | | | | 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
* misc: assorted typo fixesXhmikosR2020-12-261-1/+1
| | | | Closes #6375
* 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-212-1/+70
| | | | 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
* mqtt: handle POST/PUBLISH without a set POSTFIELDSIZEDaniel Stenberg2020-12-185-2/+121
| | | | | | | | | 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
|
* 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
* test1272: fix line endingDaniel Stenberg2020-12-151-1/+1
| | | | Follow-up to f24784f9143
* test1272: test gophersDaniel Stenberg2020-12-152-1/+41
|
* test1564/1565: require the 'wakeup' feature to runDaniel Stenberg2020-12-112-0/+6
| | | | | | Fixes #6299 Fixes #6300 Closes #6301
* 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
* 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-071-1/+1
| | | | | | | | | | ... 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
* test506: make it not run in c-ares buildsDaniel Stenberg2020-11-261-2/+3
| | | | | | | | As the asynch nature of it may trigger events in another order. A c-ares upgrade made it break. Reported-by: Marc Hörsken Fixes #6247
* test493: verify --hsts upgrade and that %{url_effective} reflects thatDaniel Stenberg2020-11-062-1/+62
| | | | Closes #6175
* curl.se: new homeDaniel Stenberg2020-11-0437-38/+38
| | | | Closes #6172
* hsts: add read/write callbacksDaniel Stenberg2020-11-032-1/+51
| | | | | | | | - read/write callback options - man pages for the 4 new setopts - test 1915 verifies the callbacks Closes #5896
* hsts: add support for Strict-Transport-SecurityDaniel Stenberg2020-11-032-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | - enable in the build (configure) - header parsing - host name lookup - unit tests for the above - CI build - CURL_VERSION_HSTS bit - curl_version_info support - curl -V output - curl-config --features - CURLOPT_HSTS_CTRL - man page for CURLOPT_HSTS_CTRL - curl --hsts (sets CURLOPT_HSTS_CTRL and works with --libcurl) - man page for --hsts - save cache to disk - load cache from disk - CURLOPT_HSTS - man page for CURLOPT_HSTS - added docs/HSTS.md - fixed --version docs - adjusted curl_easy_duphandle Closes #5896
* tests: fix some http/2 tests for older versions of nghttpxJay Satiro2020-10-295-11/+5
| | | | | | | | | | | | | - Add regex that strips http/2 server header name to those http/2 tests that don't already have it. - Improve that regex in all http/2 tests. Tests 358 and 359 were failing for me before this change on a system that uses an older version of nghttpx which includes its version number in the server header. Closes https://github.com/curl/curl/pull/6139
* tool_help: make "output" description less confusingEmil Engler2020-10-241-1/+1
| | | | | | | Currently the description of "output" is misleading when comparing it "verbose". Closes #6118
* test122[12]: remove these two testsDaniel Stenberg2020-10-153-107/+1
| | | | | | | | | ... and remove the objnames scripts they tested. They're not used for anything anymore so testing them serves no purpose! Reported-by: Marc Hörsken Fixes #6080 Closes #6081
* runtests: add %repeat[]% for test filesDaniel Stenberg2020-10-048-18/+18
| | | | | | | ... and use this new keywords in all the test files larger than 50K to reduce their sizes and make them a lot easier to read and understand. Closes #6040
* runtests: provide curl's version string as %VERSION for testsDaniel Stenberg2020-10-02619-2002/+847
| | | | | | | | ... so that we can check HTTP requests for User-Agent: curl/%VERSION Update 600+ test cases accordingly. Closes #6037
* test1465: verify --libcurl with binary POST dataDaniel Stenberg2020-10-022-1/+1
|
* ftp: make a 552 response return CURLE_REMOTE_DISK_FULLDaniel Stenberg2020-09-262-1/+62
| | | | | | | | | Added test 348 to verify. Added a 'STOR' command to the test FTP server to enable test 348. Documented the command in FILEFORMAT.md Reported-by: Duncan Wilcox Fixes #6016 Closes #6017
* test163[12]: require http to be built-in to runDaniel Stenberg2020-09-252-0/+2
| | | | | | ... as speaking over an HTTPS proxy implies http! Closes #6014
* ftp: separate FTPS from FTP over "HTTPS proxy"Daniel Stenberg2020-09-242-4/+0
| | | | | | | | | | When using HTTPS proxy, SSL is used but not in the view of the FTP protocol handler itself so separate the connection's use of SSL from the FTP control connection's sue. Reported-by: Mingtao Yang Fixes #5523 Closes #6006
* tests/data: Fix some mismatched XML tags in test casesDan Fandrich2020-09-234-6/+1
| | | | This allows these test files to pass xmllint.
* test1297: verify GOT_NOTHING with http proxy tunnelDaniel Stenberg2020-09-222-35/+97
|
* test3015: verify stdout "as text"Daniel Stenberg2020-09-151-1/+1
| | | | | | Follow-up from 0c1e767e83e to please win32 tests Closes #5962
* tool_writeout: add new writeout variable, %{num_headers}anio2020-09-155-3/+140
| | | | | | This variable gives the number of headers. Closes #5947
* ftp: a 550 response to SIZE returns CURLE_REMOTE_FILE_NOT_FOUNDDaniel Stenberg2020-09-1413-6/+97
| | | | | | | | | | | | | | | | | | | | This is primarily interesting for cases where CURLOPT_NOBODY is set as previously curl would not return an error for this case. MDTM getting 550 now also returns this error (it returned CURLE_FTP_COULDNT_RETR_FILE before) in order to unify return codes for missing files across protocols and specific FTP commands. libcurl already returns error on a 550 as a MDTM response (when CURLOPT_FILETIME is set). If CURLOPT_NOBODY is not set, an error would happen subsequently anyway since the RETR command would fail. Add test 1913 and 1914 to verify. Updated several tests accordingly due to the updated SIZE behavior. Reported-by: Tomas Berger Fixes #5953 Closes #5957
* test434: test -K use in a single line without newlineDaniel Stenberg2020-09-142-1/+49
| | | | Closes #5946
* curl: use curlx_dynbuf for realloc when loading config filesDaniel Stenberg2020-09-141-2/+2
| | | | | | | | | ... fixes an integer overflow at the same time. Reported-by: ihsinme on github Assisted-by: Jay Satiro Closes #5946
* tests: add test1912 to the distDaniel Stenberg2020-09-121-1/+1
| | | | Follow-up to 70984ce1be4cab6c
* altsvc: clone setting in curl_easy_duphandlebagder/altsvc-duphandleDaniel Stenberg2020-09-061-1/+14
| | | | | | | | | | | | The cache content is not duplicated, like other caches, but the setting and specified file name are. Test 1908 is extended to verify this somewhat. Since the duplicated handle gets the same file name, the test unfortunately overwrites the same file twice (with different contents) which makes it hard to check automatically. Closes #5923
* test1541: remove since it is a known bugDaniel Stenberg2020-09-062-35/+1
| | | | | | | | | | | A shared connection cache is not thread-safe is a known issue. Stop testing this until we believe this issue is addressed. Reduces occasional test failures we don't care about. The test code in lib1541.c is left in git to allow us to restore it when we get to fix this. Closes #5922
* tests: remove pipelining testsDaniel Stenberg2020-09-069-582/+17
| | | | | | | | | | Remove the tests 530, 584, 1900, 1901, 1902, 1903 and 2033. They were previously disabled. The Pipelining code was removed from curl in commit 2f44e94efb3df8e, April 2019. Closes #5921