summaryrefslogtreecommitdiff
path: root/tests/data
Commit message (Collapse)AuthorAgeFilesLines
* test1160: edited to work with hyperDaniel Stenberg2021-10-272-2/+1
| | | | Closes #7912
* data/DISABLED: enable tests that now work with hyperDaniel Stenberg2021-10-271-5/+0
| | | | Closes #7911
* test559: add 'HTTP' in keywordsDaniel Stenberg2021-10-271-0/+1
| | | | | | Makes it run fine with hyper Closes #7911
* test552: updated to work with hyperDaniel Stenberg2021-10-271-2/+2
| | | | Closes #7911
* http: reject HTTP response codes < 100Daniel Stenberg2021-10-273-4/+10
| | | | | | | | | | ... which then also includes negative ones as test 1430 uses. This makes native + hyper backend act identically on this and therefore test 1430 can now be enabled when building with hyper. Adjust test 1431 as well. Closes #7909
* hyper: disable test 1294 since hyper doesn't allow such crazy headersDaniel Stenberg2021-10-252-1/+2
| | | | Closes #7905
* c-hyper: make CURLOPT_SUPPRESS_CONNECT_HEADERS workDaniel Stenberg2021-10-251-1/+0
| | | | | | Verified by the enabled test 1288 Closes #7905
* test1287: make work on hyperDaniel Stenberg2021-10-252-1/+2
| | | | Closes #7905
* test1266/1267: disabled on hyper: no HTTP/0.9 supportDaniel Stenberg2021-10-253-2/+8
| | | | Closes #7905
* tests: enable more tests with hyperDaniel Stenberg2021-10-254-33/+31
| | | | | | Adjusted 1144, 1164 and 1176. Closes #7900
* tests: use python3 in test 1451Samuel Henrique2021-10-241-1/+1
| | | | | | | | | | | This is a continuation of commit ec91b5a69000bea0794bbb3 in which changing this test was missed. There are no other python2 leftovers now. Based on a Debian patch originally written by Alessandro Ghedini <ghedo@debian.org> Closes #7899
* hyper: does not support disabling CURLOPT_HTTP_TRANSFER_DECODINGDaniel Stenberg2021-10-222-1/+3
| | | | | | | | Simply because hyper doesn't have this ability. Mentioned in docs now. Skip test 326 then Closes #7889
* test262: don't attempt with hyperDaniel Stenberg2021-10-222-1/+0
| | | | | | | This test verifies that curl works with binary zeroes in HTTP response headers and hyper refuses such. They're not kosher http. Closes #7889
* c-hyper: make test 217 runDaniel Stenberg2021-10-221-1/+0
| | | | Closes #7889
* DISABLED: enable test 209+213 for hyperDaniel Stenberg2021-10-221-2/+0
| | | | | | Follow-up to 823d3ab855c Closes #7889
* test207: accept a different error code for hyperDaniel Stenberg2021-10-222-1/+5
| | | | | | | It returns HYPERE_UNEXPECTED_EOF for this case which we convert to the somewhat generic CURLE_RECV_ERROR. Closes #7889
* http_proxy: multiple CONNECT with hyper done betterDaniel Stenberg2021-10-211-1/+0
| | | | | | Enabled test 206 Closes #7888
* test1185: verify checksrcDaniel Stenberg2021-10-182-1/+185
| | | | Closes #7866
* urlapi: skip a strlen(), pass in zeroDaniel Stenberg2021-10-151-1/+1
| | | | | | | | | ... to let curl_easy_escape() itself do the strlen. This avoids a (false positive) Coverity warning and it avoids us having to store the strlen() return value in an int variable. Reviewed-by: Daniel Gustafsson Closes #7862
* aws-sigv4: make signature work when post data is binaryAbhinav Singh2021-10-153-1/+73
| | | | | | | | | User sets the post fields size for binary data. Hence, we should not be using strlen on it. Added test 1937 and 1938 to verify. Closes #7844
* curl: correct grammar in generated libcurl codeБорис Верховский2021-10-1310-9/+9
| | | | Closes #7802
* tests: disable test 2043Daniel Stenberg2021-10-131-0/+1
| | | | | | | | It uses revoked.badssl.com which now is expired and therefor this now permafails. We should not use external sites for tests, this test should be converted to use our own infra. Closes #7845
* test368: verify dash is appended for "-r [num]"Daniel Stenberg2021-10-112-1/+50
| | | | Follow-up to 8758a26f8878
* http: fix Basic auth with empty name field in URLDaniel Stenberg2021-10-062-1/+49
| | | | | | | | Add test 367 to verify. Reported-by: Rick Lane Fixes #7819 Closes #7820
* CURLOPT_MAXLIFETIME_CONN: maximum allowed lifetime for conn reuseJeffrey Tolar2021-10-062-1/+68
| | | | | | | | | ... and close connections that are too old instead of reusing them. By default, this behavior is disabled. Bug: https://curl.se/mail/lib-2021-09/0058.html Closes #7751
* print_category: print help descriptions alignedDaniel Stenberg2021-10-013-18/+18
| | | | | | | | Adjust the description position to make an aligned column when doing help listings, which is more pleasing to the eye. Suggested-by: Gisle Vanem Closes #7792
* tool_listhelp: easier to generate with gen.plDaniel Stenberg2021-09-302-2/+2
| | | | | | | | | | | | | | | tool_listhelp.c is now a separate file with only the command line --help output, exactly as generated by gen.pl. This makes it easier to generate updates according to what's in the docs/cmdline-opts docs. cd $srcroot/docs/cmdline-opts ./gen.pl listhelp *.d > $srcroot/src/tool_listhelp.c With a configure build, this also works: make -C src listhelp Closes #7787
* CURLOPT_PREREQFUNCTION: add new callbackMax Dymond2021-09-277-1/+269
| | | | | | | | | | | | | | Triggered before a request is made but after a connection is set up Changes: - callback: Update docs and callback for pre-request callback - Add documentation for CURLOPT_PREREQDATA and CURLOPT_PREREQFUNCTION, - Add redirect test and callback failure test - Note that the function may be called multiple times on a redirection - Disable new 2086 test due to Windows weirdness Closes #7477
* urlapi: support UNC paths in file: URLs on WindowsSergey Markelov2021-09-271-0/+0
| | | | | | | | | | - file://host.name/path/file.txt is a valid UNC path \\host.name\path\files.txt to a non-local file transformed into URI (RFC 8089 Appendix E.3) - UNC paths on other OSs must be smb: URLs Closes #7366
* urlapi: add curl_url_strerror()i-ky2021-09-272-3/+22
| | | | | | | | | | Add curl_url_strerror() to convert CURLUcode into readable string and facilitate easier troubleshooting in programs using URL API. Extend CURLUcode with CURLU_LAST for iteration in unit tests. Update man pages with a mention of new function. Update example code and tests with new functionality where it fits. Closes #7605
* libssh2: add SHA256 fingerprint supportMats Lindestam2021-09-263-1/+89
| | | | | | | Added support for SHA256 fingerprint in command line curl and in libcurl. Closes #7646
* test897: verify delivery of IMAP post-body header contentDaniel Stenberg2021-09-212-1/+71
| | | | | | | | | | | | | The "content" is delivered as "body" by curl, but the envelope continues after the body and the rest of it should be delivered as header. The IMAP server can now get 'POSTFETCH' set to include more data to include after the body and test 897 is done to verify that such "extra" header data is in fact delivered by curl as header. Ref: #7284 but fails to reproduce the issue Closes #7748
* http: fix the broken >3 digit response code detectionDaniel Stenberg2021-09-172-1/+46
| | | | | | | | | | | | | When the "reason phrase" in the HTTP status line starts with a digit, that was treated as the forth response code digit and curl would claim the response to be non-compliant. Added test 1466 to verify this case. Regression brought by 5dc594e44f73b17 Reported-by: Glenn de boer Fixes #7738 Closes #7739
* hsts: CURLSTS_FAIL from hsts read callback should fail transferDaniel Stenberg2021-09-161-2/+5
| | | | | | | | | | ... and have CURLE_ABORTED_BY_CALLBACK returned. Extended test 1915 to verify. Reported-by: Jonathan Cardoso Fixes #7726 Closes #7729
* test1184: disableDaniel Stenberg2021-09-161-0/+2
| | | | | | | | | The test should be fine and it works for me repeated when run manually, but clearly it causes CI failures and it needs more research. Reported-by: RiderALT on github Fixes #7725 Closes #7732
* hsts: handle unlimited expiryDaniel Stenberg2021-09-152-4/+6
| | | | | | | | | | | | | | | | | | | When setting a blank expire string, meaning unlimited, curl would pass TIME_T_MAX to getime_r() when creating the output, while on 64 bit systems such a large value cannot be convetered to a tm struct making curl to exit the loop with an error instead. It can't be converted because the year it would represent doesn't fit in the 'int tm_year' field! Starting now, unlimited expiry is instead handled differently by using a human readable expiry date spelled out as "unlimited" instead of trying to use a distant actual date. Test 1660 and 1915 have been updated to help verify this change. Reported-by: Jonathan Cardoso Fixes #7720 Closes #7721
* ftp,imap,pop3,smtp: reject STARTTLS server response pipeliningPatrick Monnerat2021-09-135-1/+221
| | | | | | | | | | | | | If a server pipelines future responses within the STARTTLS response, the former are preserved in the pingpong cache across TLS negotiation and used as responses to the encrypted commands. This fix detects pipelined STARTTLS responses and rejects them with an error. CVE-2021-22947 Bug: https://curl.se/docs/CVE-2021-22947.html
* ftp,imap,pop3: do not ignore --ssl-reqdPatrick Monnerat2021-09-134-0/+165
| | | | | | | | | | | | In imap and pop3, check if TLS is required even when capabilities request has failed. In ftp, ignore preauthentication (230 status of server greeting) if TLS is required. Bug: https://curl.se/docs/CVE-2021-22946.html CVE-2021-22946
* http_proxy: fix the User-Agent inclusion in CONNECTDaniel Stenberg2021-09-132-1/+109
| | | | | | | | | | | | It should not refer to the uagent string that is allocated and created for the end server http request, as that pointer may be cleared on subsequent CONNECT requests. Added test case 1184 to verify. Reported-by: T200proX7 on github Fixes #7705 Closes #7707
* curl: stop retry if Retry-After: is longer than allowedDaniel Stenberg2021-09-062-1/+50
| | | | | | | | | | | If Retry-After: specifies a period that is longer than what fits within --retry-max-time, then stop retrying immediately. Added test 366 to verify. Reported-by: Kari Pahula Fixes #7675 Closes #7676
* test1173: check references to libcurl optionsDaniel Stenberg2021-09-041-2/+2
| | | | | | | ... that they refer to actual existing libcurl options. Reviewed-by: Daniel Gustafsson Closes #7656
* connect: get local port + ip also when reusing connectionsDaniel Stenberg2021-09-022-1/+72
| | | | | | | | | | | | Regression. In d6a37c23a3c (7.75.0) we removed the duplicated storage (connection + easy handle), so this info needs be extracted again even for re-used connections. Add test 435 to verify Reported-by: Max Dymond Fixes #7660 Closes #7662
* tests: adjust the tftpd output to work with hyper modeDaniel Stenberg2021-09-0119-123/+120
| | | | | | | | | | By making them look less like http headers, the hyper mode "tweak" doesn't interfere. Enable test 2002 and 2003 in hyper builds (and 1280 which is unrelated but should be enabled). Closes #7658
* test365: verify response with chunked AND Content-Length headersDaniel Stenberg2021-08-312-1/+66
|
* http: ignore content-length if any transfer-encoding is usedDaniel Stenberg2021-08-317-57/+49
| | | | | Fixes #7643 Closes #7649
* http: disallow >3-digit response codesDaniel Stenberg2021-08-263-27/+28
| | | | | | | | | | Make the built-in HTTP parser behave similar to hyper and reject any HTTP response using more than 3 digits for the response code. Updated test 1432 accordingly. Enabled test 1432 in the hyper builds. Closes #7641
* test1280: CRLFify the response to please hyperDaniel Stenberg2021-08-261-5/+5
| | | | Closes #7639
* tests: enable test 1129 for hyper buildsDaniel Stenberg2021-08-261-1/+0
| | | | Closes #7638
* c-hyper: handle HTTP/1.1 => HTTP/1.0 downgrade on reused connectionDaniel Stenberg2021-08-231-1/+0
| | | | | | Enable test 1074 Closes #7617
* c-hyper: deal with Expect: 100-continue combined with POSTFIELDSDaniel Stenberg2021-08-231-2/+0
| | | | | | Enable test 1130 and 1131 Closes #7616