aboutsummaryrefslogtreecommitdiff
path: root/tests/server
AgeCommit message (Collapse)Author
2017-05-01getpart: use correct variable typeMarcel Raad
This fixes the following clang warning: getpart.c:201:17: warning: cast from function call of type 'CURLcode' to non-matching type 'int' [-Wbad-function-cast]
2017-04-17code: fix typos and style in commentsDaniel Gustafsson
A few random typos, and minor whitespace cleanups, found in comments while reading code. Closes #1423
2017-04-12tests/server/util: prefer <poll.h> over <sys/poll.h>Marcel Raad
Follow-up to aa573c3c55cda72ec5ef677d87f6f46a53385f0c Ref: https://github.com/curl/curl/pull/1406
2017-04-03tests/server/util: remove in6addr_any for recent MinGWMarcel Raad
In ancient MinGW versions, in6addr_any was declared as extern, but not defined. Because of that, 22a0c57746ae12506b1ba0f0fafffd26c1907d6a added definitions for in6addr_any when compiling with MinGW. The bug was fixed in w32api version 3.6 from 2006, so this workaround is not needed anymore for recent versions. This fixes the following MinGW-w64 warnings because the MinGW-w64 version of IN6ADDR_ANY_INIT has the two additional braces inside the macro: util.c:59:14: warning: braces around scalar initializer util.c:59:40: warning: excess elements in scalar initializer Ref: https://sourceforge.net/p/mingw/mingw-org-wsl/ci/e4803e0da25c57ae1ad0fa75ae2b7182ff7fa339/tree/w32api/ChangeLog Closes https://github.com/curl/curl/pull/1379
2017-01-19sws: use SOCKERRNO, not errnoDaniel Stenberg
Reported-by: Gisle Vanem
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
2016-12-19tests: checksrc complianceJay Satiro
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-11-24checksrc: white space edits to comply to stricter checksrcDaniel Stenberg
2016-11-24checksrc: code style: use 'char *name' styleDaniel Stenberg
2016-11-12tests: fixed variable might be clobbered warningDan Fandrich
This stops the compiler from potentially making invalid assumptions about the immutability of sdp and sap across the longjmp boundary.
2016-11-07s/cURL/curlDaniel Stenberg
We're mostly saying just "curl" in lower case these days so here's a big cleanup to adapt to this reality. A few instances are left as the project could still formally be considered called cURL.
2016-10-31tests/util: get a private strncasecompare cloneDaniel Stenberg
... since the curlx_* code no longer provides one and we don't link libcurl to these test servers.
2016-10-31strcasecompare: is the new name for strequal()Daniel Stenberg
... to make it less likely that we forget that the function actually does case insentive compares. Also replaced several invokes of the function with a plain strcmp when case sensitivity is not an issue (like comparing with "-").
2016-06-22internals: rename the SessionHandle struct to Curl_easyDaniel Stenberg
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-03tests: fix make checksrc in servers/Daniel Stenberg
2016-04-03tests/server: comply with our code styleDaniel Stenberg
2016-02-04URLs: change more http to httpsViktor Szakats
2016-02-03URLs: change all http:// URLs to https://Daniel Stenberg
2015-12-23sockfilt.c: fix calculation of sleep timeout on WindowsMarc Hoersken
Not converting to double caused small timeouts to be skipped.
2015-12-23tftpd server: add Windows support by writing files in binary modeMarc Hoersken
2015-12-16sockfilt.c: added some debug output to select_wsMarc Hoersken
2015-12-16sockfilt.c: keep lines shorter than 80 charsMarc Hoersken
2015-12-16sockfilt.c: do not wait on unreliable file or pipe handleMarc Hoersken
The previous implementation caused issues on modern MSYS2 runtimes.
2015-11-06tftp tests: verify sent options tooDaniel Stenberg
The tftpd test server now logs all received options and thus all TFTP test cases need to match them exactly. Extended test 283 to use and verify --tftp-blksize.
2015-08-18gitignore: Sort for readabilityJay Satiro
find . -name .gitignore -print0 | xargs -i -0 sort -o '{}' '{}'
2015-06-25tests: Distribute CMakeLists.txt files in subdirectoriesRoger Leigh
2015-04-27sws: init http2 state properlyDaniel Stenberg
It would otherwise cause problems when running tests after 1801 etc.
2015-03-16Bug #149: Deletion of unnecessary checks before calls of the function "free"Markus Elfring
The function "free" is documented in the way that no action shall occur for a passed null pointer. It is therefore not needed that a function caller repeats a corresponding check. http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first This issue was fixed by using the software Coccinelle 1.0.0-rc24. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2015-02-25sws: timeout idle CONNECT connectionsDaniel Stenberg
2015-02-24sws: stop logging about TPC_NODELAY nonsenseDaniel Stenberg
2014-12-28sockfilt.c: Fixed compilation warningsSteve Holme
sockfilt.c:288: warning: conversion to 'DWORD' from 'size_t' may alter its value sockfilt.c:291: warning: conversion to 'DWORD' from 'size_t' may alter its value sockfilt.c:323: warning: conversion to 'DWORD' from 'size_t' may alter its value sockfilt.c:326: warning: conversion to 'DWORD' from 'size_t' may alter its value
2014-12-27code/docs: Use correct case for IPv4 and IPv6Steve Holme
For consistency, as we seem to have a bit of a mixed bag, changed all instances of ipv4 and ipv6 in comments and documentations to use the correct case.
2014-12-26code/docs: Use Unix rather than UNIX to avoid use of the trademarkSteve Holme
Use Unix when generically writing about Unix based systems as UNIX is the trademark and should only be used in a particular product's name.
2014-12-26sockfilt.c: Reduce the number of individual memory allocationsMarc Hoersken
Merge multiple internal arrays into one, even if some variables will not not be used. They are all created with the number of file descriptors as their size. Also fix possible thread handle leak in CloseHandle-loop.
2014-12-26sockfilt.c: Replace 100ms sleep with thread throttleMarc Hoersken
Improves performance of test cases 574 and 575 by 50%. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. http://msdn.microsoft.com/library/windows/desktop/ms686307.aspx
2014-12-21sockfilt.c: use non-Ex functions that are available before WinXPMarc Hoersken
It was initially reported by Guenter that GetFileSizeEx requires (_WIN32_WINNT >= 0x0500) to be true.
2014-12-10sws.c: Fixed 'rc' may be used uninitialized warningDan Fandrich
2014-12-06sws.c: Fixed compilation warningSteve Holme
sws.c:2191 warning: 'rc' may be used uninitialized in this function
2014-12-04libcurl: add UNIX domain sockets supportPeter Wu
The ability to do HTTP requests over a UNIX domain socket has been requested before, in Apr 2008 [0][1] and Sep 2010 [2]. While a discussion happened, no patch seems to get through. I decided to give it a go since I need to test a nginx HTTP server which listens on a UNIX domain socket. One patch [3] seems to make it possible to use the CURLOPT_OPENSOCKETFUNCTION function to gain a UNIX domain socket. Another person wrote a Go program which can do HTTP over a UNIX socket for Docker[4] which uses a special URL scheme (though the name contains cURL, it has no relation to the cURL library). This patch considers support for UNIX domain sockets at the same level as HTTP proxies / IPv6, it acts as an intermediate socket provider and not as a separate protocol. Since this feature affects network operations, a new feature flag was added ("unix-sockets") with a corresponding CURL_VERSION_UNIX_SOCKETS macro. A new CURLOPT_UNIX_SOCKET_PATH option is added and documented. This option enables UNIX domain sockets support for all requests on the handle (replacing IP sockets and skipping proxies). A new configure option (--enable-unix-sockets) and CMake option (ENABLE_UNIX_SOCKETS) can disable this optional feature. Note that I deliberately did not mark this feature as advanced, this is a feature/component that should easily be available. [0]: http://curl.haxx.se/mail/lib-2008-04/0279.html [1]: http://daniel.haxx.se/blog/2008/04/14/http-over-unix-domain-sockets/ [2]: http://sourceforge.net/p/curl/feature-requests/53/ [3]: http://curl.haxx.se/mail/lib-2008-04/0361.html [4]: https://github.com/Soulou/curl-unix-socket Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04sws: try to remove socket and retry bindPeter Wu
If sws is killed it might leave a stale socket file on the filesystem which would cause an EADDRINUSE error. After this patch, it is checked whether the socket is really stale and if so, the socket file gets removed and another bind is executed. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04sws: add UNIX domain socket supportPeter Wu
This extends sws with a --unix-socket option which causes the port to be ignored (as the server now listens on the path specified by --unix-socket). This feature will be available in the following patch that enables checking for UNIX domain socket support. Proxy support (CONNECT) is not considered nor tested. It does not make sense anyway, first connecting through a TCP proxy, then let that TCP proxy connect to a UNIX socket. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04sws: restrict TCP_NODELAY to IP socketsPeter Wu
TCP_NODELAY does not make sense for Unix sockets, so enable it only if the socket is using IP. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-03sws.c: Fixed compilation warning when IPv6 is disabledSteve Holme
sws.c:69: warning: comma at end of enumerator list
2014-11-30sws: move away from IPv4/IPv4-only assumptionPeter Wu
Instead of depending the socket domain type on use_ipv6, specify the domain type (AF_INET / AF_INET6) as variable. An enum is used here with switch to avoid compiler warnings in connect_to, complaining that rc is possibly undefined (which is not possible as socket_domain is always set). Besides abstracting the socket type, make the debugging messages be independent on IP (introduce location_str which points to "port XXXXX"). Rename "ipv_inuse" to "socket_type" and tighten the scope (main). Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-20sws: initial tiny steps toward http2 supportDaniel Stenberg
2014-11-10cmake: add ENABLE_THREADED_RESOLVER, rename ARESPeter Wu
Fix detection of the AsynchDNS feature which not just depends on pthreads support, but also on whether USE_POSIX_THREADS is set or not. Caught by test 1014. This patch adds a new ENABLE_THREADED_RESOLVER option (corresponding to --enable-threaded-resolver of autotools) which also needs a check for HAVE_PTHREAD_H. For symmetry with autotools, CURL_USE_ARES is renamed to ENABLE_ARES (--enable-ares). Checks that test for the availability actually use USE_ARES instead as that is the result of whether a-res is available or not (in practice this does not matter as CARES is marked as required package, but nevertheless it is better to write the intent). Signed-off-by: Peter Wu <peter@lekensteyn.nl>