summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* lib: include curl_printf.h as one of the last headersDaniel Stenberg2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | 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
* curl -J: make it work even without http:// scheme on URLJay Satiro2016-04-291-1/+1
| | | | | | | | | | | | | 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
* manpage-scan.pl: also verify the command line option docsDaniel Stenberg2016-04-291-1/+161
| | | | | | 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.
* test1139: verifies libcurl option man page presenceDaniel Stenberg2016-04-283-1/+154
| | | | | | | - checks that each option has its own man page present - checks that each option is mentioned in its corresponding index man page
* test1322: verify stripping of trailing dot from host nameDaniel Stenberg2016-04-252-2/+59
| | | | | | | 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.
* test148: fixed after the --ftp-create-dirs retry changeDaniel Stenberg2016-04-251-0/+1
| | | | follow-up commit to 3c1e84f569 as it made curl try a little harder
* lib1517: checksrc complianceDaniel Stenberg2016-04-241-2/+3
|
* PolarSSL: Implement public key pinningmoparisthebest2016-04-241-0/+1
|
* tests: added test1517Karlson2k2016-04-204-2/+189
| | | | | | | | | | ... 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
* make/checksrc: use $srcdir, not $top_srcdirDaniel Stenberg2016-04-193-3/+3
|
* checksrc/makefile.am: use $top_srcdir to find source filesDaniel Stenberg2016-04-183-3/+3
| | | | ... to properly support out of source tree builds.
* news: CURLOPT_CONNECT_TO and --connect-toMichael Kaufmann2016-04-175-1/+284
| | | | | Makes curl connect to the given host+port instead of the host+port found in the URL.
* tests: Fixed header files to comply with our code styleSteve Holme2016-04-032-3/+3
|
* tests: fix make checksrc in servers/Daniel Stenberg2016-04-032-2/+4
|
* tests: 'make checksrc' now checks server/ tooDaniel Stenberg2016-04-031-0/+1
|
* tests/server: comply with our code styleDaniel Stenberg2016-04-039-210/+240
|
* code: style updatesDaniel Stenberg2016-04-0348-140/+140
|
* unit: make unit test source code checksrc compliantDaniel Stenberg2016-04-0312-67/+110
|
* checksrc: run checksrc in tests when 'make checksrc' in rootDaniel Stenberg2016-04-033-2/+12
|
* lib557: allow too long linesDaniel Stenberg2016-04-031-4/+7
|
* tests/libtest: follow our code style guidelines betterDaniel Stenberg2016-04-0371-661/+682
| | | | ... checksrc of all test code is pending.
* unit1604: fix snprintfDaniel Stenberg2016-04-031-2/+2
| | | | | | | | follow-up to 0326b06 sizeof(pointer) is no good for the buffer size! Reported-by: Viktor Szakats
* unittests: Fixed compilation warningsSteve Holme2016-04-031-2/+2
| | | | | | | | 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.
* curl/mprintf.h: remove support for _MPRINTF_REPLACEDaniel Stenberg2016-04-0113-134/+143
| | | | | | | | | | | | | | | | | | | 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.
* build: use roffit 0.11 featureDaniel Stenberg2016-03-291-2/+2
| | | | ... load file specified as argument.
* sshserver.pl: use quotes for given optionsKarlson2k2016-03-261-1/+1
| | | | | | 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.
* Revert "sshserver: remove use of AuthorizedKeysFile2"Daniel Stenberg2016-03-221-1/+3
| | | | | | | 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.
* sshserver: remove use of AuthorizedKeysFile2Daniel Stenberg2016-03-211-3/+1
| | | | | | | Support for the (undocumented) AuthorizedKeysFile2 was removed in OpenSSH 5.9, released in September 2011 Closes #715
* runtests: mention when run event-basedDaniel Stenberg2016-03-141-1/+2
|
* cookies: first n/v pair in Set-Cookie: is the cookie, then parametersDaniel Stenberg2016-03-102-2/+2
| | | | | | | | | | | | | | | | | | | 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
* cookie: do not refuse cookies for localhostTim Rühsen2016-03-081-0/+1
| | | | Closes #658
* test46: change cookie expiry dateDaniel Stenberg2016-03-061-4/+4
| | | | | | | Since two of the cookies would now otherwise expire and cause the test to fail after commit 20de9b4f09 Discussed in #697
* tests/sshserver.pl: use RSA instead of DSA for host authKamil Dudka2016-02-233-10/+10
| | | | | | | | | | 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
* TFTP: add option to suppress TFTP option requests (Part 2)Jay Satiro2016-02-233-1/+88
| | | | | | | | | | - 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
* runtests: Fixed usage of %PWD on MinGW64Karlson2k2016-02-221-1/+1
| | | | Closes #672
* Enabled test 1437 after the bug fix in commit 3fa220a6Dan Fandrich2016-02-201-1/+0
|
* Added test 1437 to verify a memory leakDan Fandrich2016-02-193-1/+86
| | | | Reported-by: neex@users.noreply.github.com
* test1604: Add to Makefile.inc so it gets runDan Fandrich2016-02-131-1/+1
|
* tool_doswin: Support for literal path prefix \\?\Jay Satiro2016-02-091-0/+19
| | | | For example something like --output \\?\C:\foo
* cookies: allow spaces in cookie names, cut of trailing spacesDaniel Stenberg2016-02-081-1/+3
| | | | | | | | | | | | 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
* Proxy-Connection: stop sending this header by defaultDaniel Stenberg2016-02-08100-162/+0
| | | | | | | | | RFC 7230 says we should stop. Firefox already stopped. Bug: https://github.com/curl/curl/issues/633 Reported-By: Brad Fitzpatrick Closes #633
* unit1604: Fix unit setup return codeJay Satiro2016-02-051-1/+1
|
* tool_doswin: Improve sanitization processingJay Satiro2016-02-053-1/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* URLs: change more http to httpsViktor Szakats2016-02-042-3/+3
|
* URLs: follow GitHub project rename (also Travis CI)Viktor Szakats2016-02-042-3/+3
| | | | Closes #632
* URLs: change more http to httpsViktor Szakats2016-02-021-2/+2
|
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-03183-189/+189
|
* dotdot: allow an empty input string tooDaniel Stenberg2016-02-021-1/+4
| | | | | | | 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.
* tests: Add a test for pinnedpubkey fail even when insecureJay Satiro2016-01-182-1/+42
| | | | | Because disabling the peer verification (--insecure) must not disable the public key pinning check (--pinnedpubkey).
* lib: Prefix URLs with lower-case protocol names/schemesMohammad AlSaleh2016-01-111-1/+1
| | | | | | | | | | | | | | | | | | 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>