summaryrefslogtreecommitdiff
path: root/tests/libtest
Commit message (Collapse)AuthorAgeFilesLines
* checksrc: stricter no-space-before-paren enforcementDaniel Stenberg2016-12-135-8/+8
| | | | In order to make the code style more uniform everywhere
* lib1536: checksrc complianceJay Satiro2016-11-281-1/+2
|
* tests: Add some testcases for recent new features.Frank Gevaerts2016-11-263-1/+265
| | | | | | | Add missing tests for CURLINFO_SCHEME, CURLINFO_PROTOCOL, %{scheme}, and %{http_version} closes #1143
* checksrc: move open braces to comply with function declaration styleDaniel Stenberg2016-11-241-1/+2
|
* checksrc: white space edits to comply to stricter checksrcDaniel Stenberg2016-11-242-2/+2
|
* checksrc: code style: use 'char *name' styleDaniel Stenberg2016-11-2412-22/+22
|
* s/cURL/curlDaniel Stenberg2016-11-071-2/+2
| | | | | | We're mostly saying just "curl" in lower case these days so here's a big cleanup to adapt to this reality. A few instances are left as the project could still formally be considered called cURL.
* easy: Initialize info variables on easy init and duphandleJay Satiro2016-11-052-2/+135
| | | | | | | | | | | | - Call Curl_initinfo on init and duphandle. Prior to this change the statistical and informational variables were simply zeroed by calloc on easy init and duphandle. While zero is the correct default value for almost all info variables, there is one where it isn't (filetime initializes to -1). Bug: https://github.com/curl/curl/issues/1103 Reported-by: Neal Poole
* libauthretry: use the external function curl_strequalDan Fandrich2016-10-311-4/+3
| | | | The internal version strcasecompare isn't available outside libcurl
* strcasecompare: is the new name for strequal()Daniel Stenberg2016-10-311-4/+4
| | | | | | | ... to make it less likely that we forget that the function actually does case insentive compares. Also replaced several invokes of the function with a plain strcmp when case sensitivity is not an issue (like comparing with "-").
* parsedate: handle cut off numbers betterDaniel Stenberg2016-10-311-1/+7
| | | | | | | | | ... and don't read outside of the given buffer! CVE-2016-8621 bug: https://curl.haxx.se/docs/adv_20161102G.html Reported-by: Luật Nguyễn
* test557: verify printf() with 128 and 129 argumentsDaniel Stenberg2016-10-081-0/+104
|
* New libcurl option to keep sending on errorMichael Kaufmann2016-09-222-0/+204
| | | | | | | | | | | | Add the new option CURLOPT_KEEP_SENDING_ON_ERROR to control whether sending the request body shall be completed when the server responds early with an error status code. This is suitable for manual NTLM authentication. Reviewed-by: Jay Satiro Closes https://github.com/curl/curl/pull/904
* easy: Reset all statistical session info in curl_easy_resetJay Satiro2016-09-202-1/+85
| | | | | Bug: https://github.com/curl/curl/issues/1017 Reported-by: Jeroen Ooms
* CMake: Try to (un-)hide private library symbolsJakub Zakrzewski2016-09-101-0/+4
| | | | | | | | | | Detect support for compiler symbol visibility flags and apply those according to CURL_HIDDEN_SYMBOLS option. It should work true to the autotools build except it tries to unhide symbols on Windows when requested and prints warning if it fails. Ref: https://github.com/curl/curl/issues/981#issuecomment-242665951 Reported-by: Daniel Stenberg
* libtest/test.h: fix typo (#988)Mark Hamilton2016-09-031-1/+1
|
* mprintf: Fix processing of width and prec argsJay Satiro2016-05-131-0/+49
| | | | | | | | | | | | | | | | | Prior to this change a width arg could be erroneously output, and also width and precision args could not be used together without crashing. "%0*d%s", 2, 9, "foo" Before: "092" After: "09foo" "%*.*s", 5, 2, "foo" Before: crash After: " fo" Test 557 is updated to verify this and more
* lib: include curl_printf.h as one of the last headersDaniel Stenberg2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | curl_printf.h defines printf to curl_mprintf, etc. This can cause problems with external headers which may use __attribute__((format(printf, ...))) markers etc. To avoid that they cause problems with system includes, we include curl_printf.h after any system headers. That makes the three last headers to always be, and we keep them in this order: curl_printf.h curl_memory.h memdebug.h None of them include system headers, they all do funny #defines. Reported-by: David Benjamin Fixes #743
* lib1517: checksrc complianceDaniel Stenberg2016-04-241-2/+3
|
* tests: added test1517Karlson2k2016-04-202-1/+119
| | | | | | | | | | ... for checking ability to receive full HTTP response when POST request is used with slow read callback function. This test checks for bug #657 and verifies the work-around from 72d5e144fbc6. Closes #720
* make/checksrc: use $srcdir, not $top_srcdirDaniel Stenberg2016-04-191-1/+1
|
* checksrc/makefile.am: use $top_srcdir to find source filesDaniel Stenberg2016-04-181-1/+1
| | | | ... to properly support out of source tree builds.
* tests: Fixed header files to comply with our code styleSteve Holme2016-04-031-1/+1
|
* code: style updatesDaniel Stenberg2016-04-0339-85/+85
|
* checksrc: run checksrc in tests when 'make checksrc' in rootDaniel Stenberg2016-04-031-1/+4
|
* lib557: allow too long linesDaniel Stenberg2016-04-031-4/+7
|
* tests/libtest: follow our code style guidelines betterDaniel Stenberg2016-04-0371-661/+682
| | | | ... checksrc of all test code is pending.
* curl/mprintf.h: remove support for _MPRINTF_REPLACEDaniel Stenberg2016-04-0113-134/+143
| | | | | | | | | | | | | | | | | | | The define is not in our name space and is therefore not protected by our API promises. It was only really used by libcurl internals but was mostly erased from there already in 8aabbf5 (March 2015). This is supposedly the final death blow to that define from everywhere. As a side-effect, making sure _MPRINTF_REPLACE is gone and not used, I made the lib tests in tests/libtest/ use curl_printf.h for its redefine magic and then subsequently the use of sprintf() got banned in the tests as well (as it is in libcurl internals) and I then replaced them all with snprintf(). In the unlikely event that any users is actually using this define and gets sad by this change, it is very easily copied to the user's own code.
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-03103-105/+105
|
* test 1515: add MSYS support by passing a relative pathMarc Hoersken2015-12-261-1/+1
| | | | MSYS would otherwise turn a /-style path into a C:\-style path.
* tests first.c: fix calculation of sleep timeout on WindowsMarc Hoersken2015-12-231-1/+1
| | | | Not converting to double caused small timeouts to be skipped.
* test 573: add more debug outputMarc Hoersken2015-12-231-1/+2
|
* test1513: make sure the callback is only called onceDaniel Stenberg2015-11-241-1/+2
|
* formadd: support >2GB files on windowsDaniel Stenberg2015-11-021-15/+39
| | | | Closes #425
* test1531: case the size to fix the test on non-largefile buildsDan Fandrich2015-10-141-1/+1
|
* gitignore: Sort for readabilityJay Satiro2015-08-181-1/+1
| | | | find . -name .gitignore -print0 | xargs -i -0 sort -o '{}' '{}'
* 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ň
* tests: Distribute CMakeLists.txt files in subdirectoriesRoger Leigh2015-06-251-1/+1
|
* test1531: verify POSTFIELDSIZE set after add_handleDaniel Stenberg2015-06-232-1/+149
| | | | Following the fix made in 903b6e05565bf.
* CURLOPT_OPENSOCKETFUNCTION: return error at onceDaniel Stenberg2015-06-092-1/+72
| | | | | | | | 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
* CURLOPT_HEADEROPT: default to separateDaniel Stenberg2015-04-281-0/+1
| | | | | | | | 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
* Bug #149: Deletion of unnecessary checks before calls of the function "free"Markus Elfring2015-03-167-19/+8
| | | | | | | | | | | 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>
* libtest: fixed linker errors on msvcSergei Nikulov2015-03-0311-29/+5
| | | | Bug: https://github.com/bagder/curl/pull/144
* lib530: make it less timing sensibleDaniel Stenberg2015-02-241-7/+9
| | | | | ... by making sure the first request is completed before doing the remainder.
* unit1600: unit test for Curl_ntlm_core_mk_nt_hashDaniel Stenberg2015-02-032-2/+18
|
* tests: make sure CRLFs can't be used in URLs passed to proxyDaniel Stenberg2015-01-072-1/+64
| | | | Bug: http://curl.haxx.se/docs/adv_20150108B.html
* lib1900.c: Fixed cppcheck errorJulien Nabet2014-12-311-1/+1
| | | | | | | lib1900.c:182: (style) Array index 'handlenum' is used before limits check Bug: https://github.com/bagder/curl/pull/133
* test1509: Fixed compilation warningSteve Holme2014-12-281-3/+4
| | | | | lib1509.c:93:18: warning: conversion to 'long int' from 'size_t' may alter its value
* test556: Fixed compilation warningSteve Holme2014-12-282-2/+3
| | | | | lib556.c:90: warning: conversion to 'unsigned int' from 'size_t' may alter its value
* test1520: Fixed initial teething problemsSteve Holme2014-12-281-10/+12
| | | | | | | * Missing initialisation of upload status caused a seg fault * Missing data termination caused corrupt data to be uploaded * Data verification should be performed in <upload> element * Added missing recipient list cleanup