aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-03-06test1260: removed errant XML tagDan Fandrich
2017-03-06URL: return error on malformed URLs with junk after port numberDaniel Stenberg
... because it causes confusion with users. Example URLs: "http://[127.0.0.1]:11211:80" which a lot of languages' URL parsers will parse and claim uses port number 80, while libcurl would use port number 11211. "http://user@example.com:80@localhost" which by the WHATWG URL spec will be treated to contain user name 'user@example.com' but according to RFC3986 is user name 'user' for the host 'example.com' and then port 80 is followed by "@localhost" Both these formats are now rejected, and verified so in test 1260. Reported-by: Orange Tsai
2017-03-04tests: fixed a typo in some commentsDan Fandrich
2017-02-27tests: enable HTTP/2 tests to run with non-default port numbersDan Fandrich
2017-02-26test1139: allow for the possibility that the man page is not rebuiltDan Fandrich
This is likely to be the case when building from a tar ball release package which includes a prebuilt man page. In that case, test the packaged man page instead. This only makes a difference when building out-of-tree (in-tree, the location in both cases is identical).
2017-02-25tests: use consistent environment variables for setting charsetDan Fandrich
The character set in POSIX is set by the locale defined by (in decreasing order of precedence) the LC_ALL, LC_CTYPE and LANG environment variables (CHARSET was used by libidn but not libidn2). LC_ALL is cleared to ensure that LC_CTYPE takes effect, but LC_ALL is not used to set the locale to ensure that other parts of the locale aren't overridden. Since there doesn't seem to be a cross-platform way of specifying a UTF-8 locale, and not all systems may support UTF-8, a <precheck> is used to skip the test if UTF-8 can't be verified to be available. Test 1035 was also converted to UTF-8 for consistency, as the actual character set used there is irrelevant to the test. This patch uses a different UTF-8 locale than the last attempt, namely en_US.UTF-8. This one has been verified on 7 different Linux and BSD distributions and is more complete and usable than the locale UTF-8 (on at least some systems).
2017-02-25test557: explicitly use the C locale so the numeric output is as expectedDan Fandrich
2017-02-24Revert "tests: use consistent environment variables for setting charset"Daniel Stenberg
This reverts commit ecd1d020abdae3c3ce3643ddab3106501e62e7c0. That commit caused test failures on my Debian Linux machine for all changed test cases. We need to reconsider how that should get done.
2017-02-23tests: use consistent environment variables for setting charsetDan Fandrich
Character set in POSIX is set by the locale defined (in decreasing order of precedence) by the LC_ALL, LC_CTYPE and LANG environment variables (I believe CHARSET is only historic). LC_ALL is cleared to ensure that LC_CTYPE takes effect, but LC_ALL is not used to set the locale to ensure that other parts of the locale aren't overriden, if set. Since there doesn't seem to be a cross-platform way of specifying a UTF-8 locale, and not all systems may support UTF-8, a <precheck> is used (where relevant) to skip the test if UTF-8 isn't in use. Test 1035 was also converted to UTF-8 for consistency, as the actual character set used there is irrelevant to the test.
2017-02-23tests: Set CHARSET & LANG to UTF-8 in 1035, 2046 and 2047İsmail Dönmez
Closes #1283 Fixes #1277
2017-02-20digest_sspi: Fix nonce-count generation in HTTP digestMax Khon
- on the first invocation: keep security context returned by InitializeSecurityContext() - on subsequent invocations: use MakeSignature() instead of InitializeSecurityContext() to generate HTTP digest response Bug: https://github.com/curl/curl/issues/870 Reported-by: Andreas Roth Closes https://github.com/curl/curl/pull/1251
2017-02-18tests: removed the obsolete name parameterDan Fandrich
2017-02-18proxy: fix hostname resolution and IDN conversionMichael Kaufmann
Properly resolve, convert and log the proxy host names. Support the "--connect-to" feature for SOCKS proxies and for passive FTP data transfers. Follow-up to cb4e2be Reported-by: Jay Satiro Fixes https://github.com/curl/curl/issues/1248
2017-02-17http: fix missing 'Content-Length: 0' while negotiating authIsaac Boukris
- While negotiating auth during PUT/POST if a user-specified Content-Length header is set send 'Content-Length: 0'. This is what we do already in HTTPREQ_POST_FORM and what we did in the HTTPREQ_POST case (regression since afd288b). Prior to this change no Content-Length header would be sent in such a case. Bug: https://curl.haxx.se/mail/lib-2017-02/0006.html Reported-by: Dominik Hölzl Closes https://github.com/curl/curl/pull/1242
2017-02-15tool_urlglob: Allow a glob range with the same start and stopJay Satiro
For example allow ranges like [1-1] and [a-a] etc. Regression since 5ca96cb. Bug: https://github.com/curl/curl/issues/1238 Reported-by: R. Dennis Steed
2017-02-10URL: only accept ";options" in SMTP/POP3/IMAP URL schemesDaniel Stenberg
Fixes #1252
2017-02-07test1139: Added the --manual keyword since the manual is requiredDan Fandrich
2017-02-07test552: Fix typosDaniel Gustafsson
Closes https://github.com/curl/curl/pull/1245
2017-02-06cmdline-opts: Fixed build and test in out of source tree buildsDan Fandrich
2017-01-27cookies: do not assume a valid domain has a dotDaniel Stenberg
This repairs cookies for localhost. Non-PSL builds will now only accept "localhost" without dots, while PSL builds okeys everything not listed as PSL. Added test 1258 to verify. This was a regression brought in a76825a5efa6b4
2017-01-19sws: use SOCKERRNO, not errnoDaniel Stenberg
Reported-by: Gisle Vanem
2017-01-15http2: disable server push if not requestedAlessandro Ghedini
Ref: https://github.com/curl/curl/pull/1160
2017-01-13url: --noproxy option overrides NO_PROXY environment variableERAMOTO Masaya
Under condition using http_proxy env var, noproxy list was the combination of --noproxy option and NO_PROXY env var previously. Since this commit, --noproxy option overrides NO_PROXY environment variable even if use http_proxy env var. Closes #1140
2017-01-13url: Fix NO_PROXY env var to work properly with --proxy option.ERAMOTO Masaya
The combination of --noproxy option and http_proxy env var works well both for proxied hosts and non-proxied hosts. However, when combining NO_PROXY env var with --proxy option, non-proxied hosts are not reachable while proxied host is OK. This patch allows us to access non-proxied hosts even if using NO_PROXY env var with --proxy option.
2017-01-12url: Fix parsing for when 'file' is the default protocolJay Satiro
Follow-up to 3463408. Prior to 3463408 file:// hostnames were silently stripped. Prior to this commit it did not work when a schemeless url was used with file as the default protocol. Ref: https://curl.haxx.se/mail/lib-2016-11/0081.html Closes https://github.com/curl/curl/pull/1124 Also fix for drive letters: - Support --proto-default file c:/foo/bar.txt - Support file://c:/foo/bar.txt - Fail when a file:// drive letter is detected and not MSDOS/Windows. Bug: https://github.com/curl/curl/issues/1187 Reported-by: Anatol Belski Assisted-by: Anatol Belski
2017-01-09sws: retry send() on EWOULDBLOCKDaniel Stenberg
Fixes spurious test 1060 and 1061 failures on OpenBSD, Solaris and more. Bug: https://curl.haxx.se/mail/lib-2017-01/0009.html Reported-by: Christian Weisgerber
2017-01-08lib506: fix build for Open WatcomJiří Malák
Rename symbol lock to locks to not clash with OW CRTL function name. Closes #1196
2016-12-24test1282: verify the ftp-gss checkDaniel Stenberg
2016-12-22lib557.c: use a shorter MAXIMIZE representationDaniel Stenberg
Since several compilers had problems with the previous one Reported-by: Ray Satiro Bug: https://curl.haxx.se/mail/lib-2016-12/0098.html
2016-12-21runtests: remove the valgrind parserDaniel Stenberg
Old legacy parsing that 1) hid problems for us and 2) probably isn't needed anymore.
2016-12-21tests/Makefile: run checksrc on debug buildsDaniel Stenberg
... just like we already do in src/ and lib/
2016-12-21lib557: move the "enable LONGLINE" to allow more long linesDaniel Stenberg
This file is riddled with them...
2016-12-19tests: checksrc complianceJay Satiro
2016-12-19printf: fix floating point buffer overflow issuesDaniel Stenberg
... and add a bunch of floating point printf tests
2016-12-18curl_easy_recv: Improve documentation and example programMichael Kaufmann
Follow-up to 82245ea: Fix the example program sendrecv.c (handle CURLE_AGAIN, handle incomplete send). Improve the documentation for curl_easy_recv() and curl_easy_send(). Reviewed-by: Frank Meier Assisted-by: Jay Satiro See https://github.com/curl/curl/pull/1134
2016-12-17manpage-scan.pl: allow deprecated options to get removed from curl.1Daniel Stenberg
--krb4, --ftp-ssl and --ftp-ssl-reqd no longer need to be documented in the man page
2016-12-14checksrc: warn for assignments within if() expressionsDaniel Stenberg
... they're already frowned upon in our source code style guide, this now enforces the rule harder.
2016-12-13checksrc: stricter no-space-before-paren enforcementDaniel Stenberg
In order to make the code style more uniform everywhere
2016-12-05test2032: Mark test as flakyDan Fandrich
2016-12-02test1281: added http as a required featureDan Fandrich
2016-12-02curl: support zero-length argument strings in config filesDaniel Stenberg
... like 'user-agent = ""' Adjusted test 71 to verify.
2016-12-01tests: fix CONNECT test cases to be more strictDaniel Stenberg
... as they broke with the cleaned up CONNECT handling
2016-12-01CONNECT: reject TE or CL in 2xx responsesDaniel Stenberg
A server MUST NOT send any Transfer-Encoding or Content-Length header fields in a 2xx (Successful) response to CONNECT. (RFC 7231 section 4.3.6) Also fixes the three test cases that did this.
2016-12-01URL parser: reject non-numerical port numbersDaniel Stenberg
Test 1281 added to verify
2016-11-30runtests: made Servers: output be more consistent by removing OFFDan Fandrich
2016-11-30CURLOPT_CONNECT_TO: Skip non-matching "connect-to" entries properlyMichael Kaufmann
If a port number in a "connect-to" entry does not match, skip this entry instead of connecting to port 0. If a port number in a "connect-to" entry matches, use this entry and look no further. Reported-by: Jay Satiro Assisted-by: Jay Satiro, Daniel Stenberg Closes #1148
2016-11-28lib1536: checksrc complianceJay Satiro
2016-11-26tests: Add some testcases for recent new features.Frank Gevaerts
Add missing tests for CURLINFO_SCHEME, CURLINFO_PROTOCOL, %{scheme}, and %{http_version} closes #1143
2016-11-24test1135: Fix curl_easy_duphandle prototype for code styleJay Satiro
Follow-up to dbadaeb which changed the style.
2016-11-24checksrc: move open braces to comply with function declaration styleDaniel Stenberg