summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* build: fix Codacy warningsMarcel Raad2019-06-057-34/+25
| | | | | | Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
* sws: remove unused variablesMarcel Raad2019-06-051-17/+8
| | | | | | Unused since commit 2f44e94. Closes https://github.com/curl/curl/pull/3975
* tests/server/.gitignore: Add socksd to the ignore listSteve Holme2019-06-021-0/+1
| | | | | | Missed in 04fd6755. Closes #3978
* test334: verify HTTP 204 response with chunked coding headerDaniel Stenberg2019-06-022-1/+45
| | | | | Verifies that a bodyless response don't parse this content-related header.
* http: don't parse body-related headers bodyless responsesMichael Kaufmann2019-06-021-3/+3
| | | | | | | | | | | | | | | | | | | Responses with status codes 1xx, 204 or 304 don't have a response body. For these, don't parse these headers: - Content-Encoding - Content-Length - Content-Range - Last-Modified - Transfer-Encoding This change ensures that HTTP/2 upgrades work even if a "Content-Length: 0" or a "Transfer-Encoding: chunked" header is present. Co-authored-by: Daniel Stenberg Closes #3702 Fixes #3968 Closes #3977
* HAProxy tests: add keywordsMarcel Raad2019-05-272-0/+4
| | | | | | | Add the proxy and haproxy keywords in order to be able to exclude or run these specific tests. Closes https://github.com/curl/curl/pull/3949
* tests: make test 1420 and 1406 work with rtsp-disabled libcurlMaksim Stsepanenka2019-05-272-2/+4
| | | | Closes #3948
* Revert all SASL authzid (new feature) commitsJay Satiro2019-05-257-332/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Revert all commits related to the SASL authzid feature since the next release will be a patch release, 7.65.1. Prior to this change CURLOPT_SASL_AUTHZID / --sasl-authzid was destined for the next release, assuming it would be a feature release 7.66.0. However instead the next release will be a patch release, 7.65.1 and will not contain any new features. After the patch release after the reverted commits can be restored by using cherry-pick: git cherry-pick a14d72c a9499ff 8c1cc36 c2a8d52 0edf690 Details for all reverted commits: Revert "os400: take care of CURLOPT_SASL_AUTHZID in curl_easy_setopt_ccsid()." This reverts commit 0edf6907ae37e2020722e6f61229d8ec64095b0a. Revert "tests: Fix the line endings for the SASL alt-auth tests" This reverts commit c2a8d52a1356a722ff9f4aeb983cd4eaf80ef221. Revert "examples: Added SASL PLAIN authorisation identity (authzid) examples" This reverts commit 8c1cc369d0c7163c6dcc91fd38edfea1f509ae75. Revert "curl: --sasl-authzid added to support CURLOPT_SASL_AUTHZID from the tool" This reverts commit a9499ff136d89987af885e2d7dff0a066a3e5817. Revert "sasl: Implement SASL authorisation identity via CURLOPT_SASL_AUTHZID" This reverts commit a14d72ca2fec5d4eb5a043936e4f7ce08015c177.
* tests: Fix the line endings for the SASL alt-auth testsJay Satiro2019-05-236-44/+44
| | | | | | | | | | | - Change data and protocol sections to CRLF line endings. Prior to this change the tests would fail or hang, which is because certain sections such as protocol require CRLF line endings. Follow-up to a9499ff from today which added the tests. Ref: https://github.com/curl/curl/pull/3790
* curl: --sasl-authzid added to support CURLOPT_SASL_AUTHZID from the toolSteve Holme2019-05-227-3/+332
|
* tests: add support to test against OpenSSH for WindowsMarc Hoersken2019-05-222-6/+50
| | | | | | Testing against OpenSSH for Windows requires v7.7.0.0 or newer due to the use of AllowUsers and DenyUsers. For more info see: https://github.com/PowerShell/Win32-OpenSSH/wiki/sshd_config
* curl: report error for "--no-" on non-boolean optionsDaniel Stenberg2019-05-202-1/+36
| | | | | | Reported-by: Olen Andoni Fixes #3906 Closes #3907
* lib1560: add tests for parsing URL with too long schemeDaniel Stenberg2019-05-201-0/+18
| | | | Ref: #3905
* test332: verify the blksize fixDaniel Stenberg2019-05-202-1/+46
|
* curl: make code work with protocol-disabled libcurlDaniel Stenberg2019-05-187-7/+10
| | | | Closes #3844
* cleanup: remove FIXME and TODO commentsDaniel Stenberg2019-05-162-7/+2
| | | | | | | | | They serve very little purpose and mostly just add noise. Most of them have been around for a very long time. I read them all before removing or rephrasing them. Ref: #3876 Closes #3883
* parse_proxy: use the URL parser APIDaniel Stenberg2019-05-151-1/+1
| | | | | | | As we treat a given proxy as a URL we should use the unified URL parser to extract the parts out of it. Closes #3878
* urlapi: require a non-zero host name length when parsing URLDaniel Stenberg2019-05-141-0/+3
| | | | | | Updated test 1560 to verify. Closes #3880
* build: fix "clarify calculation precedence" warningsMarcel Raad2019-05-121-2/+2
| | | | | | | Codacy/CppCheck warns about this. Consistently use parentheses as we already do in some places to silence the warning. Closes https://github.com/curl/curl/pull/3866
* Revert "multi: support verbose conncache closure handle"Jay Satiro2019-05-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b0972bc. - No longer show verbose output for the conncache closure handle. The offending commit was added so that the conncache closure handle would inherit verbose mode from the user's easy handle. (Note there is no way for the user to set options for the closure handle which is why that was necessary.) Other debug settings such as the debug function were not also inherited since we determined that could lead to crashes if the user's per-handle private data was used on an unexpected handle. The reporter here says he has a debug function to capture the verbose output, and does not expect or want any output to stderr; however because the conncache closure handle does not inherit the debug function the verbose output for that handle does go to stderr. There are other plausible scenarios as well such as the user redirects stderr on their handle, which is also not inherited since it could lead to crashes when used on an unexpected handle. Short of allowing the user to set options for the conncache closure handle I don't think there's much we can safely do except no longer inherit the verbose setting. Bug: https://curl.haxx.se/mail/lib-2019-05/0021.html Reported-by: Kristoffer Gleditsch Ref: https://github.com/curl/curl/pull/3598 Ref: https://github.com/curl/curl/pull/3618 Closes https://github.com/curl/curl/pull/3856
* test2100: Fix typos in test descriptionDaniel Gustafsson2019-05-061-0/+0
|
* urlapi: add CURLUPART_ZONEID to set and getDaniel Stenberg2019-05-052-0/+40
| | | | | | | | The zoneid can be used with IPv6 numerical addresses. Updated test 1560 to verify. Closes #3834
* urlapi: strip off scope id from numerical IPv6 addressesDaniel Stenberg2019-05-033-3/+132
| | | | | | | | | | ... to make the host name "usable". Store the scope id and put it back when extracting a URL out of it. Also makes curl_url_set() syntax check CURLUPART_HOST. Fixes #3817 Closes #3822
* CURL_MAX_INPUT_LENGTH: largest acceptable string input sizeDaniel Stenberg2019-04-294-3/+127
| | | | | | | | | | | | | | | | | 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
* sasl: Don't send authcid as authzid for the PLAIN mechanism as per RFC 4616Steve Holme2019-04-2215-27/+27
| | | | | | | RFC 4616 specifies the authzid is optional in the client authentication message and that the server will derive the authorisation identity (authzid) from the authentication identity (authcid) when not specified by the client.
* test 196,197,198: add 'retry' keyword [skip ci]Daniel Stenberg2019-04-213-0/+3
|
* test1002: correct the name [skip ci]Daniel Stenberg2019-04-201-1/+1
|
* test660: verify CONNECT_ONLY with IMAPDaniel Stenberg2019-04-202-1/+35
| | | | which basically just makes sure LOGOUT is *not* issued on disconnect
* tests: Run global cleanup at end of testsDaniel Gustafsson2019-04-154-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Make sure to run curl_global_cleanup() when shutting down the test suite to release any resources allocated in the SSL setup. This is clearly visible when running tests with PolarSSL where the thread lock calloc() memory which isn't released when not running cleanup. Below is an excerpt from the autobuild logs: ==12368== 96 bytes in 1 blocks are possibly lost in loss record 1 of 2 ==12368== at 0x4837B65: calloc (vg_replace_malloc.c:752) ==12368== by 0x11A76E: curl_dbg_calloc (memdebug.c:205) ==12368== by 0x145CDF: Curl_polarsslthreadlock_thread_setup (polarssl_threadlock.c:54) ==12368== by 0x145B37: Curl_polarssl_init (polarssl.c:865) ==12368== by 0x14129D: Curl_ssl_init (vtls.c:171) ==12368== by 0x118B4C: global_init (easy.c:158) ==12368== by 0x118BF5: curl_global_init (easy.c:221) ==12368== by 0x118D0B: curl_easy_init (easy.c:299) ==12368== by 0x114E96: test (lib1906.c:32) ==12368== by 0x115495: main (first.c:174) Closes #3783 Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com> Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* runtests: start socksd like other serversDaniel Stenberg2019-04-151-1/+1
| | | | | | | ... without a $srcdir prefix. Triggered by the failures in several autobuilds. Closes #3781
* socksd: Fix typosDaniel Gustafsson2019-04-141-2/+2
| | | | Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* socksd: Properly decorate static variablesDaniel Gustafsson2019-04-141-4/+4
| | | | | | | | Mark global variables static to avoid compiler warning in Clang when using -Wmissing-variable-declarations. Closes #3778 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* test: make tests and test scripts use socksd for SOCKSDaniel Stenberg2019-04-139-142/+149
| | | | Make all SOCKS tests use socksd instead of ssh.
* socksd: new SOCKS 4+5 server for testsDaniel Stenberg2019-04-133-1/+1174
| | | | Closes #3752
* urlapi: stricter CURLUPART_PORT parsingDaniel Stenberg2019-04-131-29/+67
| | | | | | | | | | | Only allow well formed decimal numbers in the input. Document that the number MUST be between 1 and 65535. Add tests to test 1560 to verify the above. Ref: https://github.com/curl/curl/issues/3753 Closes #3762
* test1906: verify CURLOPT_CURLU + CURLOPT_PORT usageDaniel Stenberg2019-04-114-2/+129
| | | | Based-on-code-by: Poul T Lomholt
* CURLOPT_DNS_USE_GLOBAL_CACHE: removeDaniel Stenberg2019-04-112-44/+29
| | | | | | | | Remove the code too. The functionality has been disabled in code since 7.62.0. Setting this option will from now on simply be ignored and have no function. Closes #3654
* build: fix Codacy/CppCheck warningsMarcel Raad2019-04-111-1/+3
| | | | | | | | | | - remove unused variables - declare conditionally used variables conditionally - suppress unused variable warnings in the CMake tests - remove dead variable stores - consistently use WIN32 macro to detect Windows Closes https://github.com/curl/curl/pull/3739
* lib557: initialize variablesMarcel Raad2019-04-111-7/+7
| | | | | | These variables are only conditionally initialized. Closes https://github.com/curl/curl/pull/3739
* lib509: add missing include for strdupMarcel Raad2019-04-111-0/+2
| | | | Closes https://github.com/curl/curl/pull/3739
* tests/server/util: fix Windows Unicode buildMarcel Raad2019-04-111-2/+2
| | | | | | | Always use the ANSI version of FormatMessage as we don't have the curl_multibyte gear available here. Closes https://github.com/curl/curl/pull/3758
* xattr: skip unittest on unsupported platformsDaniel Gustafsson2019-04-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | The stripcredentials unittest fails to compile on platforms without xattr support, for example the Solaris member in the buildfarm which fails with the following: CC unit1621-unit1621.o CC ../libtest/unit1621-first.o CCLD unit1621 Undefined first referenced symbol in file stripcredentials unit1621-unit1621.o goto problem 2 ld: fatal: symbol referencing errors. No output written to .libs/unit1621 collect2: error: ld returned 1 exit status gmake[2]: *** [Makefile:996: unit1621] Error 1 Fix by excluding the test on such platforms by using the reverse logic from where stripcredentials() is defined. Closes #3759 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* test: urlapi: urlencode characters above 0x7f correctlyJakub Zakrzewski2019-04-071-0/+4
|
* pipelining: removedDaniel Stenberg2019-04-066-285/+7
| | | | | | | As previously planned and documented in DEPRECATE.md, all pipelining code is removed. Closes #3651
* tests: make Impacket (SMB server) Python 3 compatiblecclauss2019-04-068-335/+352
| | | | | Closes #3731 Fixes #3289
* vauth/oauth2: Fix OAUTHBEARER token generationMert Yazıcıoğlu2019-04-0212-18/+19
| | | | | | | | | | | OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: #2487 Reported-by: Paolo Mossino Closes https://github.com/curl/curl/pull/3377
* tests: Fixed XML validation errors in some test files.Dan Fandrich2019-03-245-2/+6
|
* tests: Fix some incorrect precheck error messages.Dan Fandrich2019-03-245-5/+5
| | | | [ci skip]
* test1541: threaded connection sharingDaniel Stenberg2019-03-184-2/+189
| | | | | | | | | 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
* makefile: make checksrc and hugefile commands "silent"Daniel Stenberg2019-03-143-6/+21
| | | | | | | ... to match the style already used for compiling, linking etc. Acknowledges 'make V=1' to enable verbose. Closes #3681