summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* build: fix Codacy/CppCheck warningsMarcel Raad2019-04-111-1/+3
| | | | | | | | | | - remove unused variables - declare conditionally used variables conditionally - suppress unused variable warnings in the CMake tests - remove dead variable stores - consistently use WIN32 macro to detect Windows Closes https://github.com/curl/curl/pull/3739
* lib557: initialize variablesMarcel Raad2019-04-111-7/+7
| | | | | | These variables are only conditionally initialized. Closes https://github.com/curl/curl/pull/3739
* lib509: add missing include for strdupMarcel Raad2019-04-111-0/+2
| | | | Closes https://github.com/curl/curl/pull/3739
* tests/server/util: fix Windows Unicode buildMarcel Raad2019-04-111-2/+2
| | | | | | | Always use the ANSI version of FormatMessage as we don't have the curl_multibyte gear available here. Closes https://github.com/curl/curl/pull/3758
* xattr: skip unittest on unsupported platformsDaniel Gustafsson2019-04-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | The stripcredentials unittest fails to compile on platforms without xattr support, for example the Solaris member in the buildfarm which fails with the following: CC unit1621-unit1621.o CC ../libtest/unit1621-first.o CCLD unit1621 Undefined first referenced symbol in file stripcredentials unit1621-unit1621.o goto problem 2 ld: fatal: symbol referencing errors. No output written to .libs/unit1621 collect2: error: ld returned 1 exit status gmake[2]: *** [Makefile:996: unit1621] Error 1 Fix by excluding the test on such platforms by using the reverse logic from where stripcredentials() is defined. Closes #3759 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* test: urlapi: urlencode characters above 0x7f correctlyJakub Zakrzewski2019-04-071-0/+4
|
* pipelining: removedDaniel Stenberg2019-04-066-285/+7
| | | | | | | As previously planned and documented in DEPRECATE.md, all pipelining code is removed. Closes #3651
* tests: make Impacket (SMB server) Python 3 compatiblecclauss2019-04-068-335/+352
| | | | | Closes #3731 Fixes #3289
* vauth/oauth2: Fix OAUTHBEARER token generationMert Yazıcıoğlu2019-04-0212-18/+19
| | | | | | | | | | | OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: #2487 Reported-by: Paolo Mossino Closes https://github.com/curl/curl/pull/3377
* tests: Fixed XML validation errors in some test files.Dan Fandrich2019-03-245-2/+6
|
* tests: Fix some incorrect precheck error messages.Dan Fandrich2019-03-245-5/+5
| | | | [ci skip]
* test1541: threaded connection sharingDaniel Stenberg2019-03-184-2/+189
| | | | | | | | | The threaded-shared-conn.c example turned into test case. Only works if pthread was detected. An attempt to detect future regressions such as e3a53e3efb942a5 Closes #3687
* makefile: make checksrc and hugefile commands "silent"Daniel Stenberg2019-03-143-6/+21
| | | | | | | ... to match the style already used for compiling, linking etc. Acknowledges 'make V=1' to enable verbose. Closes #3681
* fuzzer: Only clone the latest fuzzer code, for speed.Dan Fandrich2019-03-141-1/+1
|
* Negotiate: fix for HTTP POST with NegotiateDominik Hölzl2019-03-142-43/+3
| | | | | | | | | | | | | | | | | | | | | | | | * Adjusted unit tests 2056, 2057 * do not generally close connections with CURLAUTH_NEGOTIATE after every request * moved negotiatedata from UrlState to connectdata * Added stream rewind logic for CURLAUTH_NEGOTIATE * introduced negotiatedata::GSS_AUTHDONE and negotiatedata::GSS_AUTHSUCC * Consider authproblem state for CURLAUTH_NEGOTIATE * Consider reuse_forbid for CURLAUTH_NEGOTIATE * moved and adjusted negotiate authentication state handling from output_auth_headers into Curl_output_negotiate * Curl_output_negotiate: ensure auth done is always set * Curl_output_negotiate: Set auth done also if result code is GSS_S_CONTINUE_NEEDED/SEC_I_CONTINUE_NEEDED as this result code may also indicate the last challenge request (only works with disabled Expect: 100-continue and CURLOPT_KEEP_SENDING_ON_ERROR -> 1) * Consider "Persistent-Auth" header, detect if not present; Reset/Cleanup negotiate after authentication if no persistent authentication * apply changes introduced with #2546 for negotiate rewind logic Fixes #1261 Closes #1975
* http: send payload when (proxy) authentication is doneMarc Schlatter2019-03-131-2/+3
| | | | | | | | | | | The check that prevents payload from sending in case of authentication doesn't check properly if the authentication is done or not. They're cases where the proxy respond "200 OK" before sending authentication challenge. This change takes care of that. Fixes #2431 Closes #3669
* test331: verify set-cookie for dotless host nameDaniel Stenberg2019-03-092-1/+66
| | | | | Reproduced bug #3649 Closes #3659
* Revert "cookies: extend domain checks to non psl builds"Daniel Stenberg2019-03-091-1/+0
| | | | | | | This reverts commit 3773de378d48b06c09931e44dca4d274d0bfdce0. Regression shipped in 7.64.0 Fixes #3649
* memdebug: make debug-specific functions use curl_dbg_ prefixDaniel Stenberg2019-03-081-3/+3
| | | | | | | To not "collide" or use up the regular curl_ name space. Also makes them easier to detect in helper scripts. Closes #3656
* tests: fix multiple may be used uninitialized warningsDaniel Stenberg2019-03-056-12/+14
|
* multi: support verbose conncache closure handleJay Satiro2019-03-051-0/+4
| | | | | | | | | | | | | | | | | - Change closure handle to receive verbose setting from the easy handle most recently added via curl_multi_add_handle. The closure handle is a special easy handle used for closing cached connections. It receives limited settings from the easy handle most recently added to the multi handle. Prior to this change that did not include verbose which was a problem because on connection shutdown verbose mode was not acknowledged. Ref: https://github.com/curl/curl/pull/3598 Co-authored-by: Daniel Stenberg Closes https://github.com/curl/curl/pull/3618
* CURLU: fix NULL dereference when used over proxyDaniel Stenberg2019-03-045-2/+137
| | | | | | | | Test 659 verifies Also fixed the test 658 name Closes #3641
* alt-svc: add test 355 and 356 to verify with command line curlDaniel Stenberg2019-03-033-1/+127
|
* alt-svc: the libcurl bitsDaniel Stenberg2019-03-036-2/+197
|
* test578: make it read data from the correct testDaniel Stenberg2019-02-281-1/+1
|
* cookies: only save the cookie file if the engine is enabledDaniel Stenberg2019-02-274-2/+159
| | | | | | | | | | | | | | | | | | | Follow-up to 8eddb8f4259. If the cookieinfo pointer is NULL there really is nothing to save. Without this fix, we got a problem when a handle was using shared object with cookies and is told to "FLUSH" it to file (which worked) and then the share object was removed and when the easy handle was closed just afterwards it has no cookieinfo and no cookies so it decided to save an empty jar (overwriting the file just flushed). Test 1905 now verifies that this works. Assisted-by: Michael Wallner Assisted-by: Marcel Raad Closes #3621
* runtests: detect "schannel" as an alias for "winssl"Daniel Stenberg2019-02-261-15/+3
| | | | | | | | Follow-up to 180501cb02 Reported-by: Marcel Raad Fixes #3609 Closes #3620
* tests: Fixed XML validation errors in some test files.Dan Fandrich2019-02-2115-11/+13
|
* curl: remove MANUAL from -M outputDaniel Stenberg2019-02-201-1/+1
| | | | | | | | | | | | | | | ... and remove it from the dist tarball. It has served its time, it barely gets updated anymore and "everything curl" is now convering all this document once tried to include, and does it more and better. In the compressed scenario, this removes ~15K data from the binary, which is 25% of the -M output. It remains in the git repo for now for as long as the web site builds a page using that as source. It renders poorly on the site (especially for mobile users) so its not even good there. Closes #3587
* connection: never reuse CONNECT_ONLY conectionsDaniel Stenberg2019-02-192-63/+42
| | | | | | | | and make CONNECT_ONLY conections never reuse any existing ones either. Reported-by: Pavel Löbl Bug: https://curl.haxx.se/mail/lib-2019-02/0064.html Closes #3586
* unit1651: survive curl_easy_init() failsDaniel Stenberg2019-02-191-1/+3
|
* cookie: Add support for cookie prefixesDaniel Gustafsson2019-02-171-0/+20
| | | | | | | | | | | The draft-ietf-httpbis-rfc6265bis-02 draft, specify a set of prefixes and how they should affect cookie initialization, which has been adopted by the major browsers. This adds support for the two prefixes defined, __Host- and __Secure, and updates the testcase with the supplied examples from the draft. Closes #3554 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* unit1307: just fail without FTP supportMarcel Raad2019-02-151-9/+22
| | | | | | | | I missed to check this in with commit 71786c0505926aaf7e9b2477b2fb7ee16a915ec6, which only disabled the test. This fixes the actual linker error. Closes https://github.com/curl/curl/pull/3568
* gssapi: fix deprecated header warningsDaniel Stenberg2019-02-141-9/+9
| | | | | | Heimdal includes on FreeBSD spewed out lots of them. Less so now. Closes #3566
* unit1307: require FTP supportMarcel Raad2019-02-131-0/+1
| | | | | | | | This test doesn't link without FTP support after fc7ab4835b5fd09d0a6f57000633bb6bb6edfda1, which made Curl_fnmatch unavailable without FTP support. Closes https://github.com/curl/curl/pull/3565
* tests: add stderr comparison to the test suiteFrank Gevaerts2019-02-113-5/+54
| | | | | | | | | | The code is more or less copied from the stdout comparison code, maybe some better reuse is possible. test 1457 is adjusted to make the output actually match (by using --silent) test 506 used <stderr> without actually needing it, so that <stderr> block is removed Closes #3536
* cli tool: do not use mime.h private structures.Patrick Monnerat2019-02-111-0/+2
| | | | | | | | | | Option -F generates an intermediate representation of the mime structure that is used later to create the libcurl mime structure and generate the --libcurl statements. Reported-by: Daniel Stenberg Fixes #3532 Closes #3546
* cleanup: make local functions staticDaniel Stenberg2019-02-103-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | urlapi: turn three local-only functions into statics conncache: make conncache_find_first_connection static multi: make detach_connnection static connect: make getaddressinfo static curl_ntlm_core: make hmac_md5 static http2: make two functions static http: make http_setup_conn static connect: make tcpnodelay static tests: make UNITTEST a thing to mark functions with, so they can be static for normal builds and non-static for unit test builds ... and mark Curl_shuffle_addr accordingly. url: make up_free static setopt: make vsetopt static curl_endian: make write32_le static rtsp: make rtsp_connisdead static warnless: remove unused functions memdebug: remove one unused function, made another static
* runtests.pl: Fix perl call to include srcdirLadar Levison2019-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | - Use explicit include opt for perl calls. Prior to this change some scripts couldn't find their dependencies. At the top, perl is called using with the "-Isrcdir" option, and it works: https://github.com/curl/curl/blob/curl-7_63_0/tests/runtests.pl#L183 But on line 3868, that option is omitted. This caused problems for me, as the symbol-scan.pl script in particular couldn't find its dependencies properly: https://github.com/curl/curl/blob/curl-7_63_0/tests/runtests.pl#L3868 This patch fixes that oversight by making calls to perl sub-shells uniform. Closes https://github.com/curl/curl/pull/3496
* unit1653: make it survive torture testsDaniel Stenberg2019-01-281-16/+63
|
* tests: move objnames-* from lib into testsDaniel Stenberg2019-01-156-10/+552
| | | | | | | Since they're used purely for testing purposes, I think they should rather be stored there. Closes #3470
* urldata: rename easy_conn to just connDaniel Stenberg2019-01-111-4/+4
| | | | | | | | | | | | | | | We use "conn" everywhere to be a pointer to the connection. Introduces two functions that "attaches" and "detaches" the connection to and from the transfer. Going forward, we should favour using "data->conn" (since a transfer always only has a single connection or none at all) to "conn->data" (since a connection can have none, one or many transfers associated with it and updating conn->data to be correct is error prone and a frequent reason for internal issues). Closes #3442
* test1558: verify CURLINFO_PROTOCOL on file:// transferDaniel Stenberg2019-01-104-2/+120
| | | | | | Attempt to reproduce issue #3444. Closes #3447
* xattr: strip credentials from any URL that is storedDaniel Stenberg2019-01-104-2/+122
| | | | | | | | | Both user and password are cleared uncondtitionally. Added unit test 1621 to verify. Fixes #3423 Closes #3433
* cookies: allow secure override when done over HTTPSDaniel Stenberg2019-01-102-1/+73
| | | | | | | | Added test 1562 to verify. Reported-by: Jeroen Ooms Fixes #3445 Closes #3450
* test1561: improve test nameDaniel Stenberg2019-01-091-1/+1
| | | | [skip ci]
* cookies: skip custom cookies when redirecting cross-siteKatsuhiko YOSHIDA2019-01-092-1/+91
| | | | Closes #3417
* tests: allow tests to pass by 2037-02-12Bernhard M. Wiedemann2019-01-088-23/+23
| | | | | | similar to commit f508d29f3902104018 Closes #3443
* curl_multi_remove_handle() don't block terminating c-ares requestsBrad Spencer2019-01-074-4/+164
| | | | | | | | | Added Curl_resolver_kill() for all three resolver modes, which only blocks when necessary, along with test 1592 to confirm curl_multi_remove_handle() doesn't block unless it must. Closes #3428 Fixes #3371
* printf: fix format specifiersRikard Falkeborn2019-01-042-8/+8
| | | | Closes #3426