summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* defines: avoid underscore-prefixed definesDaniel Stenberg2019-08-231-1/+3
| | | | | | | | | | | Double-underscored or underscore plus uppercase letter at least. ... as they're claimed to be reserved. Reported-by: patnyb on github Fixes #4254 Closes #4255
* http: fix use of credentials from URL when using HTTP proxyDaniel Stenberg2019-08-163-2/+104
| | | | | | | | | | | | | | | | When a username and password are provided in the URL, they were wrongly removed from the stored URL so that subsequent uses of the same URL wouldn't find the crendentials. This made doing HTTP auth with multiple connections (like Digest) mishave. Regression from 46e164069d1a5230 (7.62.0) Test case 335 added to verify. Reported-by: Mike Crowe Fixes #4228 Closes #4229
* tests: Replace outdated test case numbering documentationMike Crowe2019-08-151-21/+6
| | | | | | | | | Tests are no longer grouped by numeric range[1]. Let's stop saying that and provide some alternative advice for numbering tests. [1] https://curl.haxx.se/mail/lib-2019-08/0043.html Closes #4227
* vauth: Use CURLE_AUTH_ERROR for auth function errorsJay Satiro2019-08-141-1/+2
| | | | | | | | | | | | | | - Add new error code CURLE_AUTH_ERROR. Prior to this change auth function errors were signaled by CURLE_OUT_OF_MEMORY and CURLE_RECV_ERROR, and neither one was technically correct. Ref: https://github.com/curl/curl/pull/3848 Co-authored-by: Dominik Hölzl Closes https://github.com/curl/curl/pull/3864
* http3: make connection reuse workDaniel Stenberg2019-08-092-13/+5
| | | | Closes #4204
* cleanup: s/curl_debug/curl_dbg_debug in comments and docsDaniel Stenberg2019-08-081-3/+3
| | | | | | | | | | Leftovers from the function rename back in 76b63489495 Reported-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/f3e0f071b14fcb46a453f69bdf4e062bcaacf362#com mitcomment-34601751 Closes #4203
* alt-svc: add protocol version selection maskingDaniel Stenberg2019-08-082-4/+4
| | | | | | | | | | | So that users can mask in/out specific HTTP versions when Alt-Svc is used. - Removed "h2c" and updated test case accordingly - Changed how the altsvc struct is laid out - Added ifdefs to make the unittest run even in a quiche-tree Closes #4201
* CURLINFO_RETRY_AFTER: parse the Retry-After header valueDaniel Stenberg2019-08-076-2/+230
| | | | | | | | This is only the libcurl part that provides the information. There's no user of the parsed value. This change includes three new tests for the parser. Ref: #3794
* tests: Fix the line endings for the SASL alt-auth testsJay Satiro2019-08-066-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 grandparent commit which added the tests. Ref: https://github.com/curl/curl/issues/3653 Ref: https://github.com/curl/curl/pull/3790 NOTE: This commit was cherry-picked and is part of a series of commits that added the authzid feature for upcoming 7.66.0. The series was temporarily reverted in db8ec1f so that it would not ship in a 7.65.x patch release. Closes https://github.com/curl/curl/pull/4186
* curl: --sasl-authzid added to support CURLOPT_SASL_AUTHZID from the toolSteve Holme2019-08-067-3/+332
| | | | | | | | | | | | Ref: https://github.com/curl/curl/issues/3653 Ref: https://github.com/curl/curl/pull/3790 NOTE: This commit was cherry-picked and is part of a series of commits that added the authzid feature for upcoming 7.66.0. The series was temporarily reverted in db8ec1f so that it would not ship in a 7.65.x patch release. Closes https://github.com/curl/curl/pull/4186
* curl_multi_poll: a sister to curl_multi_wait() that waits moreDaniel Stenberg2019-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Repeatedly we see problems where using curl_multi_wait() is difficult or just awkward because if it has no file descriptor to wait for internally, it returns immediately and leaves it to the caller to wait for a small amount of time in order to avoid occasional busy-looping. This is often missed or misunderstood, leading to underperforming applications. This change introduces curl_multi_poll() as a replacement drop-in function that accepts the exact same set of arguments. This function works identically to curl_multi_wait() - EXCEPT - for the case when there's nothing to wait for internally, as then this function will by itself wait for a "suitable" short time before it returns. This effectiely avoids all risks of busy-looping and should also make it less likely that apps "over-wait". This also changes the curl tool to use this funtion internally when doing parallel transfers and changes curl_easy_perform() to use it internally. Closes #4163
* http09: disable HTTP/0.9 by default in both tool and libraryDaniel Stenberg2019-08-067-6/+51
| | | | | | | | As the plan has been laid out in DEPRECATED. Update docs accordingly and verify in test 1174. Now requires the option to be set to allow HTTP/0.9 responses. Closes #4191
* alt-svc: more liberal ALPN name parsingDaniel Stenberg2019-08-031-1/+1
| | | | | | | | | Allow pretty much anything to be part of the ALPN identifier. In particular minus, which is used for "h3-20" (in-progress HTTP/3 versions) etc. Updated test 356. Closes #4182
* http_negotiate: improve handling of gss_init_sec_context() failuresKamil Dudka2019-08-013-1/+98
| | | | | | | | | | | | | If HTTPAUTH_GSSNEGOTIATE was used for a POST request and gss_init_sec_context() failed, the POST request was sent with empty body. This commit also restores the original behavior of `curl --fail --negotiate`, which was changed by commit 6c6035532383e300c712e4c1cd9fdd749ed5cf59. Add regression tests 2077 and 2078 to cover this. Fixes #3992 Closes #4171
* curl: cap the maximum allowed values for retry time argumentsDaniel Stenberg2019-07-302-1/+35
| | | | | | | | | | ... to avoid integer overflows later when multiplying with 1000 to convert seconds to milliseconds. Added test 1269 to verify. Reported-by: Jason Lee Closes #4166
* HTTP: use chunked Transfer-Encoding for HTTP_POST if size unknownBalazs Kovacsics2019-07-291-1/+16
| | | | | | | | | If using the read callback for HTTP_POST, and POSTFIELDSIZE is not set, automatically add a Transfer-Encoding: chunked header, same as it is already done for HTTP_PUT, HTTP_POST_FORM and HTTP_POST_MIME. Update test 1514 according to the new behaviour. Closes #4138
* curl: support parallel transfersDaniel Stenberg2019-07-2011-30/+65
| | | | | | | | This is done by making sure each individual transfer is first added to a linked list as then they can be performed serially, or at will, in parallel. Closes #3804
* test1173: make it also check all libcurl option man pagesDaniel Stenberg2019-07-161-1/+1
| | | | | | ... and adjust those that cause errors Closes #4116
* dist: add manpage-syntax.plDaniel Stenberg2019-07-151-1/+1
| | | | follow-up to 7fb66c403
* test1173: detect some basic man page format mistakesDaniel Stenberg2019-07-153-1/+90
| | | | | | Triggered by PR #4111 Closes #4113
* libcurl: Add testcase for gopher redirectsLinos Giannopoulos2019-07-142-1/+52
| | | | | | | | | | | The testcase ensures that redirects to CURLPROTO_GOPHER won't be allowed, by default, in the future. Also, curl is being used for convenience while keeping the testcases DRY. The expected error code is CURLE_UNSUPPORTED_PROTOCOL when the client is redirected to CURLPROTO_GOPHER Signed-off-by: Linos Giannopoulos <lgian@skroutz.gr>
* http: allow overriding timecond with custom headerPeter Simonyi2019-07-144-2/+133
| | | | | | | | | 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
* test1521: adapt to SLISTPOINTDaniel Stenberg2019-06-251-12/+4
| | | | | | | | | The header now has the slist-using options marked as SLISTPOINT so this makes sure test 1521 understands that. Follow-up to ae99b4de1c443ae989 Closes #4074
* tests: update fixed IP for hostip/clientip splitStephan Szabo2019-06-254-8/+8
| | | | | | | These tests give differences for me on linux when using a hostip pointing to the external ip address for the local machine. Closes #4070
* test153: fix content-length to avoid occasional hangDaniel Stenberg2019-06-241-2/+2
| | | | Closes #4065
* tests: add disable-scan.pl to distDaniel Stenberg2019-06-211-1/+1
| | | | | | follow-up from 29177f422a5 Closes #4059
* tests: support non-localhost HOSTIP for dict/smb serversStephan Szabo2019-06-203-4/+10
| | | | | | | | | | | | smbserver.py/dictserver.py were explicitly using localhost/127.0.0.1 for binding the server which when we were running the tests with a separate HOSTIP and CLIENTIP had failures verifying the server from the device we were testing. This changes them to take the address from runtests.py and default to localhost/127.0.0.1 if none is given. Closes #4048
* test1523: basic test of CURLOPT_LOW_SPEED_LIMITDaniel Stenberg2019-06-184-2/+136
|
* runtests: keep logfiles around by defaultDaniel Stenberg2019-06-181-7/+3
| | | | | | | | | | | | | Make '-k' a no-op. The singletest function now clears the log directory BEFORE each individual test and not after, which makes it possible to always keep the logfiles around after a test has been run. No need to specify -k anymore. Keeping the option parsing around to work with users of old habits. Some tests also didn't work properly when -k was used (since the old logs would be kep when a new test starts) which this change also fixes. Closes #4035
* tests: have runtests figure out disabled featuresDaniel Stenberg2019-06-174-315/+168
| | | | | | | | | | | | ... so that runtests can skip individual test cases that test features that are explicitly disabled in this build. This new logic is intended for disabled features that aren't otherwise easily visible through the curl_version_info() or other API calls. tests/server/disabled is a newly built executable that will output a list of disabled features. Outputs nothing for a default build. Closes #3950
* test188/189: fix Content-LengthDaniel Stenberg2019-06-172-4/+4
| | | | | | This cures the flaky test results Closes #4034
* runtests: report single test time + total durationDaniel Stenberg2019-06-151-20/+23
| | | | | | ... after each successful test. Closes #4027
* unit1654: cleanup on memory failureDaniel Stenberg2019-06-131-1/+3
| | | | | | | | ... to make it handle torture tests properly. Reported-by: Marcel Raad Fixes #4021 Closes #4022
* test1165: verify that CURL_DISABLE_ symbols are in syncDaniel Stenberg2019-06-113-2/+123
| | | | | between configure.ac and source code. They should be possible to switch on/off in configure AND be used in source code.
* wolfssl: refer to it as wolfSSL onlyDaniel Stenberg2019-06-102-4/+4
| | | | | | | | | | Remove support for, references to and use of "cyaSSL" from the source and docs. wolfSSL is the current name and there's no point in keeping references to ancient history. Assisted-by: Daniel Gustafsson Closes #3903
* 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