summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* url: a short host name + port is not a schemeDaniel Stenberg2018-11-066-43/+29
| | | | | | | | | | | | | | | | | | | The function identifying a leading "scheme" part of the URL considered a few letters ending with a colon to be a scheme, making something like "short:80" to become an unknown scheme instead of a short host name and a port number. Extended test 1560 to verify. Also fixed test203 to use file_pwd to make it get the correct path on windows. Removed test 2070 since it was a duplicate of 203. Assisted-by: Marcel Raad Reported-by: Hagai Auro Fixes #3220 Fixes #3233 Closes #3223 Closes #3235
* netrc: don't ignore the login name specified with "--user"Michael Kaufmann2018-11-051-13/+38
| | | | | | | | | | | | - for "--netrc", don't ignore the login/password specified with "--user", only ignore the login/password in the URL. This restores the netrc behaviour of curl 7.61.1 and earlier. - fix the documentation of CURL_NETRC_REQUIRED - improve the detection of login/password changes when reading .netrc - don't read .netrc if both login and password are already set Fixes #3213 Closes #3224
* unittest: make 1652 stable across collationsDaniel Gustafsson2018-11-051-2/+2
| | | | | | | | | | | | The previous coding used a format string whose output depended on the current locale of the environment running the test. Since the gist of the test is to have a format string, with the actual formatting being less important, switch to a more stable formatstring with decimals. Reported-by: Marcel Raad Closes #3234 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
* Revert "url: a short host name + port is not a scheme"Daniel Stenberg2018-11-051-3/+0
| | | | | | | This reverts commit 226cfa8264cd979eff3fd52c0f3585ef095e7cf2. This commit caused test failures on appveyor/windows. Work on fixing them is in #3235.
* symbols-in-versions: add missing CURLU_ symbolsDaniel Stenberg2018-11-041-1/+3
| | | | | | | | ...and fix symbol-scan.pl to also scan urlapi.h Reported-by: Alexey Melnichuk Fixes #3226 Closes #3230
* infof: clearly indicate truncationDaniel Gustafsson2018-11-034-2/+161
| | | | | | | | | | | | | | | | | | The internal buffer in infof() is limited to 2048 bytes of payload plus an additional byte for NULL termination. Servers with very long error messages can however cause truncation of the string, which currently isn't very clear, and leads to badly formatted output. This appends a "...\n" (or just "..." in case the format didn't with a newline char) marker to the end of the string to clearly show that it has been truncated. Also include a unittest covering infof() to try and catch any bugs introduced in this quite important function. Closes #3216 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
* url: a short host name + port is not a schemeDaniel Stenberg2018-11-031-0/+3
| | | | | | | | | | | | The function identifying a leading "scheme" part of the URL considered a few letters ending with a colon to be a scheme, making something like "short:80" to become an unknown scheme instead of a short host name and a port number. Extended test 1560 to verify. Reported-by: Hagai Auro Fixes #3220 Closes #3223
* URL: fix IPv6 numeral address parserDaniel Stenberg2018-11-031-0/+9
| | | | | | | | Regression from 46e164069d1a52. Extended test 1560 to verify. Reported-by: tpaukrt on github Fixes #3218 Closes #3219
* Curl_follow: accept non-supported schemes for "fake" redirectsDaniel Stenberg2018-11-022-1/+59
| | | | | | | | | | When not actually following the redirect and the target URL is only stored for later retrieval, curl always accepted "non-supported" schemes. This was a regression from 46e164069d1a5230. Reported-by: Brad King Fixes #3210 Closes #3215
* axtls: removedDaniel Stenberg2018-11-013-21/+2
| | | | | | | | | | As has been outlined in the DEPRECATE.md document, the axTLS code has been disabled for 6 months and is hereby removed. Use a better supported TLS library! Assisted-by: Daniel Gustafsson Closes #3194
* tests: drop http_pipe.py script no longer usedKamil Dudka2018-11-012-442/+1
| | | | | | It is unused since commit f7208df7d9d5cd5e15e2d89237e828f32b63f135. Closes #3204
* runtests: use the local curl for verifyingDaniel Stenberg2018-10-311-1/+1
| | | | | | | | | ... revert the mistaken change brought in commit 8440616f53. Reported-by: Alessandro Ghedini Bug: https://curl.haxx.se/mail/lib-2018-10/0118.html Closes #3198
* test2080: verify the fix for CVE-2018-16842Daniel Stenberg2018-10-302-4/+2
|
* unit1650: fix "null pointer passed as argument 1 to memcmp"Daniel Stenberg2018-10-291-1/+1
| | | | | | Detected by UndefinedBehaviorSanitizer Closes #3187
* unit1300: fix stack-use-after-scope AddressSanitizer warningDaniel Stenberg2018-10-291-3/+4
| | | | Closes #3186
* test1651: unit test Curl_extract_certinfo()Daniel Stenberg2018-10-274-2/+417
| | | | The version used for Gskit, NSS, GnuTLS, WolfSSL and schannel.
* Windows: fixes for MinGW targeting Windows VistaMarcel Raad2018-10-091-1/+2
| | | | | | | Classic MinGW has neither InitializeCriticalSectionEx nor GetTickCount64, independent of the target Windows version. Closes https://github.com/curl/curl/pull/3113
* FILE: fix CURLOPT_NOBODY and CURLOPT_HEADER outputDaniel Stenberg2018-10-0829-69/+65
| | | | | | | | | | | | | | | Now FILE transfers send headers to the header callback like HTTP and other protocols. Also made curl_easy_getinfo(...CURLINFO_PROTOCOL...) work for FILE in the callbacks. Makes "curl -i file://.." and "curl -I file://.." work like before again. Applied the bold header logic to them too. Regression from c1c2762 (7.61.0) Reported-by: Shaun Jackman Fixes #3083 Closes #3101
* runtests: skip ld_preload tests on macOSDaniel Gustafsson2018-10-071-1/+1
| | | | | | | | | | The LD_PRELOAD functionality doesn't exist on macOS, so skip any tests requiring it. Fixes #2394 Closes #3106 Reported-by: Github user @jakirkham Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* test2100: test DoH using IPv4-onlyDaniel Stenberg2018-10-061-0/+0
| | | | | | | | | To make it only send one DoH request and avoid the race condition that could lead to the requests getting sent in reversed order and thus making it hard to compare in the test case. Fixes #3107 Closes #3108
* tests/FILEFORMAT: mention how to use <fileN> and <stripfileN> tooDaniel Stenberg2018-10-061-0/+19
| | | | [ci skip]
* doh: keep the IPv4 address in (original) network byte orderDaniel Stenberg2018-10-051-8/+8
| | | | | | | | Ideally this will fix the reversed order shown in SPARC tests: resp 8: Expected 127.0.0.1 got 1.0.0.127 Closes #3091
* CMake: suppress MSVC warning C4127 for libtestMarcel Raad2018-10-051-0/+4
| | | | It's issued by older Windows SDKs (prior to version 8.0).
* test320: strip out more HTML when comparingDaniel Stenberg2018-10-041-20/+4
| | | | | | | | To make the test case work with different gnutls-serv versions better. Reported-by: Kamil Dudka Fixes #3093 Closes #3094
* runtests: use Windows paths for Windows curlMarcel Raad2018-10-041-1/+1
| | | | | curl generated by CMake's Visual Studio generator has "Windows" in the version number.
* tests/negtelnetserver.py: fix Python2-ism in neg TELNET serverColin Hogben2018-10-041-21/+12
| | | | | | | | Fix problems caused by differences in treatment of bytes objects between python2 and python3. Fixes #2929 Closes #3080
* test1299: use single quotes around asteriskMarcel Raad2018-10-021-1/+1
| | | | Ref: https://github.com/curl/curl/issues/1751#issuecomment-321522580
* runtests: ignore disabled even when ranges are givenDaniel Stenberg2018-10-021-8/+17
| | | | | | | | | | | runtests.pl support running a range of tests, like "44 to 127". Starting now, the code makes sure that even such given ranges will ignore tests that are marked as disabled. Disabled tests can still be run by explictly specifying that test number. Closes #3075
* test1650: make it depend on http/2Daniel Stenberg2018-10-012-0/+12
| | | | | | | Follow-up to 570008c99da0ccbb as it gets link errors. Reported-by: Michael Kaufmann Closes #3068
* test2100: require http2 to runDaniel Stenberg2018-09-292-1/+1
| | | | | | Reported-by: Marcel Raad Fixes #3064 Closes #3065
* cmake: fixed path used in generation of docs/tests during curl build through ↵Sergei Nikulov2018-09-281-2/+2
| | | | add_subdicectory(...)
* test320: fix regression in [ci skip]Viktor Szakats2018-09-241-2/+2
| | | | | | | | The value in question is coming directly from `gnutls-serv`, so it cannot be modified freely. Reported-by: Marcel Raad Ref: https://github.com/curl/curl/commit/6ae6b2a533e8630afbb21f570305bd4ceece6348#commitcomment-30621004
* Curl_dedotdotify(): always nul terminate returned string.Even Rouault2018-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes potential out-of-buffer access on "file:./" URL $ valgrind curl "file:./" ==24516== Memcheck, a memory error detector ==24516== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==24516== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==24516== Command: /home/even/install-curl-git/bin/curl file:./ ==24516== ==24516== Conditional jump or move depends on uninitialised value(s) ==24516== at 0x4C31F9C: strcmp (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24516== by 0x4EBB315: seturl (urlapi.c:801) ==24516== by 0x4EBB568: parseurl (urlapi.c:861) ==24516== by 0x4EBC509: curl_url_set (urlapi.c:1199) ==24516== by 0x4E644C6: parseurlandfillconn (url.c:2044) ==24516== by 0x4E67AEF: create_conn (url.c:3613) ==24516== by 0x4E68A4F: Curl_connect (url.c:4119) ==24516== by 0x4E7F0A4: multi_runsingle (multi.c:1440) ==24516== by 0x4E808E5: curl_multi_perform (multi.c:2173) ==24516== by 0x4E7558C: easy_transfer (easy.c:686) ==24516== by 0x4E75801: easy_perform (easy.c:779) ==24516== by 0x4E75868: curl_easy_perform (easy.c:798) Was originally spotted by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10637 Credit to OSS-Fuzz Closes #3039
* update URLs in testsViktor Szakats2018-09-234-5/+5
| | | | | | - and one in docs/MANUAL as well Closes https://github.com/curl/curl/pull/3038
* whitespace fixesViktor Szakats2018-09-2367-104/+39
| | | | | | | | | | | - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
* unit1650: fix out of boundary accessDaniel Stenberg2018-09-231-4/+4
| | | | | Fixes #2987 Closes #3035
* url: use the URL API internally as wellDaniel Stenberg2018-09-223-5/+5
| | | | | | ... to make it a truly unified URL parser. Closes #3017
* urlapi: fix support for address scope in IPv6 numerical addressesDaniel Stenberg2018-09-211-0/+3
| | | | Closes #3024
* certs: generate tests certs with sha256 digest algorithmDaniel Stenberg2018-09-2038-825/+835
| | | | | | | | As OpenSSL 1.1.1 starts to complain and fail on sha1 CAs: "SSL certificate problem: CA signature digest algorithm too weak" Closes #3014
* urlapi: document the error codes, remove two unused onesDaniel Stenberg2018-09-191-20/+20
| | | | | Assisted-by: Daniel Gustafsson Closes #3019
* urlapi: add CURLU_GUESS_SCHEME and fix hostname acceptanceDaniel Stenberg2018-09-192-1/+31
| | | | | | | | | | | | | | | In order for this API to fully work for libcurl itself, it now offers a CURLU_GUESS_SCHEME flag that makes it "guess" scheme based on the host name prefix just like libcurl always did. If there's no known prefix, it will guess "http://". Separately, it relaxes the check of the host name so that IDN host names can be passed in as well. Both these changes are necessary for libcurl itself to use this API. Assisted-by: Daniel Gustafsson Closes #3018
* libtest: Add chkdecimalpoint to .gitignoreRikard Falkeborn2018-09-151-0/+1
| | | | Closes #2998
* runtests.pl: run tests against the MesaLink vtls backendYiming Jing2018-09-131-0/+5
|
* urlglob: improve error messageDaniel Stenberg2018-09-131-1/+3
| | | | | | | | | to help user understand what the problem is Reported-by: Daniel Shahaf Fixes #2763 Closes #2977
* tests/certs: rebuild certs with 2048-bit RSA keysYiming Jing2018-09-1243-787/+1065
| | | | | | | | | | | The previous test certificates contained RSA keys of only 1024 bits. However, RSA claims that 1024-bit RSA keys are likely to become crackable some time before 2010. The NIST recommends at least 2048-bit keys for RSA for now. Better use full 2048 also for testing. Closes #2973
* misc: fix typos in commentsDaniel Gustafsson2018-09-101-1/+1
| | | | Closes #2963
* test324: fix after 3f3b26d6feb0667714902e836af608094235fca2Marcel Raad2018-09-081-1/+1
| | | | The expected error code is now 60. 51 is dead.
* URL-APIDaniel Stenberg2018-09-085-0/+799
| | | | | | | See header file and man pages for API. All documented API details work and are tested in the 1560 test case. Closes #2842
* curl_easy_upkeep: removed 'conn' from the nameDaniel Stenberg2018-09-071-1/+1
| | | | | | | ... including the associated option. Fixes #2951 Closes #2952
* upkeep: add a connection upkeep API: curl_easy_conn_upkeep()Max Dymond2018-09-071-1/+2
| | | | | | | | | Add functionality so that protocols can do custom keepalive on their connections, when an external API function is called. Add docs for the new options in 7.62.0 Closes #1641