summaryrefslogtreecommitdiff
path: root/tests/libtest/Makefile.inc
Commit message (Collapse)AuthorAgeFilesLines
* CURLOPT_FOLLOWLOCATION: add a CURLFOLLOW_NO_CUSTOMREQUEST bitbagder/FOLLOW_IGNORE_CUSTOMDaniel Stenberg2019-07-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | With this change, the argument passed to the CURLOPT_FOLLOWLOCATION option is treated as a bitmask instead of just a long. If the new CURLFOLLOW_NO_CUSTOMREQUEST bit is set in the bitmask, it means that libcurl will NOT allow a custom method override the HTTP request method after a redirect is followed. As is otherwise the default behavior (that surprises many users). This change is forward compatible because CURLOPT_FOLLOWLOCATION has been documented to accept the exact value of '1' to enable redirect following and therefore the other bits were left unused and undefined. We now add value to another bit. Starting in 7.66.0, the value 1 and the first bit still enables plain redirect following but the second bit adds more meaning. This change is backward compatible in the following way: setting the CURLFOLLOW_NO_CUSTOMREQUEST bit in a program that still uses an older libcurl installation at run-tim will have no effect. This is because older libcurl code checked if the value was non-zero and then enabled redirect following. Of course older libcurl will always let the set CURLOPT_CUSTOMREQUEST string override the method, disregarding what the HTTP response code suggests. Test 1589 added to verify the functionality.
* http: allow overriding timecond with custom headerPeter Simonyi2019-07-141-1/+4
| | | | | | | | | With CURLOPT_TIMECONDITION set, a header is automatically added (e.g. If-Modified-Since). Allow this to be replaced or suppressed with CURLOPT_HTTPHEADER. Fixes #4103 Closes #4109
* test1523: basic test of CURLOPT_LOW_SPEED_LIMITDaniel Stenberg2019-06-181-1/+4
|
* CURL_MAX_INPUT_LENGTH: largest acceptable string input sizeDaniel Stenberg2019-04-291-2/+4
| | | | | | | | | | | | | | | | | This limits all accepted input strings passed to libcurl to be less than CURL_MAX_INPUT_LENGTH (8000000) bytes, for these API calls: curl_easy_setopt() and curl_url_set(). The 8000000 number is arbitrary picked and is meant to detect mistakes or abuse, not to limit actual practical use cases. By limiting the acceptable string lengths we also reduce the risk of integer overflows all over. NOTE: This does not apply to `CURLOPT_POSTFIELDS`. Test 1559 verifies. Closes #3805
* test1906: verify CURLOPT_CURLU + CURLOPT_PORT usageDaniel Stenberg2019-04-111-1/+5
| | | | Based-on-code-by: Poul T Lomholt
* pipelining: removedDaniel Stenberg2019-04-061-5/+1
| | | | | | | As previously planned and documented in DEPRECATE.md, all pipelining code is removed. Closes #3651
* test1541: threaded connection sharingDaniel Stenberg2019-03-181-1/+5
| | | | | | | | | The threaded-shared-conn.c example turned into test case. Only works if pthread was detected. An attempt to detect future regressions such as e3a53e3efb942a5 Closes #3687
* CURLU: fix NULL dereference when used over proxyDaniel Stenberg2019-03-041-0/+5
| | | | | | | | Test 659 verifies Also fixed the test 658 name Closes #3641
* cookies: only save the cookie file if the engine is enabledDaniel Stenberg2019-02-271-1/+5
| | | | | | | | | | | | | | | | | | | Follow-up to 8eddb8f4259. If the cookieinfo pointer is NULL there really is nothing to save. Without this fix, we got a problem when a handle was using shared object with cookies and is told to "FLUSH" it to file (which worked) and then the share object was removed and when the easy handle was closed just afterwards it has no cookieinfo and no cookies so it decided to save an empty jar (overwriting the file just flushed). Test 1905 now verifies that this works. Assisted-by: Michael Wallner Assisted-by: Marcel Raad Closes #3621
* test1558: verify CURLINFO_PROTOCOL on file:// transferDaniel Stenberg2019-01-101-0/+4
| | | | | | Attempt to reproduce issue #3444. Closes #3447
* curl_multi_remove_handle() don't block terminating c-ares requestsBrad Spencer2019-01-071-1/+5
| | | | | | | | | 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
* http: Implement trailing headers for chunked transfersAyoub Boudhar2018-12-141-0/+5
| | | | | | | | | | | | | 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
* Curl_follow: extract the Location: header field unvalidatedDaniel Stenberg2018-12-121-1/+4
| | | | | | | | | | | ... 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
* setopt: add CURLOPT_CURLUJim Fuller2018-11-091-1/+5
| | | | | | Allows an application to pass in a pre-parsed URL via a URL handle. Closes #3227
* URL-APIDaniel Stenberg2018-09-081-0/+4
| | | | | | | See header file and man pages for API. All documented API details work and are tested in the 1560 test case. Closes #2842
* test1148: disable if decimal separator is not pointMarcel Raad2018-08-211-0/+7
| | | | | | | | | 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
* CURLINFO_SIZE_UPLOAD: fix missing counter updateDaniel Stenberg2018-08-111-1/+4
| | | | | | | | Adds test 1522 for verification. Reported-by: cjmsoregan Fixes #2847 Closes #2864
* multi: fix crash due to dangling entry in connect-pending listJavier Blazquez2018-06-231-1/+5
| | | | | Fixes #2677 Closes #2679
* tests/libtest: Add lib1521 to nodist_SOURCESRikard Falkeborn2018-06-061-1/+1
| | | | | | | | | | | Since 467da3af0, lib1521.c is generated instead of checked in. According to the commit message, the intention was to remove it from the tarball as well. However, it is still present when running make dist. To remove it, add it to nodist_lib1521_SOURCES. This also means there is no need for the manually added dist-rule in the Makefile. Also update CMakelists.txt to handle the fact that we now may have nodist_SOURCES.
* http resume: skip body if http code 416 (range error) is ignored.Patrick Monnerat2018-05-221-0/+5
| | | | | | | | | | | | 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
* url: Add option CURLOPT_RESOLVER_START_FUNCTIONFrancisco Sedano2018-02-211-1/+4
| | | | | | | | | | | | - Add new option CURLOPT_RESOLVER_START_FUNCTION to set a callback that will be called every time before a new resolve request is started (ie before a host is resolved) with a pointer to backend-specific resolver data. Currently this is only useful for ares. - Add new option CURLOPT_RESOLVER_START_DATA to set a user pointer to pass to the resolver start callback. Closes https://github.com/curl/curl/pull/2311
* test1556: verify >16KB headers to the header callbackDaniel Stenberg2018-02-161-1/+5
|
* TODO fixed: Detect when called from within callbacksBjörn Stenberg2018-02-151-1/+5
| | | | Closes #2302
* mime: clone mime tree upon easy handle duplication.Patrick Monnerat2018-01-141-1/+4
| | | | | | | | | | | | | | | | | | | | | A mime tree attached to an easy handle using CURLOPT_MIMEPOST is strongly bound to the handle: there is a pointer to the easy handle in each item of the mime tree and following the parent pointer list of mime items ends in a dummy part stored within the handle. Because of this binding, a mime tree cannot be shared between different easy handles, thus it needs to be cloned upon easy handle duplication. There is no way for the caller to get the duplicated mime tree handle: it is then set to be automatically destroyed upon freeing the new easy handle. New test 654 checks proper mime structure duplication/release. Add a warning note in curl_mime_data_cb() documentation about sharing user data between duplicated handles. Closes #2235
* test1554: verify connection cache sharingDaniel Stenberg2017-11-091-1/+4
|
* libtest: Add required test libraries for lib1552 and lib1553Paul Howarth2017-10-241-0/+2
| | | | | | | | They use $(TESTUTIL) and thus should use $(TESTUTIL_LIBS) too. This fixes build failures on Fedora 13. Closes #2006
* test653: check reuse of easy handle after mime data changePatrick Monnerat2017-10-201-1/+4
| | | | See issue #1999
* test652: curl_mime_data + base64 encoder with large contentsPatrick Monnerat2017-10-191-1/+4
|
* test651: curl_formadd with huge COPYCONTENTSDaniel Stenberg2017-10-131-1/+4
|
* pingpong: return error when trying to send without connectionDaniel Stenberg2017-10-071-1/+4
| | | | | | | | | | | | | When imap_done() got called before a connection is setup, it would try to "finish up" and dereffed a NULL pointer. Test case 1553 managed to reproduce. I had to actually use a host name to try to resolve to slow it down, as using the normal local server IP will make libcurl get a connection in the first curl_multi_perform() loop and then the bug doesn't trigger. Fixes #1953 Assisted-by: Max Dymond
* multi_cleanup: call DONE on handles that never got thatDaniel Stenberg2017-10-061-1/+4
| | | | | | | | | | | ... fixes a memory leak with at least IMAP when remove_handle is never called and the transfer is abruptly just abandoned early. Test 1552 added to verify Detected by OSS-fuzz Assisted-by: Max Dymond Closes #1954
* form API: add new test 650.Patrick Monnerat2017-09-071-1/+4
| | | | | | Now that the form API is deprecated and not used anymore in curl tool, a lot of its features left untested. Test 650 attempts to check all these features not tested elsewhere.
* mime: tests and examples.Patrick Monnerat2017-09-021-1/+14
| | | | | | | | | | Additional mime-specific tests. Existing tests updated to reflect small differences (Expect: 100-continue, data size change due to empty lines, etc). Option -F headers= keyword added to tests. test1135 disabled until the entry point order change is resolved. New example smtp-mime. Examples postit2 and multi-post converted from form API to mime API.
* url: make the original string get used on subsequent transfersDaniel Stenberg2017-07-031-1/+4
| | | | | | | | | | | ... since CURLOPT_URL should follow the same rules as other options: they remain set until changed or cleared. Added test 1551 to verify. Fixes #1631 Closes #1632 Reported-by: Pavel Rochnyak
* test1521: fix out-of-tree builds, broken with 467da3afDan Fandrich2017-06-301-1/+1
| | | | | | | | The test.h file is no longer in the same directory as the source file, so that directory needs to be added to the include path. Fixes #1627 Closes #1628
* libtest/Makefile: remove unused lib1541 variablesDaniel Stenberg2017-06-231-4/+0
|
* PIPELINING_SERVER_BL: cleanup the internal list useDaniel Stenberg2017-06-191-0/+8
| | | | | | | | | | | The list was freed incorrectly since the llist refactor of cbae73e1dd959. Added test 1550 to verify that it works and avoid future regressions. Reported-by: Pascal Terjan Fixes #1584 Closes #1585
* includes: remove curl/curlbuild.h and curl/curlrules.hDaniel Stenberg2017-06-141-5/+1
| | | | | | | | Rely entirely on curl/system.h now. Introduced in Aug 2008 with commit 14240e9e109f. Now gone. Fixes #1456
* test1521: test *all* curl_easy_setopt optionsDaniel Stenberg2017-06-051-1/+4
| | | | | | | | | | | | | mk-lib1521.pl generates a test program (lib1521.c) that calls curl_easy_setopt() for every known option with a few typical values to make sure they work (ignoring the return codes). Some small changes were necessary to avoid asserts and NULL accesses when doing this. The perl script needs to be manually rerun when we add new options. Closes #1543
* test1538: verify the libcurl strerror API callsDaniel Stenberg2017-06-021-1/+5
|
* test1537: dedicated tests of the URL (un)escape API callsDaniel Stenberg2017-06-021-1/+5
| | | | Closes #1530
* test559: verify use of minimum CURLOPT_BUFFERSIZEDaniel Stenberg2017-05-041-1/+4
|
* include: curl/system.h is a run-time version of curlbuild.hDaniel Stenberg2017-04-031-1/+5
| | | | | | | | | | | | | | | | | | system.h is aimed to replace curlbuild.h at a later point in time when we feel confident system.h works sufficiently well. curl/system.h is currently used in parallel with curl/curlbuild.h curl/system.h determines a data sizes, data types and include file status based on available preprocessor defines instead of getting generated at build-time. This, in order to avoid relying on a build-time generated file that makes it complicated to do 32 and 64 bit bields from the same installed set of headers. Test 1541 verifies that system.h comes to the same conclusion that curlbuild.h offers. Closes #1373
* pause: handle mixed types of data when pausedDaniel Stenberg2017-03-281-0/+5
| | | | | | | | | | | | When receiving chunked encoded data with trailers, and the write callback returns PAUSE, there might be both body and header to store to resend on unpause. Previously libcurl returned error for that case. Added test case 1540 to verify. Reported-by: Stephen Toub Fixes #1354 Closes #1357
* tests: Add some testcases for recent new features.Frank Gevaerts2016-11-261-1/+9
| | | | | | | Add missing tests for CURLINFO_SCHEME, CURLINFO_PROTOCOL, %{scheme}, and %{http_version} closes #1143
* easy: Initialize info variables on easy init and duphandleJay Satiro2016-11-051-2/+6
| | | | | | | | | | | | - 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
* New libcurl option to keep sending on errorMichael Kaufmann2016-09-221-0/+5
| | | | | | | | | | | | 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-201-1/+5
| | | | | Bug: https://github.com/curl/curl/issues/1017 Reported-by: Jeroen Ooms
* tests: added test1517Karlson2k2016-04-201-1/+4
| | | | | | | | | | ... 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
* test1531: verify POSTFIELDSIZE set after add_handleDaniel Stenberg2015-06-231-1/+5
| | | | Following the fix made in 903b6e05565bf.