aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-11-12CURL-DISABLE: initial docs for the CURL_DISABLE_* definesDaniel Stenberg
The disable-scan script used in test 1165 is extended to also verify that the docs cover all used defines and all defines offered by configure. Reported-by: SLDiggie on github Fixes #4545 Closes #4587
2019-11-10test1558: use double slash after file:Marcel Raad
Classic MinGW / MSYS 1 doesn't support `MSYS2_ARG_CONV_EXCL`, so this test unnecessarily failed when using `file:/` instead of `file:///`. Closes https://github.com/curl/curl/pull/4554
2019-11-09strerror: Fix an error looking up some Windows error stringsJay Satiro
- Use FORMAT_MESSAGE_IGNORE_INSERTS to ignore format specifiers in Windows error strings. Since we are not in control of the error code we don't know what information may be needed by the error string's format specifiers. Prior to this change Windows API error strings which contain specifiers (think specifiers like similar to printf specifiers) would not be shown. The FormatMessage Windows API call which turns a Windows error code into a string could fail and set error ERROR_INVALID_PARAMETER if that error string contained a format specifier. FormatMessage expects a va_list for the specifiers, unless inserts are ignored in which case no substitution is attempted. Ref: https://devblogs.microsoft.com/oldnewthing/20071128-00/?p=24353
2019-11-08test1560: require IPv6 for IPv6 aware URL parsingDaniel Stenberg
The URL parser function can't reject a bad IPv6 address properly when curl was built without IPv6 support. Reported-by: Marcel Raad Fixes #4556 Closes #4572
2019-11-02certs/Server-localhost-lastSAN-sv: regenerate with sha256Marcel Raad
All other certificates were regenerated in commit ba782baac30, but this one was missed. Fixes test3001 on modern systems. Closes https://github.com/curl/curl/pull/4551
2019-11-02copyrights: update all copyright notices to 2019 on files changed this yearVilhelm Prytz
Closes #4547
2019-10-30url: make Curl_close() NULLify the pointer tooDaniel Stenberg
This is the common pattern used in the code and by a unified approach we avoid mistakes. Closes #4534
2019-10-24test1591: fix spelling of http featureMarcel Raad
The test never got run because the feature name is `http` in lowercase. Closes https://github.com/curl/curl/pull/4520
2019-10-23conn-reuse: requests wanting NTLM can reuse non-NTLM connectionsDaniel Stenberg
Added test case 338 to verify. Reported-by: Daniel Silverstone Fixes #4499 Closes #4514
2019-10-23tests: add missing proxy featuresMarcel Raad
2019-10-21tests: use %FILE_PWD for file:// URLsMarcel Raad
This way, we always have exactly one slash after the host name, making the tests pass when curl is compiled with the MSYS GCC. Closes https://github.com/curl/curl/pull/4512
2019-10-21tests: add `connect to non-listen` keywordsMarcel Raad
These tests try to connect to ports nothing is listening on. Closes https://github.com/curl/curl/pull/4511
2019-10-20runtests: get textaware info from curl instead of perlMarcel Raad
The MSYS system on Windows can run the test suite for curl built with any toolset. When built with the MSYS GCC, curl uses Unix line endings, while it uses Windows line endings when built with the MinGW GCC, and `^O` reports 'msys' in both cases. Use the curl executable itself to determine the line endings instead, which reports 'x86_64-pc-msys' when built with the MSYS GCC. Closes https://github.com/curl/curl/pull/4506
2019-10-17test1162: disable MSYS2's POSIX path conversionMarcel Raad
This avoids MSYS2 converting the backslasb in the URL to a slash, causing the test to fail.
2019-10-16url: normalize CURLINFO_EFFECTIVE_URLDaniel Stenberg
The URL extracted with CURLINFO_EFFECTIVE_URL was returned as given as input in most cases, which made it not get a scheme prefixed like before if the URL was given without one, and it didn't remove dotdot sequences etc. Added test case 1907 to verify that this now works as intended and as before 7.62.0. Regression introduced in 7.62.0 Reported-by: Christophe Dervieux Fixes #4491 Closes #4493
2019-10-16tests: line ending fixes for WindowsMarcel Raad
Mark some files as text. Closes https://github.com/curl/curl/pull/4490
2019-10-15tests: use proxy featureMarcel Raad
This makes the tests succeed when using --disable-proxy. Closes https://github.com/curl/curl/pull/4488
2019-10-13smbserver: fix Python 3 compatibilityMarcel Raad
Python 2's `ConfigParser` module is spelled `configparser` in Python 3. Closes https://github.com/curl/curl/pull/4484
2019-10-09tests: use port 2 instead of 60000 for a safer non-listening portDaniel Stenberg
... when the tests want "connection refused".
2019-10-09docs: document it as --no-progress-meter instead of the reverseDaniel Stenberg
Follow-up to 93373a960c3bb4 Reported-by: infinnovation-dev on github Fixes #4474 Closes #4475
2019-10-05curl: ensure HTTP 429 triggers --retryStian Soiland-Reyes
This completes #3794. Also make sure the new tests from #4195 are enabled Closes #4465
2019-10-03urlapi: fix use-after-free bugDaniel Stenberg
Follow-up from 2c20109a9b5d04 Added test 663 to verify. Reported by OSS-Fuzz Bug: https://crbug.com/oss-fuzz/17954 Closes #4453
2019-10-02redirect: when following redirects to an absolute URL, URL encode itDaniel Stenberg
... to make it handle for example (RFC violating) embeded spaces. Reported-by: momala454 on github Fixes #4445 Closes #4447
2019-10-02curl: create easy handles on-demand and not ahead of timeDaniel Stenberg
This should again enable crazy-large download ranges of the style [1-10000000] that otherwise easily ran out of memory starting in 7.66.0 when this new handle allocating scheme was introduced. Reported-by: Peter Sumatra Fixes #4393 Closes #4438
2019-09-30git: add tests/server/disabled to .gitignoreEmil Engler
Closes #4441
2019-09-30altsvc: accept quoted ma and persist valuesDaniel Stenberg
As mandated by the spec. Test 1654 is extended to verify. Closes #4443
2019-09-28cookies: using a share with cookies shouldn't enable the cookie engineDaniel Stenberg
The 'share object' only sets the storage area for cookies. The "cookie engine" still needs to be enabled or activated using the normal cookie options. This caused the curl command line tool to accidentally use cookies without having been told to, since curl switched to using shared cookies in 7.66.0. Test 1166 verifies Updated test 506 Fixes #4429 Closes #4434
2019-09-27FTP: add test for FTPFILE_NOCWD: Avoid redundant CWDsZenju
Add libtest 661 Closes #4417
2019-09-27FTP: url-decode path before evaluationZenju
Closes #4428
2019-09-27tests: fix narrowing conversion warningsMarcel Raad
`timediff_t` is 64 bits wide also on 32-bit systems since commit b1616dad8f0. Closes https://github.com/curl/curl/pull/4415
2019-09-26Revert "FTP: url-decode path before evaluation"Daniel Stenberg
This reverts commit 2f036a72d543e96128bd75cb0fedd88815fd42e2.
2019-09-26FTP: url-decode path before evaluationZenju
Closes #4423
2019-09-24urlapi: question mark within fragment is still fragmentDaniel Stenberg
The parser would check for a query part before fragment, which caused it to do wrong when the fragment contains a question mark. Extended test 1560 to verify. Reported-by: Alex Konev Fixes #4412 Closes #4413
2019-09-19urlapi: CURLU_NO_AUTHORITY allows empty authority/host partJens Finkhaeuser
CURLU_NO_AUTHORITY is intended for use with unknown schemes (i.e. not "file:///") to override cURL's default demand that an authority exists. Closes #4349
2019-09-18FTP: remove trailing slash from path for LIST/MLSDZenju
Closes #4348
2019-09-16unit1655: make it C90 compliantDaniel Stenberg
Unclear why this was not detected in the CI. Follow-up to b7666027296a
2019-09-15doh: fix (harmless) buffer overrunPaul Dreik
Added unit test case 1655 to verify. Close #4352 the code correctly finds the flaws in the old code, if one temporarily restores doh.c to the old version.
2019-09-13FTP: allow "rubbish" prepended to the SIZE responseDaniel Stenberg
This is a protocol violation but apparently there are legacy proprietary servers doing this. Added test 336 and 337 to verify. Reported-by: Philippe Marguinaud Closes #4339
2019-09-13FTP: skip CWD to entry dir when target is absoluteZenju
Closes #4332
2019-09-10urlapi: verify the IPv6 numerical addressDaniel Stenberg
It needs to parse correctly. Otherwise it could be tricked into letting through a-f using host names that libcurl would then resolve. Like '[ab.be]'. Reported-by: Thomas Vegas Closes #4315
2019-08-31Curl_addr2string: take an addrlen argument tooDaniel Stenberg
This allows the function to figure out if a unix domain socket has a file name or not associated with it! When a socket is created with socketpair(), as done in the fuzzer testing, the path struct member is uninitialized and must not be accessed. Bug: https://crbug.com/oss-fuzz/16699 Closes #4283
2019-08-23defines: avoid underscore-prefixed definesDaniel Stenberg
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
2019-08-16http: fix use of credentials from URL when using HTTP proxyDaniel Stenberg
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
2019-08-15tests: Replace outdated test case numbering documentationMike Crowe
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
2019-08-14vauth: Use CURLE_AUTH_ERROR for auth function errorsJay Satiro
- 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
2019-08-09http3: make connection reuse workDaniel Stenberg
Closes #4204
2019-08-08cleanup: s/curl_debug/curl_dbg_debug in comments and docsDaniel Stenberg
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
2019-08-08alt-svc: add protocol version selection maskingDaniel Stenberg
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
2019-08-07CURLINFO_RETRY_AFTER: parse the Retry-After header valueDaniel Stenberg
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
2019-08-06tests: Fix the line endings for the SASL alt-auth testsJay Satiro
- 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