aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-04-29lib: include curl_printf.h as one of the last headersDaniel Stenberg
curl_printf.h defines printf to curl_mprintf, etc. This can cause problems with external headers which may use __attribute__((format(printf, ...))) markers etc. To avoid that they cause problems with system includes, we include curl_printf.h after any system headers. That makes the three last headers to always be, and we keep them in this order: curl_printf.h curl_memory.h memdebug.h None of them include system headers, they all do funny #defines. Reported-by: David Benjamin Fixes #743
2016-04-29curl -J: make it work even without http:// scheme on URLJay Satiro
It does open up a miniscule risk that one of the other protocols that libcurl could use would send back a Content-Disposition header and then curl would act on it even if not HTTP. A future mitigation for this risk would be to allow the callback to ask libcurl which protocol is being used. Verified with test 1312 Closes #760
2016-04-29manpage-scan.pl: also verify the command line option docsDaniel Stenberg
This script now also scans src/tool_getparam.c, docs/curl.1 and src/tool_help.c and will warn if any of them lists a command line option not mentioned in one of the other places.
2016-04-28test1139: verifies libcurl option man page presenceDaniel Stenberg
- checks that each option has its own man page present - checks that each option is mentioned in its corresponding index man page
2016-04-25test1322: verify stripping of trailing dot from host nameDaniel Stenberg
While being debated (in #716) and a violation of RFC 7230 section 5.4, this test verifies that the existing functionality works as intended. It strips the dot from the host name and uses the host without dot throughout the internals.
2016-04-25test148: fixed after the --ftp-create-dirs retry changeDaniel Stenberg
follow-up commit to 3c1e84f569 as it made curl try a little harder
2016-04-24lib1517: checksrc complianceDaniel Stenberg
2016-04-24PolarSSL: Implement public key pinningmoparisthebest
2016-04-20tests: added test1517Karlson2k
... for checking ability to receive full HTTP response when POST request is used with slow read callback function. This test checks for bug #657 and verifies the work-around from 72d5e144fbc6. Closes #720
2016-04-19make/checksrc: use $srcdir, not $top_srcdirDaniel Stenberg
2016-04-18checksrc/makefile.am: use $top_srcdir to find source filesDaniel Stenberg
... to properly support out of source tree builds.
2016-04-17news: CURLOPT_CONNECT_TO and --connect-toMichael Kaufmann
Makes curl connect to the given host+port instead of the host+port found in the URL.
2016-04-03tests: Fixed header files to comply with our code styleSteve Holme
2016-04-03tests: fix make checksrc in servers/Daniel Stenberg
2016-04-03tests: 'make checksrc' now checks server/ tooDaniel Stenberg
2016-04-03tests/server: comply with our code styleDaniel Stenberg
2016-04-03code: style updatesDaniel Stenberg
2016-04-03unit: make unit test source code checksrc compliantDaniel Stenberg
2016-04-03checksrc: run checksrc in tests when 'make checksrc' in rootDaniel Stenberg
2016-04-03lib557: allow too long linesDaniel Stenberg
2016-04-03tests/libtest: follow our code style guidelines betterDaniel Stenberg
... checksrc of all test code is pending.
2016-04-03unit1604: fix snprintfDaniel Stenberg
follow-up to 0326b06 sizeof(pointer) is no good for the buffer size! Reported-by: Viktor Szakats
2016-04-03unittests: Fixed compilation warningsSteve Holme
warning: implicit declaration of function 'sprintf_was_used' [-Wimplicit-function-declaration] Follow up to the modications made to tests/libtest in commit 55452ebdff as we prefer not to use sprintf() now.
2016-04-01curl/mprintf.h: remove support for _MPRINTF_REPLACEDaniel Stenberg
The define is not in our name space and is therefore not protected by our API promises. It was only really used by libcurl internals but was mostly erased from there already in 8aabbf5 (March 2015). This is supposedly the final death blow to that define from everywhere. As a side-effect, making sure _MPRINTF_REPLACE is gone and not used, I made the lib tests in tests/libtest/ use curl_printf.h for its redefine magic and then subsequently the use of sprintf() got banned in the tests as well (as it is in libcurl internals) and I then replaced them all with snprintf(). In the unlikely event that any users is actually using this define and gets sad by this change, it is very easily copied to the user's own code.
2016-03-29build: use roffit 0.11 featureDaniel Stenberg
... load file specified as argument.
2016-03-26sshserver.pl: use quotes for given optionsKarlson2k
Fixed failed redirection of stderr with some options. At least on Msys2, perl fails to redirect stderr if $value contains newline or other weird characters.
2016-03-22Revert "sshserver: remove use of AuthorizedKeysFile2"Daniel Stenberg
It seems we may have some autobuild problems after this commit went in. Trying to see if a revert helps to get them back. This reverts commit 2716350d1f3edc8e929f6ceeee05051090f6d642.
2016-03-21sshserver: remove use of AuthorizedKeysFile2Daniel Stenberg
Support for the (undocumented) AuthorizedKeysFile2 was removed in OpenSSH 5.9, released in September 2011 Closes #715
2016-03-14runtests: mention when run event-basedDaniel Stenberg
2016-03-10cookies: first n/v pair in Set-Cookie: is the cookie, then parametersDaniel Stenberg
RFC 6265 section 4.1.1 spells out that the first name/value pair in the header is the actual cookie name and content, while the following are the parameters. libcurl previously had a more liberal approach which causes significant problems when introducing new cookie parameters, like the suggested new cookie priority draft. The previous logic read all n/v pairs from left-to-right and the first name used that wassn't a known parameter name would be used as the cookie name, thus accepting "Set-Cookie: Max-Age=2; person=daniel" to be a cookie named 'person' while an RFC 6265 compliant parser should consider that to be a cookie named 'Max-Age' with an (unknown) parameter 'person'. Fixes #709
2016-03-08cookie: do not refuse cookies for localhostTim Rühsen
Closes #658
2016-03-06test46: change cookie expiry dateDaniel Stenberg
Since two of the cookies would now otherwise expire and cause the test to fail after commit 20de9b4f09 Discussed in #697
2016-02-23tests/sshserver.pl: use RSA instead of DSA for host authKamil Dudka
DSA is no longer supported by OpenSSH 7.0, which causes all SCP/SFTP test cases to be skipped. Using RSA for host authentication works with both old and new versions of OpenSSH. Reported-by: Karlson2k Closes #676
2016-02-23TFTP: add option to suppress TFTP option requests (Part 2)Jay Satiro
- Add tests. - Add an example to CURLOPT_TFTP_NO_OPTIONS.3. - Add --tftp-no-options to expose CURLOPT_TFTP_NO_OPTIONS. Bug: https://github.com/curl/curl/issues/481
2016-02-22runtests: Fixed usage of %PWD on MinGW64Karlson2k
Closes #672
2016-02-20Enabled test 1437 after the bug fix in commit 3fa220a6Dan Fandrich
2016-02-19Added test 1437 to verify a memory leakDan Fandrich
Reported-by: neex@users.noreply.github.com
2016-02-13test1604: Add to Makefile.inc so it gets runDan Fandrich
2016-02-09tool_doswin: Support for literal path prefix \\?\Jay Satiro
For example something like --output \\?\C:\foo
2016-02-08cookies: allow spaces in cookie names, cut of trailing spacesDaniel Stenberg
It turns out Firefox and Chrome both allow spaces in cookie names and there are sites out there using that. Turned out the code meant to strip off trailing space from cookie names didn't work. Fixed now. Test case 8 modified to verify both these changes. Closes #639
2016-02-08Proxy-Connection: stop sending this header by defaultDaniel Stenberg
RFC 7230 says we should stop. Firefox already stopped. Bug: https://github.com/curl/curl/issues/633 Reported-By: Brad Fitzpatrick Closes #633
2016-02-05unit1604: Fix unit setup return codeJay Satiro
2016-02-05tool_doswin: Improve sanitization processingJay Satiro
- Add unit test 1604 to test the sanitize_file_name function. - Use -DCURL_STATICLIB when building libcurltool for unit testing. - Better detection of reserved DOS device names. - New flags to modify sanitize behavior: SANITIZE_ALLOW_COLONS: Allow colons SANITIZE_ALLOW_PATH: Allow path separators and colons SANITIZE_ALLOW_RESERVED: Allow reserved device names SANITIZE_ALLOW_TRUNCATE: Allow truncating a long filename - Restore sanitization of banned characters from user-specified outfile. Prior to this commit sanitization of a user-specified outfile was temporarily disabled in 2b6dadc because there was no way to allow path separators and colons through while replacing other banned characters. Now in such a case we call the sanitize function with SANITIZE_ALLOW_PATH which allows path separators and colons to pass through. Closes https://github.com/curl/curl/issues/624 Reported-by: Octavio Schroeder
2016-02-04URLs: change more http to httpsViktor Szakats
2016-02-04URLs: follow GitHub project rename (also Travis CI)Viktor Szakats
Closes #632
2016-02-02URLs: change more http to httpsViktor Szakats
2016-02-03URLs: change all http:// URLs to https://Daniel Stenberg
2016-02-02dotdot: allow an empty input string tooDaniel Stenberg
It isn't used by the code in current conditions but for safety it seems sensible to at least not crash on such input. Extended unit test 1395 to verify this too as well as a plain "/" input.
2016-01-18tests: Add a test for pinnedpubkey fail even when insecureJay Satiro
Because disabling the peer verification (--insecure) must not disable the public key pinning check (--pinnedpubkey).
2016-01-11lib: Prefix URLs with lower-case protocol names/schemesMohammad AlSaleh
Before this patch, if a URL does not start with the protocol name/scheme, effective URLs would be prefixed with upper-case protocol names/schemes. This behavior might not be expected by library users or end users. For example, if `CURLOPT_DEFAULT_PROTOCOL` is set to "https". And the URL is "hostname/path". The effective URL would be "HTTPS://hostname/path" instead of "https://hostname/path". After this patch, effective URLs would be prefixed with a lower-case protocol name/scheme. Closes #597 Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>