summaryrefslogtreecommitdiff
path: root/tests/data
Commit message (Collapse)AuthorAgeFilesLines
* URL-APIURL-APIDaniel Stenberg2018-09-062-0/+30
| | | | | | | See header file and man pages for API. All documented API details work and are tested in the 1560 test case. Closes #2842
* imap: change from "FETCH" to "UID FETCH"Nicklas Avén2018-09-0636-37/+86
| | | | | | | | | | | | ... and add "MAILINDEX". As described in #2789, this is a suggested solution. Changing UID=xx to actually get mail with UID xx and add "MAILINDEX" to get a mail with a special index in the mail box (old behavior). So MAILINDEX=1 gives the first non deleted mail in the mail box. Fixes #2789 Closes #2815
* DOH: add test case 1650 and 2100Daniel Stenberg2018-09-063-0/+30
|
* ssl: deprecate CURLE_SSL_CACERT in favour of a unified error codeHan Han2018-09-065-6/+6
| | | | Long live CURLE_PEER_FAILED_VERIFICATION
* tests: add unit tests for url.cJim Fuller2018-09-052-1/+27
| | | | | Approved-by: Daniel Gustafsson Closes #2937
* test1452: mark as flakyDaniel Stenberg2018-09-051-0/+1
| | | | | | makes it not run in the CI builds Closes #2941
* pipelining: deprecatedDaniel Stenberg2018-09-051-0/+9
| | | | | | | | | | | | Transparently. The related curl_multi_setopt() options all still returns OK when pipelining is selected. To re-enable the support, the single line change in lib/multi.c needs to be reverted. See docs/DEPRECATE.md Closes #2705
* test1148: fix precheck outputMarcel Raad2018-09-021-1/+1
| | | | "precheck command error" is not very helpful.
* cookies: support creation-time attribute for cookiesDaniel Gustafsson2018-08-3110-64/+64
| | | | | | | | | | | | | | According to RFC6265 section 5.4, cookies with equal path lengths SHOULD be sorted by creation-time (earlier first). This adds a creation-time record to the cookie struct in order to make cookie sorting more deterministic. The creation-time is defined as the order of the cookies in the jar, the first cookie read fro the jar being the oldest. The creation-time is thus not serialized into the jar. Also remove the strcmp() matching in the sorting as there is no lexicographic ordering in RFC6265. Existing tests are updated to match. Closes #2524
* Don't use Windows path %PWD for SSH testsMarcel Raad2018-08-3147-47/+47
| | | | | | | | | | | | | All these tests failed on Windows because something like sftp://%HOSTIP:%SSHPORT%PWD/ expanded to sftp://127.0.0.1:1234c:/msys64/home/bla/curl and then curl complained about the port number ending with a letter. Use the original POSIX path instead of the Windows path created in checksystem to fix this. Closes https://github.com/curl/curl/pull/2920
* gopher: Do not translate `?' to `%09'Leonardo Taccari2018-08-241-1/+1
| | | | | | | | | | | | | Since GOPHER support was added in curl `?' character was automatically translated to `%09' (`\t'). However, this behaviour does not seems documented in RFC 4266 and for search selectors it is documented to directly use `%09' in the URL. Apart that several gopher servers in the current gopherspace have CGI support where `?' is used as part of the selector and translating it to `%09' often leads to surprising results. Closes #2910
* cookie tests: treat files as textMarcel Raad2018-08-233-3/+3
| | | | Fixes test failures because of wrong line endings on Windows.
* Tests: fixes for WindowsMarcel Raad2018-08-222-1/+4
| | | | | - test 1268 requires unix sockets - test 2072 must be disabled also for MSYS/MinGW
* test1148: disable if decimal separator is not pointMarcel Raad2018-08-211-0/+3
| | | | | | | | | Modifying the locale with environment variables doesn't work for native Windows applications. Just disable the test in this case if the decimal separator is something different than a point. Use a precheck with a small C program to achieve that. Closes https://github.com/curl/curl/pull/2786
* test1268: check the stderr output as "text"Daniel Stenberg2018-08-161-1/+1
| | | | | | Follow-up to 099f37e9c57 Pointed-out-by: Marcel Raad
* curl: warn the user if a given file name looks like an optionDaniel Stenberg2018-08-152-0/+39
| | | | | | | | | | ... simply because this is usually a sign of the user having omitted the file name and the next option is instead "eaten" by the parser as a file name. Add test1268 to verify Closes #2885
* ssh-libssh: fix infinite connect loop on invalid private keyKamil Dudka2018-08-142-1/+34
| | | | | | | | Added test 656 (based on test 604) to verify the fix. Bug: https://bugzilla.redhat.com/1595135 Closes #2879
* http: fix for tiny "HTTP/0.9" responseDaniel Stenberg2018-08-133-1/+93
| | | | | | | | | | | Deal with tiny "HTTP/0.9" (header-less) responses by checking the status-line early, even before a full "HTTP/" is received to allow detecting 0.9 properly. Test 1266 and 1267 added to verify. Fixes #2420 Closes #2872
* Split non-portable part off test 1133Marcel Raad2018-08-113-7/+105
| | | | | | | | | Split off testing file names with double quotes into new test 1158. Disable it for MSYS using a precheck as it doesn't support file names with double quotes (but Cygwin does, for example). Fixes https://github.com/curl/curl/issues/2796 Closes https://github.com/curl/curl/pull/2854
* CURLINFO_SIZE_UPLOAD: fix missing counter updateDaniel Stenberg2018-08-112-1/+54
| | | | | | | | Adds test 1522 for verification. Reported-by: cjmsoregan Fixes #2847 Closes #2864
* test1307: disabledDaniel Stenberg2018-08-021-0/+2
| | | | | | | | Turns out that since we're using the native fnmatch function now when available, and they simply disagree on a huge number of test patterns that make it hard to test this function like this... Fixes #2825
* test1157: follow-up to 35ecffb9Daniel Stenberg2018-07-291-0/+3
| | | | | Ignore the user-agent line. Pointed-out-by: Marcel Raad
* test1157: test -H from empty fileDaniel Stenberg2018-07-282-1/+56
| | | | Verifies bugfix #2797
* test320: treat curl320.out file as binaryMarcel Raad2018-07-221-1/+1
| | | | | | | Otherwise, LF line endings are converted to CRLF on Windows, but no conversion is done for the reply, so the test case fails. Closes https://github.com/curl/curl/pull/2776
* tests: fixes for Windows line endlingsMarcel Raad2018-07-212-2/+2
| | | | | | Set mode="text" when line endings depend on the system representation. Closes https://github.com/curl/curl/pull/2772
* test214: disable MSYS2's POSIX path conversion for URLMarcel Raad2018-07-211-0/+4
| | | | | | | By default, the MSYS2 bash converts all backslashes to forward slashes in URLs. Disable this with MSYS2_ARG_CONV_EXCL for the test to pass. Ref https://github.com/msys2/msys2/wiki/Porting#filesystem-namespaces
* test1143: disable MSYS2's POSIX path conversionMarcel Raad2018-07-201-0/+5
| | | | | | | | | By default, the MSYS2 bash interprets http:/%HOSTIP:%HTTPPORT/want/1143 as a POSIX file list and converts it to a Windows file list. Disable this with MSYS2_ARG_CONV_EXCL for the test to pass. Ref https://github.com/msys2/msys2/wiki/Porting#filesystem-namespaces Closes https://github.com/curl/curl/pull/2765
* test1422: add required file featureMarcel Raad2018-07-141-0/+1
| | | | | | | | | | | curl configured with --enable-debug --disable-file currently complains on test1422: Info: Protocol "file" not supported or disabled in libcurl Make test1422 dependend on enabled FILE protocol to fix this. Fixes https://github.com/curl/curl/issues/2741 Closes https://github.com/curl/curl/pull/2742
* conn: remove the boolean 'inuse' fieldDaniel Stenberg2018-07-111-6/+0
| | | | ... as the usage needs to be counted.
* multi: fix crash due to dangling entry in connect-pending listJavier Blazquez2018-06-232-1/+37
| | | | | Fixes #2677 Closes #2679
* multi: fix memory leak when stopped during name resolveDaniel Stenberg2018-06-164-3/+59
| | | | | | | | | | | | When the application just started the transfer and then stops it while the name resolve in the background thread hasn't completed, we need to wait for the resolve to complete and then cleanup data accordingly. Enabled test 1553 again and added test 1590 to also check when the host name resolves successfully. Detected by OSS-fuzz. Closes #1968
* runtests: support variables in <strippart>Daniel Stenberg2018-06-121-2/+5
| | | | | | | | ... and make use of that to make 1455 work better without using a fixed local port number. Fixes #2649 Closes #2650
* test 46: make test pass after 2025Bernhard M. Wiedemann2018-06-121-4/+4
| | | | | | | | | shifting the expiry date to 2037 for now to be before the possibly problematic year 2038 similar in spirit to commit e6293cf8764e9eecb Closes #2646
* spelling fixesViktor Szakats2018-06-031-1/+1
| | | | | | Detected using the `codespell` tool (version 1.13.0). Also secure and fix an URL.
* CURLOPT_RESOLVE: always purge old entry firstAlibek.Jorajev2018-06-012-1/+27
| | | | | | If there's an existing entry using the selected name. Closes #2622
* option: disallow username in URLBjörn Stenberg2018-05-312-1/+35
| | | | | | | Adds CURLOPT_DISALLOW_USERNAME_IN_URL and --disallow-username-in-url. Makes libcurl reject URLs with a username in them. Closes #2340
* httpauth: add support for Bearer tokensLinus Lewandowski2018-05-242-0/+58
| | | | Closes #2102
* http resume: skip body if http code 416 (range error) is ignored.Patrick Monnerat2018-05-223-1/+85
| | | | | | | | | | | | This avoids appending error data to already existing good data. Test 92 is updated to match this change. New test 1156 checks all combinations of --range/--resume, --fail, Content-Range header and http status code 200/416. Fixes #1163 Reported-By: Ithubg on github Closes #2578
* curl: show headers in boldDaniel Stenberg2018-05-2115-17/+6
| | | | | | | | | | | | | | | | | | The feature is only enabled if the output is believed to be a tty. -J: There's some minor differences and improvements in -J handling, as now J should work with -i and it actually creates a file first using the initial name and then *renames* that to the one found in Content-Disposition (if any). -i: only shows headers for HTTP transfers now (as documented). Previously it would also show for pieces of the transfer that were HTTP (for example when doing FTP over a HTTP proxy). -i: now shows trailers as well. Previously they were not shown at all. --libcurl: the CURLOPT_HEADER is no longer set, as the header output is now done in the header callback.
* cookies: do not take cookie name as a parameterPatrick Monnerat2018-05-132-1/+55
| | | | | | | | | | | | RFC 6265 section 4.2.1 does not set restrictions on cookie names. This is a follow-up to commit 7f7fcd0. Also explicitly check proper syntax of cookie name/value pair. New test 1155 checks that cookie names are not reserved words. Reported-By: anshnd at github Fixes #2564 Closes #2566
* tests: provide 'manual' as a feature to optionally requireDaniel Stenberg2018-04-291-0/+3
| | | | | | | | | ... and make test 1026 rely on that feature so that --disable-manual builds don't cause test failures. Reported-by: Max Dymond and Anders Roxell Fixes #2533 Closes #2540
* schannel: add support for CURLOPT_CAINFODan McNulty2018-04-183-1/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move verify_certificate functionality in schannel.c into a new file called schannel_verify.c. Additionally, some structure defintions from schannel.c have been moved to schannel.h to allow them to be used in schannel_verify.c. - Make verify_certificate functionality for Schannel available on all versions of Windows instead of just Windows CE. verify_certificate will be invoked on Windows CE or when the user specifies CURLOPT_CAINFO and CURLOPT_SSL_VERIFYPEER. - In verify_certificate, create a custom certificate chain engine that exclusively trusts the certificate store backed by the CURLOPT_CAINFO file. - doc updates of --cacert/CAINFO support for schannel - Use CERT_NAME_SEARCH_ALL_NAMES_FLAG when invoking CertGetNameString when available. This implements a TODO in schannel.c to improve handling of multiple SANs in a certificate. In particular, all SANs will now be searched instead of just the first name. - Update tool_operate.c to not search for the curl-ca-bundle.crt file when using Schannel to maintain backward compatibility. Previously, any curl-ca-bundle.crt file found in that search would have been ignored by Schannel. But, with CAINFO support, the file found by that search would have been used as the certificate store and could cause issues for any users that have curl-ca-bundle.crt in the search path. - Update url.c to not set the build time CURL_CA_BUNDLE if the selected SSL backend is Schannel. We allow setting CA location for schannel only when explicitly specified by the user via CURLOPT_CAINFO / --cacert. - Add new test cases 3000 and 3001. These test cases check that the first and last SAN, respectively, matches the connection hostname. New test certificates have been added for these cases. For 3000, the certificate prefix is Server-localhost-firstSAN and for 3001, the certificate prefix is Server-localhost-secondSAN. - Remove TODO 15.2 (Add support for custom server certificate validation), this commit addresses it. Closes https://github.com/curl/curl/pull/1325
* test1148: tolerate progress updates betterDaniel Stenberg2018-04-161-1/+6
| | | | | Fixes #2446 Closes #2488
* test1136: fix cookie order after commit c990eadd1277Daniel Stenberg2018-04-091-1/+1
|
* file: restore old behavior for file:////foo/bar URLsJon DeVree2018-04-061-7/+13
| | | | | | | | | | | | | | | | | | | | | curl 7.57.0 and up interpret this according to Appendix E.3.2 of RFC 8089 but then returns an error saying this is unimplemented. This is actually a regression in behavior on both Windows and Unix. Before curl 7.57.0 this URL was treated as a path of "//foo/bar" and then passed to the relevant OS API. This means that the behavior of this case is actually OS dependent. The Unix path resolution rules say that the OS must handle swallowing the extra "/" and so this path is the same as "/foo/bar" The Windows path resolution rules say that this is a UNC path and automatically handles the SMB access for the program. So curl on Windows was already doing Appendix E.3.2 without any special code in curl. Regression Closes #2438
* cookie: case-insensitive hashing for the domainsLauri Kasanen2018-04-061-1/+1
| | | | closes #2458
* cookie: fix and optimize 2nd top level domain name extractionPatrick Monnerat2018-04-041-14/+14
| | | | | | | | | | | This fixes a segfault occurring when a name of the (invalid) form "domain..tld" is processed. test46 updated to cover this case. Follow-up to commit c990ead. Ref: https://github.com/curl/curl/pull/2440
* cookie: store cookies per top-level-domain-specific hash tableLauri Kasanen2018-04-021-2/+2
| | | | | | This makes libcurl handle thousands of cookies much better and speedier. Closes #2440
* test1148: set a fixed locale for the testDaniel Stenberg2018-04-021-0/+4
| | | | | | | ...as otherwise it might use a different decimal sign. Bug: #2436 Reported-by: Oumph on github
* resolve: add CURLOPT_DNS_SHUFFLE_ADDRESSESRick Deist2018-03-172-0/+27
| | | | | | | | | | | This patch adds CURLOPT_DNS_SHUFFLE_ADDRESSES to explicitly request shuffling of IP addresses returned for a hostname when there is more than one. This is useful when the application knows that a round robin approach is appropriate and is willing to accept the consequences of potentially discarding some preference order returned by the system's implementation. Closes #1694