summaryrefslogtreecommitdiff
path: root/tests/data
Commit message (Collapse)AuthorAgeFilesLines
* tests: move objnames-* from lib into testsDaniel Stenberg2019-01-152-2/+2
| | | | | | | Since they're used purely for testing purposes, I think they should rather be stored there. Closes #3470
* test1558: verify CURLINFO_PROTOCOL on file:// transferDaniel Stenberg2019-01-102-2/+51
| | | | | | Attempt to reproduce issue #3444. Closes #3447
* xattr: strip credentials from any URL that is storedDaniel Stenberg2019-01-102-1/+28
| | | | | | | | | Both user and password are cleared uncondtitionally. Added unit test 1621 to verify. Fixes #3423 Closes #3433
* cookies: allow secure override when done over HTTPSDaniel Stenberg2019-01-102-1/+73
| | | | | | | | Added test 1562 to verify. Reported-by: Jeroen Ooms Fixes #3445 Closes #3450
* test1561: improve test nameDaniel Stenberg2019-01-091-1/+1
| | | | [skip ci]
* cookies: skip custom cookies when redirecting cross-siteKatsuhiko YOSHIDA2019-01-092-1/+91
| | | | Closes #3417
* tests: allow tests to pass by 2037-02-12Bernhard M. Wiedemann2019-01-088-23/+23
| | | | | | similar to commit f508d29f3902104018 Closes #3443
* curl_multi_remove_handle() don't block terminating c-ares requestsBrad Spencer2019-01-072-3/+40
| | | | | | | | | Added Curl_resolver_kill() for all three resolver modes, which only blocks when necessary, along with test 1592 to confirm curl_multi_remove_handle() doesn't block unless it must. Closes #3428 Fixes #3371
* ntlm: update selection of type 3 responseMarkus Moeller2019-01-0137-145/+145
| | | | | | | | | | | NTLM2 did not work i.e. no NTLMv2 response was created. Changing the check seems to work. Ref: https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-NLMP/[MS-NLMP].pdf Fixes https://github.com/curl/curl/issues/3286 Closes https://github.com/curl/curl/pull/3287 Closes https://github.com/curl/curl/pull/3415
* hostip: support wildcard hostsClaes Jakobsson2018-12-272-1/+57
| | | | | | | | | | | | | | | | | This adds support for wildcard hosts in CURLOPT_RESOLVE. These are try-last so any non-wildcard entry is resolved first. If specified, any host not matched by another CURLOPT_RESOLVE config will use this as fallback. Example send a.com to 10.0.0.1 and everything else to 10.0.0.2: curl --resolve *:443:10.0.0.2 --resolve a.com:443:10.0.0.1 \ https://a.com https://b.com This is probably quite similar to using: --connect-to a.com:443:10.0.0.1:443 --connect-to :443:10.0.0.2:443 Closes #3406 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* http: added options for allowing HTTP/0.9 responsesDaniel Stenberg2018-12-2118-8/+71
| | | | | | | | | | | | Added CURLOPT_HTTP09_ALLOWED and --http0.9 for this purpose. For now, both the tool and library allow HTTP/0.9 by default. docs/DEPRECATE.md lays out the plan for when to reverse that default: 6 months after the 7.64.0 release. The options are added already now so that applications/scripts can start using them already now. Fixes #2873 Closes #3383
* cookies: extend domain checks to non psl buildsDaniel Gustafsson2018-12-191-0/+1
| | | | | | | | | Ensure to perform the checks we have to enforce a sane domain in the cookie request. The check for non-PSL enabled builds is quite basic but it's better than nothing. Closes #2964 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* http: Implement trailing headers for chunked transfersAyoub Boudhar2018-12-142-0/+64
| | | | | | | | | | | | | This adds the CURLOPT_TRAILERDATA and CURLOPT_TRAILERFUNCTION options that allow a callback based approach to sending trailing headers with chunked transfers. The test server (sws) was updated to take into account the detection of the end of transfer in the case of trailing headers presence. Test 1591 checks that trailing headers can be sent using libcurl. Closes #3350
* test1201: Add a trailing `?' to the selectorLeonardo Taccari2018-12-131-2/+2
| | | | | | This verify that the `?' in the selector is kept as is. Verifies the fix in #3370
* cookies: leave secure cookies aloneDaniel Gustafsson2018-12-135-22/+89
| | | | | | | | | | | Only allow secure origins to be able to write cookies with the 'secure' flag set. This reduces the risk of non-secure origins to influence the state of secure origins. This implements IETF Internet-Draft draft-ietf-httpbis-cookie-alone-01 which updates RFC6265. Closes #2956 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* test1519: use lib1518 and test CURLINFO_REDIRECT_URL moreDaniel Stenberg2018-12-122-3/+63
|
* Curl_follow: extract the Location: header field unvalidatedDaniel Stenberg2018-12-122-1/+63
| | | | | | | | | | | ... when not actually following the redirect. Otherwise we return error for this and an application can't extract the value. Test 1518 added to verify. Reported-by: Pavel Pavlov Fixes #3340 Closes #3364
* tests: add urlapi unittestDaniel Gustafsson2018-12-112-1/+24
| | | | | | | | | | This adds a new unittest intended to cover the internal functions in the urlapi code, starting with parse_port(). In order to avoid name collisions in debug builds, parse_port() is renamed Curl_parse_port() since it will be exported. Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
* http: fix HTTP auth to include query in URIJay Satiro2018-12-112-1/+76
| | | | | | | | | | - Include query in the path passed to generate HTTP auth. Recent changes to use the URL API internally (46e1640, 7.62.0) inadvertently broke authentication URIs by omitting the query. Fixes https://github.com/curl/curl/issues/3353 Closes #3356
* test329: verify cookie max-age=0 immediate expiryDaniel Stenberg2018-12-092-1/+71
|
* test328: verify Content-Encoding: noneDaniel Stenberg2018-11-282-1/+56
| | | | | | Because of issue #3315 Closes #3317
* cookies: create the cookiejar even if no cookies to saveDaniel Stenberg2018-11-233-2/+79
| | | | | | | | | | | Important for when the file is going to be read again and thus must not contain old contents! Adds test 327 to verify. Reported-by: daboul on github Fixes #3299 Closes #3300
* test: update test20/1322 for eglibc bug workaroundTobias Hintze2018-11-222-2/+2
| | | | | | | | | | | | The tests 20 and 1322 are using getaddrinfo of libc for resolving. In eglibc-2.19 there is a memory leakage and invalid free bug which surfaces in some special circumstances (PF_UNSPEC hint with invalid or non-existent names). The valgrind runs in testing fail in these situations. As the tests 20/1322 are not specific on either protocol (IPv4/IPv6) this commit changes the hints to IPv4 protocol by passing `--ipv4` flag on the tests' command line. This prevents the valgrind failures.
* setopt: add CURLOPT_CURLUJim Fuller2018-11-092-1/+51
| | | | | | Allows an application to pass in a pre-parsed URL via a URL handle. Closes #3227
* curl: add %{stderr} and %{stdout} for --write-outFrank Gevaerts2018-11-072-1/+63
| | | | Closes #3115
* url: a short host name + port is not a schemeDaniel Stenberg2018-11-063-43/+6
| | | | | | | | | | | | | | | | | | | The function identifying a leading "scheme" part of the URL considered a few letters ending with a colon to be a scheme, making something like "short:80" to become an unknown scheme instead of a short host name and a port number. Extended test 1560 to verify. Also fixed test203 to use file_pwd to make it get the correct path on windows. Removed test 2070 since it was a duplicate of 203. Assisted-by: Marcel Raad Reported-by: Hagai Auro Fixes #3220 Fixes #3233 Closes #3223 Closes #3235
* infof: clearly indicate truncationDaniel Gustafsson2018-11-032-1/+24
| | | | | | | | | | | | | | | | | | The internal buffer in infof() is limited to 2048 bytes of payload plus an additional byte for NULL termination. Servers with very long error messages can however cause truncation of the string, which currently isn't very clear, and leads to badly formatted output. This appends a "...\n" (or just "..." in case the format didn't with a newline char) marker to the end of the string to clearly show that it has been truncated. Also include a unittest covering infof() to try and catch any bugs introduced in this quite important function. Closes #3216 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
* Curl_follow: accept non-supported schemes for "fake" redirectsDaniel Stenberg2018-11-022-1/+59
| | | | | | | | | | When not actually following the redirect and the target URL is only stored for later retrieval, curl always accepted "non-supported" schemes. This was a regression from 46e164069d1a5230. Reported-by: Brad King Fixes #3210 Closes #3215
* test2080: verify the fix for CVE-2018-16842Daniel Stenberg2018-10-302-4/+2
|
* test1651: unit test Curl_extract_certinfo()Daniel Stenberg2018-10-272-1/+27
| | | | The version used for Gskit, NSS, GnuTLS, WolfSSL and schannel.
* FILE: fix CURLOPT_NOBODY and CURLOPT_HEADER outputDaniel Stenberg2018-10-0829-69/+65
| | | | | | | | | | | | | | | Now FILE transfers send headers to the header callback like HTTP and other protocols. Also made curl_easy_getinfo(...CURLINFO_PROTOCOL...) work for FILE in the callbacks. Makes "curl -i file://.." and "curl -I file://.." work like before again. Applied the bold header logic to them too. Regression from c1c2762 (7.61.0) Reported-by: Shaun Jackman Fixes #3083 Closes #3101
* test2100: test DoH using IPv4-onlyDaniel Stenberg2018-10-061-0/+0
| | | | | | | | | To make it only send one DoH request and avoid the race condition that could lead to the requests getting sent in reversed order and thus making it hard to compare in the test case. Fixes #3107 Closes #3108
* test320: strip out more HTML when comparingDaniel Stenberg2018-10-041-20/+4
| | | | | | | | To make the test case work with different gnutls-serv versions better. Reported-by: Kamil Dudka Fixes #3093 Closes #3094
* test1299: use single quotes around asteriskMarcel Raad2018-10-021-1/+1
| | | | Ref: https://github.com/curl/curl/issues/1751#issuecomment-321522580
* test1650: make it depend on http/2Daniel Stenberg2018-10-011-0/+1
| | | | | | | Follow-up to 570008c99da0ccbb as it gets link errors. Reported-by: Michael Kaufmann Closes #3068
* test2100: require http2 to runDaniel Stenberg2018-09-291-0/+0
| | | | | | Reported-by: Marcel Raad Fixes #3064 Closes #3065
* test320: fix regression in [ci skip]Viktor Szakats2018-09-241-2/+2
| | | | | | | | The value in question is coming directly from `gnutls-serv`, so it cannot be modified freely. Reported-by: Marcel Raad Ref: https://github.com/curl/curl/commit/6ae6b2a533e8630afbb21f570305bd4ceece6348#commitcomment-30621004
* update URLs in testsViktor Szakats2018-09-233-4/+4
| | | | | | - and one in docs/MANUAL as well Closes https://github.com/curl/curl/pull/3038
* whitespace fixesViktor Szakats2018-09-239-9/+0
| | | | | | | | | | | - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
* url: use the URL API internally as wellDaniel Stenberg2018-09-223-5/+5
| | | | | | ... to make it a truly unified URL parser. Closes #3017
* certs: generate tests certs with sha256 digest algorithmDaniel Stenberg2018-09-201-1/+1
| | | | | | | | As OpenSSL 1.1.1 starts to complain and fail on sha1 CAs: "SSL certificate problem: CA signature digest algorithm too weak" Closes #3014
* urlapi: add CURLU_GUESS_SCHEME and fix hostname acceptanceDaniel Stenberg2018-09-191-0/+6
| | | | | | | | | | | | | | | In order for this API to fully work for libcurl itself, it now offers a CURLU_GUESS_SCHEME flag that makes it "guess" scheme based on the host name prefix just like libcurl always did. If there's no known prefix, it will guess "http://". Separately, it relaxes the check of the host name so that IDN host names can be passed in as well. Both these changes are necessary for libcurl itself to use this API. Assisted-by: Daniel Gustafsson Closes #3018
* urlglob: improve error messageDaniel Stenberg2018-09-131-1/+3
| | | | | | | | | to help user understand what the problem is Reported-by: Daniel Shahaf Fixes #2763 Closes #2977
* tests/certs: rebuild certs with 2048-bit RSA keysYiming Jing2018-09-121-1/+1
| | | | | | | | | | | The previous test certificates contained RSA keys of only 1024 bits. However, RSA claims that 1024-bit RSA keys are likely to become crackable some time before 2010. The NIST recommends at least 2048-bit keys for RSA for now. Better use full 2048 also for testing. Closes #2973
* misc: fix typos in commentsDaniel Gustafsson2018-09-101-1/+1
| | | | Closes #2963
* test324: fix after 3f3b26d6feb0667714902e836af608094235fca2Marcel Raad2018-09-081-1/+1
| | | | The expected error code is now 60. 51 is dead.
* URL-APIDaniel Stenberg2018-09-082-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
* curl_easy_upkeep: removed 'conn' from the nameDaniel Stenberg2018-09-071-1/+1
| | | | | | | ... including the associated option. Fixes #2951 Closes #2952
* upkeep: add a connection upkeep API: curl_easy_conn_upkeep()Max Dymond2018-09-071-1/+2
| | | | | | | | | Add functionality so that protocols can do custom keepalive on their connections, when an external API function is called. Add docs for the new options in 7.62.0 Closes #1641
* 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