summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test1902: attempt to make the test more reliableDaniel Stenberg2015-07-261-5/+5
| | | | Closes #355
* SSL: Add an option to disable certificate revocation checksJay Satiro2015-07-172-1/+34
| | | | | | | | | | | | | | New tool option --ssl-no-revoke. New value CURLSSLOPT_NO_REVOKE for CURLOPT_SSL_OPTIONS. Currently this option applies only to WinSSL where we have automatic certificate revocation checking by default. According to the ssl-compared chart there are other backends that have automatic checking (NSS, wolfSSL and DarwinSSL) so we could possibly accommodate them at some later point. Bug: https://github.com/bagder/curl/issues/264 Reported-by: zenden2k <zenden2k@gmail.com>
* runtests: Allow for spaces in curl custom pathJay Satiro2015-07-162-9/+10
| | | | .. also fix some typos in test's FILEFORMAT spec.
* libtest: call PR_Cleanup() on exit if NSPR is usedKamil Dudka2015-07-142-3/+16
| | | | | | | | This prevents valgrind from reporting possibly lost memory that NSPR uses for file descriptor cache and other globally allocated internal data structures. Reported-by: Štefan Kremeň
* test2041: fixed line endings in protocol partDan Fandrich2015-07-021-4/+4
|
* SSL: Pinned public key hash supportmoparisthebest2015-07-013-1/+103
|
* multi: Move http2 push function declarations to header endJay Satiro2015-06-301-0/+2
| | | | | | This change necessary for binary compatibility. Prior to this change test 1135 failed due to the order of functions.
* tests: Distribute CMakeLists.txt files in subdirectoriesRoger Leigh2015-06-253-3/+3
|
* test1531: verify POSTFIELDSIZE set after add_handleDaniel Stenberg2015-06-234-2/+150
| | | | Following the fix made in 903b6e05565bf.
* test2040: verify basic auth on re-used connectionsKamil Dudka2015-06-172-1/+71
|
* test1530: added http to required featuresDan Fandrich2015-06-141-0/+3
|
* CURLOPT_OPENSOCKETFUNCTION: return error at onceDaniel Stenberg2015-06-094-2/+100
| | | | | | | | When CURL_SOCKET_BAD is returned in the callback, it should be treated as an error (CURLE_COULDNT_CONNECT) if no other socket is subsequently created when trying to connect to a server. Bug: http://curl.haxx.se/mail/lib-2015-06/0047.html
* HTTP-NTLM: fail auth on connection close instead of loopingIsaac Boukris2015-05-311-24/+4
| | | | Bug: https://github.com/bagder/curl/issues/256
* testcurl.pl: use rel2abs to make the source directory absoluteDan Fandrich2015-05-241-3/+3
| | | | | | This function makes a platform-specific absolute path which uses backslashes on Windows. This form works when passing it on the command-line, as well as if the source is on another drive.
* test1510: another flaky testDan Fandrich2015-05-231-0/+1
|
* testcurl.pl: allow source to be in an arbitrary directoryDan Fandrich2015-05-211-11/+16
| | | | | This way, the build directory can be located on an entirely different filesystem from the source code (e.g. a tmpfs).
* hostip: fix unintended destruction of hash tableAnthony Avina2015-05-185-3/+112
| | | | .. and added unit1602 for hash.c
* runtests.pl: use 'h2c' now, no -14 anymoreDaniel Stenberg2015-05-181-1/+1
|
* hostcache: made all host caches use structs, not pointersDaniel Stenberg2015-05-121-6/+7
| | | | | | This avoids unnecessary dynamic allocs and as this also removed the last users of *hash_alloc() and *hash_destroy(), those two functions are now removed.
* CURLOPT_HEADEROPT: default to separateDaniel Stenberg2015-04-283-2/+3
| | | | | | | | Make the HTTP headers separated by default for improved security and reduced risk for information leakage. Bug: http://curl.haxx.se/docs/adv_20150429.html Reported-by: Yehezkel Horowitz, Oren Souroujon
* sws: init http2 state properlyDaniel Stenberg2015-04-271-0/+2
| | | | It would otherwise cause problems when running tests after 1801 etc.
* runtests: use a DISABLED.local file tooDaniel Stenberg2015-04-263-10/+23
| | | | | ... and have git ignore that. Allows for a dev to add tests to ignore in local tests and yet don't obstruct a normal git work flow.
* test2039: fixed line endings that caused a test failureDan Fandrich2015-04-251-7/+7
|
* netrc: add unit tests for 'default' supportViktor Szakats2015-04-243-1/+65
|
* curl -z: do not write empty file on unmet conditionKamil Dudka2015-04-232-1/+77
| | | | | | | | This commit fixes a regression introduced in curl-7_41_0-186-g261a0fe. It also introduces a regression test 1424 based on tests 78 and 1423. Reported-by: Viktor Szakats Bug: https://github.com/bagder/curl/issues/237
* cyassl: Implement public key pinningJay Satiro2015-04-221-0/+1
| | | | Also add public key extraction example to CURLOPT_PINNEDPUBLICKEY doc.
* tests/unit/.gitignore: hide unit1601 and above, tooKamil Dudka2015-04-221-2/+1
|
* nss: implement public key pinning for NSS backendKamil Dudka2015-04-221-0/+1
| | | | Bug: https://bugzilla.redhat.com/1195771
* test1423: added missing "file" to server sectionDan Fandrich2015-04-181-0/+1
|
* test142[23]: verify that an empty file is stored on successKamil Dudka2015-04-083-1/+120
|
* fix refreshing of obsolete dns cache entriesStefan Bühler2015-04-031-0/+1
| | | | | | | | | | | | - cache entries must be also refreshed when they are in use - have the cache count as inuse reference too, freeing timestamp == 0 special value - use timestamp == 0 for CURLOPT_RESOLVE entries which don't get refreshed - remove CURLOPT_RESOLVE special inuse reference (timestamp == 0 will prevent refresh) - fix Curl_hostcache_clean - CURLOPT_RESOLVE entries don't have a special reference anymore, and it would also release non CURLOPT_RESOLVE references - fix locking in Curl_hostcache_clean - fix unit1305.c: hash now keeps a reference, need to set inuse = 1
* http2: Fix missing nghttp2_session_send call in Curl_http2_switchedTatsuhiro Tsujikawa2015-04-021-3/+2
| | | | | | | | | | | | | Previously in Curl_http2_switched, we called nghttp2_session_mem_recv to parse incoming data which were already received while curl was handling upgrade. But we didn't call nghttp2_session_send, and it led to make curl not send any response to the received frames. Most likely, we received SETTINGS from server at this point, so we missed opportunity to send SETTINGS + ACK. This commit adds missing nghttp2_session_send call in Curl_http2_switched to fix this issue. Bug: https://github.com/bagder/curl/issues/192 Reported-by: Stefan Eissing
* cookie: handle spaces after the name in Set-CookieDaniel Stenberg2015-04-011-0/+8
| | | | | | | | | | "name =value" is fine and the space should just be skipped. Updated test 31 to also test for this. Bug: https://github.com/bagder/curl/issues/195 Reported-by: cromestant Help-by: Frank Gevaerts
* runtests.pl: detect WolfSSL as yasslDan Fandrich2015-03-281-2/+2
|
* testcurl.pl: add the --notes option to supply more info about a buildDan Fandrich2015-03-241-1/+5
| | | | | Support for notes has been in place for a while, but it required being added to the setup file manually.
* CURLOPT_PATH_AS_IS: addedDaniel Stenberg2015-03-242-1/+65
| | | | | | | | --path-as-is is the command line option Added docs in curl.1 and CURLOPT_PATH_AS_IS.3 Added test in test 1241
* test1513: eliminated race condition in test runDan Fandrich2015-03-221-5/+9
| | | | | | | | | It seems that some systems (e.g. fairly consistently in some recent Solaris autobuilds) would manage to get to the connect phase before the progress callback was called, resulting in a CURLE_COULDNT_CONNECT error. Reworked the test to point at a test server that never returns a full result so the progress callback always gets a chance to be called before the transfer can complete in some other way.
* tests/certs: rebuild certificates with modified key usage bitsDan Fandrich2015-03-2139-655/+640
| | | | | | | | The certificates were missing the digitalSignature and keyAgreement usage types, of which at least digitalSignature was checked by CyaSSL. This caused the test server in test 310 (among others) to fail the startup verification and therefore run (see http://curl.haxx.se/mail/lib-2014-07/0303.html).
* tests/certs: added make target to rebuild certificatesDan Fandrich2015-03-213-13/+34
| | | | | The certificate generation scripts were also updated to better match the format of the certificates currently checked in.
* testcurl: Allow '=' in values given on command lineDagobert Michelsen2015-03-211-7/+7
|
* test938: added missing closing tagsDan Fandrich2015-03-211-0/+2
|
* free: instead of Curl_safefree()Daniel Stenberg2015-03-161-1/+1
| | | | | | | | | | | | Since we just started make use of free(NULL) in order to simplify code, this change takes it a step further and: - converts lots of Curl_safefree() calls to good old free() - makes Curl_safefree() not check the pointer before free() The (new) rule of thumb is: if you really want a function call that frees a pointer and then assigns it to NULL, then use Curl_safefree(). But we will prefer just using free() from now on.
* Bug #149: Deletion of unnecessary checks before calls of the function "free"Markus Elfring2015-03-1612-92/+42
| | | | | | | | | | | The function "free" is documented in the way that no action shall occur for a passed null pointer. It is therefore not needed that a function caller repeats a corresponding check. http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first This issue was fixed by using the software Coccinelle 1.0.0-rc24. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
* http2: detect prematures close without data transferedDaniel Stenberg2015-03-141-0/+4
| | | | | | | | | ... by using the regular Curl_http_done() method which checks for that. This makes test 1801 fail consistently with error 56 (which seems fine) to that test is also updated here. Reported-by: Ben Darnell Bug: https://github.com/bagder/curl/issues/166
* test320: Expect the Host header to be the first headerDan Fandrich2015-03-131-6/+5
| | | | Required for the test to work after a5d994941c2b.
* test203[0-3]: Expect the Host header to be the first headerFabian Keil2015-03-124-26/+26
| | | | Required for the tests to work after a5d994941c2b.
* http: always send Host: header as first headerDaniel Stenberg2015-03-12120-226/+224
| | | | | | | | | | | | | | | ...after the method line: "Since the Host field-value is critical information for handling a request, a user agent SHOULD generate Host as the first header field following the request-line." / RFC 7230 section 5.4 Additionally, this will also make libcurl ignore multiple specified custom Host: headers and only use the first one. Test 1121 has been updated accordingly Bug: http://curl.haxx.se/bug/view.cgi?id=1491 Reported-by: Rainer Canavan
* proxy: re-use proxy connections (regression)Daniel Stenberg2015-03-112-1/+73
| | | | | | | | | | When checking for a connection to re-use, a proxy-using request must check for and use a proxy connection and not one based on the host name! Added test 1421 to verify Bug: http://curl.haxx.se/bug/view.cgi?id=1492
* memanalyze.pl: handle free(NULL)Jay Satiro2015-03-101-3/+6
|
* openssl: remove all uses of USE_SSLEAYDaniel Stenberg2015-03-051-1/+1
| | | | | | | SSLeay was the name of the library that was subsequently turned into OpenSSL many moons ago (1999). curl does not work with the old SSLeay library since years. This is now reflected by only using USE_OPENSSL in code that depends on OpenSSL.