summaryrefslogtreecommitdiff
path: root/tests/data
Commit message (Collapse)AuthorAgeFilesLines
* --request-target: instead of --strip-path-slashDaniel Stenberg2017-06-212-6/+6
| | | | | | | | | | | | | | ... and CURLOPT_REQUEST_TARGET instead of CURLOPT_STRIP_PATH_SLASH. This option instead provides the full "alternative" target to use in the request, instead of extracting the path from the URL. Test 1298 and 1299 updated accordingly. Idea-by: Evert Pot Suggestion: https://daniel.haxx.se/blog/2017/06/19/options-with-curl/comment-page-1/#comment-18373 Closes #1593
* http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASHDaniel Stenberg2017-06-193-1/+112
| | | | | | | | | | | ... to enable sending "OPTIONS *" which wasn't possible previously. This option currently only works for HTTP. Added test cases 1298 + 1299 to verify Fixes #1280 Closes #1462
* lib1521: add curl_easy_getinfo calls to the test setDaniel Stenberg2017-06-191-1/+1
| | | | | Also added return value checks to make sure no unexpected return codes are used.
* PIPELINING_SERVER_BL: cleanup the internal list useDaniel Stenberg2017-06-192-0/+30
| | | | | | | | | | | 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
* curl: prevent binary output spewed to terminalDaniel Stenberg2017-06-163-1/+1
| | | | | | | | | ... unless "--output -" is used. Binary detection is done by simply checking for a binary zero in early data. Added test 1425 1426 to verify. Closes #1512
* http-proxy: fix chunked-encoded CONNECT responsesDaniel Stenberg2017-06-161-1/+0
| | | | | | | | Regression since 5113ad0424. ... and remove 'flaky' from test 1061 again Closes #1579
* tests: stabilize test 2032 and 2033Daniel Stenberg2017-06-162-58/+6
| | | | | | | | | | | | | | Both these tests run the same underlying test code: libntlmconnect.c - this test code made some assumptions about socket ordering when it used curl_easy_fdset() and when we changed timing or got accidental changes in libcurl the tests would fail. The tests verify that the different transfers keep using the same connections, which I now instead made sure by adding the number of bytes each transfer gets and then verifies that they always get the same amount as when these tests worked. Closes #1576
* test1148: verify the -# progressbarDaniel Stenberg2017-06-162-1/+58
| | | | Closes #1569
* test1061: mark as flakyDaniel Stenberg2017-06-161-0/+1
| | | | | Fails intermittently on travis builds since a few days. Likely due to 5113ad0424.
* test1147: verify -H on a fileDaniel Stenberg2017-06-152-1/+65
|
* http-proxy: do the HTTP CONNECT process entirely non-blockingDaniel Stenberg2017-06-141-2/+2
| | | | | | | Mentioned as a problem since 2007 (8f87c15bdac63) and of course it existed even before that. Closes #1547
* includes: remove curl/curlbuild.h and curl/curlrules.hDaniel Stenberg2017-06-142-24/+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-052-1/+31
| | | | | | | | | | | | | 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: added "verbose logs" keywordDan Fandrich2017-06-051-0/+1
| | | | These error messages are not displayed with --disable-verbose
* test1262: verify ftp download with -z for "if older than this"Daniel Stenberg2017-06-052-1/+41
|
* test1538: fix typoDaniel Stenberg2017-06-021-1/+1
|
* test1538: verify the libcurl strerror API callsDaniel Stenberg2017-06-022-1/+149
|
* test1537: dedicated tests of the URL (un)escape API callsDaniel Stenberg2017-06-022-1/+46
| | | | Closes #1530
* tests: removed some redundant empty <stdout> sectionsDan Fandrich2017-05-284-8/+0
|
* redirect: store the "would redirect to" URL when max redirs is reachedDaniel Stenberg2017-05-232-1/+62
| | | | | | | | | Test 1261 added to verify. Reported-by: Lloyd Fournier Fixes #1489 Closes #1497
* tests: stabilize test 1034Michael Kaufmann2017-05-201-1/+5
| | | | | | | Pass the invalid domain name on stdin. On some systems, the test framework cannot pass invalid UTF-8 sequences on the command line. Closes #1488
* tests: added missing keywords "chunked Transfer-Encoding"Dan Fandrich2017-05-1310-2/+11
|
* tests: made a couple of prechecks consistent with othersDan Fandrich2017-05-132-2/+2
| | | | | | | | | | Also removed a TODO suggesting caching the precheck results. Tests showed this would save about 0.1 sec on the total test run time on a relatively modern system, an unnoticeable gain at the cost of longer and more complicated code. There would also be a danger that a cached test result would be inappropriately returned, such as when other test dependencies (like environment variables) are different or when the precheck causes side effects (like filesystem changes).
* tests: remove superfluous test 1399Richard Hsu2017-05-102-44/+1
| | | | | | | | | | | | @MarcelRaad noted that `test1399` causes infinite loop on MinGW. Looking into this, seems like it is related to how Windows handles CRLF. See https://github.com/curl/curl/commit/9e093f by @mback2k. Removing `test1399` as it's identical to `test1326` then with such a fix. Test 1399 was broughy by commit 862b02f8947039e Closes #1478
* tests: make test file names more uniqueDan Fandrich2017-05-0911-23/+23
| | | | | | Include the test number in the names of files written out by tests to reduce the chance of accidental duplication and to make it more clear which test is associated with which file.
* tests: removed redundant --trace-ascii argumentsDan Fandrich2017-05-0912-12/+12
| | | | | This is already added by the test suite; it's not clear why all these tests had it, unless it's cargo-culting.
* tests: list the primary server first in the server sectionDan Fandrich2017-05-092-2/+2
|
* tests: updated for modified fake randomDaniel Stenberg2017-05-0833-44/+44
|
* test557: set a known good numeric localeDan Fandrich2017-05-041-4/+0
| | | | | | | | Windows does not allow setting the locale with environment variables (as the test attempted to do), so the test failed when run with a user locale that has a comma as radixchar. Changed the test to call setlocale() explicitly to ensure that a known working locale is set even on Windows.
* test559: verify use of minimum CURLOPT_BUFFERSIZEDaniel Stenberg2017-05-042-1/+51
|
* Telnet: Write full buffer instead of byte-by-byteRichard Hsu2017-05-022-1/+44
| | | | | | | | Previous TODO wanting to write in chunks. We should support writing more at once since some TELNET servers may respond immediately upon first byte written such as WHOIS servers. Closes #1389
* tests: added --remote-time tests for remaining protocols that support itDan Fandrich2017-04-294-0/+130
|
* test1443: test --remote-timeDan Fandrich2017-04-272-1/+69
|
* curl: set a 100K buffer size by defaultDaniel Stenberg2017-04-259-0/+9
| | | | | | | | | | | | | | | | | | | | | | Test command 'time curl http://localhost/80GB -so /dev/null' on a Debian Linux. Before (middle performing run out 9): real 0m28.078s user 0m11.240s sys 0m12.876s After (middle performing run out 9) real 0m26.356s (93.9%) user 0m5.324s (47.4%) sys 0m8.368s (65.0%) Also, doing SFTP over a 200 millsecond latency link is now about 6 times faster. Closes #1446
* Curl_expire_latest: ignore already expired timersDaniel Stenberg2017-04-111-1/+1
| | | | | | | | | If the existing timer is still in there but has expired, the new timer should be added. Reported-by: Rainer Canavan Bug: https://curl.haxx.se/mail/lib-2017-04/0030.html Closes #1407
* test1606: verify speedcheckDaniel Stenberg2017-04-062-1/+27
|
* tests: added test for Curl_splaygetbest to unit1309Dániel Bakai2017-04-041-0/+111
| | | | | | | | This checks the new behavior of Curl_splaygetbest, so that the smallest node not larger than the key is removed, and FIFO behavior is kept even when there are multiple nodes with the same key. Closes #1358
* include: curl/system.h is a run-time version of curlbuild.hDaniel Stenberg2017-04-032-1/+23
| | | | | | | | | | | | | | | | | | 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-282-0/+65
| | | | | | | | | | | | 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
* http: Fix proxy connection reuse with basic-authIsaac Boukris2017-03-281-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using basic-auth, connections and proxy connections can be re-used with different Authorization headers since it does not authenticate the connection (like NTLM does). For instance, the below command should re-use the proxy connection, but it currently doesn't: curl -v -U alice:a -x http://localhost:8181 http://localhost/ --next -U bob:b -x http://localhost:8181 http://localhost/ This is a regression since refactoring of ConnectionExists() as part of: cb4e2be7c6d42ca0780f8e0a747cecf9ba45f151 Fix the above by removing the username and password compare when re-using proxy connection at proxy_info_matches(). However, this fix brings back another bug would make curl to re-print the old proxy-authorization header of previous proxy basic-auth connection because it wasn't cleared. For instance, in the below command the second request should fail if the proxy requires authentication, but would succeed after the above fix (and before aforementioned commit): curl -v -U alice:a -x http://localhost:8181 http://localhost/ --next -x http://localhost:8181 http://localhost/ Fix this by clearing conn->allocptr.proxyuserpwd after use unconditionally, same as we do for conn->allocptr.userpwd. Also fix test 540 to not expect digest auth header to be resent when connection is reused. Signed-off-by: Isaac Boukris <iboukris@gmail.com> Closes https://github.com/curl/curl/pull/1350
* spelling fixesklemens2017-03-2619-19/+19
| | | | Closes #1356
* curl: check for end of input in writeout backslash handlingDaniel Stenberg2017-03-252-1/+36
| | | | | | Reported-by: Brian Carpenter Added test 1442 to verify
* test2033: flakyDaniel Stenberg2017-03-221-0/+1
|
* test714/5: added HTTP as a required featureDan Fandrich2017-03-202-0/+6
| | | | | These tests use an HTTP proxy so require that curl be built with HTTP support.
* tests: strip more options from non-HTTP --libcurl testsDan Fandrich2017-03-203-18/+9
| | | | | | The CURLOPT_USERAGENT and CURLOPT_MAXREDIRS options are only set if HTTP support is available, so ignore them in tests where HTTP is not guaranteed.
* test1440/1: depend on well-defined file: behaviourDan Fandrich2017-03-122-2/+10
| | | | | | | Depend on the known behaviour of URLs for nonexistent files rather than the undefined behaviour of URLs for directories (which fails on Windows). The test isn't about file: URLs at all, so the URL used doesn't really matter.
* tests: clear the SSL_CERT_FILE variable on --libcurl testsDan Fandrich2017-03-129-2/+29
| | | | | Otherwise, the contents will end up in the output and fail the verification.
* test1287: added verbose logs keywordDan Fandrich2017-03-121-0/+1
|
* tool_writeout: fixed a buffer read overrun on --write-outDan Fandrich2017-03-123-1/+63
| | | | | | | | | If a % ended the statement, the string's trailing NUL would be skipped and memory past the end of the buffer would be accessed and potentially displayed as part of the --write-out output. Added tests 1440 and 1441 to check for this kind of condition. Reported-by: Brian Carpenter
* url: add option CURLOPT_SUPPRESS_CONNECT_HEADERSDesmond O. Chang2017-03-122-0/+97
| | | | | | | | | | | | | | - Add new option CURLOPT_SUPPRESS_CONNECT_HEADERS to allow suppressing proxy CONNECT response headers from the user callback functions CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION. - Add new tool option --suppress-connect-headers to expose CURLOPT_SUPPRESS_CONNECT_HEADERS and allow suppressing proxy CONNECT response headers from --dump-header and --include. Assisted-by: Jay Satiro Assisted-by: CarloCannas@users.noreply.github.com Closes https://github.com/curl/curl/pull/783