summaryrefslogtreecommitdiff
path: root/tests/server
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix bounce requests with truncated writesMarc Aldorasi2020-01-031-0/+2
| | | | | | | | Prior to this change the swsbounce check in service_connection could fail because prevtestno and prevpartno were not set, which would cause the wrong response data to be sent to some tests and cause them to fail. Ref: https://github.com/curl/curl/pull/4717#issuecomment-570240785
* sws: search for "Testno:" header uncondtionally if no testnoDaniel Stenberg2019-12-191-17/+23
| | | | | | | | | Even if the initial request line wasn't found. With the fix to 1455, the test number is now detected correctly. (Problem found when running tests in random order.) Closes #4744
* tests: make sure checksrc runs on header files tooDaniel Stenberg2019-12-161-1/+1
|
* curl_setup: disable IPv6 resolver without `getaddrinfo`Marcel Raad2019-12-031-3/+3
| | | | | | | | | | Also, use `CURLRES_IPV6` only for actual DNS resolution, not for IPv6 address support. This makes it possible to connect to IPv6 literals by setting `ENABLE_IPV6` even without `getaddrinfo` support. It also fixes the CMake build when using the synchronous resolver without `getaddrinfo` support. Closes https://github.com/curl/curl/pull/4662
* build: Disable Visual Studio warning "conditional expression is constant"Jay Satiro2019-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Disable warning C4127 "conditional expression is constant" globally in curl_setup.h for when building with Microsoft's compiler. This mainly affects building with the Visual Studio project files found in the projects dir. Prior to this change the cmake and winbuild build systems already disabled 4127 globally for when building with Microsoft's compiler. Also, 4127 was already disabled for all build systems in the limited circumstance of the WHILE_FALSE macro which disabled the warning specifically for while(0). This commit removes the WHILE_FALSE macro and all other cruft in favor of disabling globally in curl_setup. Background: We have various macros that cause 0 or 1 to be evaluated, which would cause warning C4127 in Visual Studio. For example this causes it: #define Curl_resolver_asynch() 1 Full behavior is not clearly defined and inconsistent across versions. However it is documented that since VS 2015 Update 3 Microsoft has addressed this somewhat but not entirely, not warning on while(true) for example. Prior to this change some C4127 warnings occurred when I built with Visual Studio using the generated projects in the projects dir. Closes https://github.com/curl/curl/pull/4658
* strerror: Fix an error looking up some Windows error stringsJay Satiro2019-11-091-1/+2
| | | | | | | | | | | | | | | | | | - Use FORMAT_MESSAGE_IGNORE_INSERTS to ignore format specifiers in Windows error strings. Since we are not in control of the error code we don't know what information may be needed by the error string's format specifiers. Prior to this change Windows API error strings which contain specifiers (think specifiers like similar to printf specifiers) would not be shown. The FormatMessage Windows API call which turns a Windows error code into a string could fail and set error ERROR_INVALID_PARAMETER if that error string contained a format specifier. FormatMessage expects a va_list for the specifiers, unless inserts are ignored in which case no substitution is attempted. Ref: https://devblogs.microsoft.com/oldnewthing/20071128-00/?p=24353
* copyrights: update all copyright notices to 2019 on files changed this yearVilhelm Prytz2019-11-021-1/+1
| | | | Closes #4547
* git: add tests/server/disabled to .gitignoreEmil Engler2019-09-301-0/+1
| | | | Closes #4441
* tests: have runtests figure out disabled featuresDaniel Stenberg2019-06-172-1/+82
| | | | | | | | | | | | ... so that runtests can skip individual test cases that test features that are explicitly disabled in this build. This new logic is intended for disabled features that aren't otherwise easily visible through the curl_version_info() or other API calls. tests/server/disabled is a newly built executable that will output a list of disabled features. Outputs nothing for a default build. Closes #3950
* build: fix Codacy warningsMarcel Raad2019-06-051-6/+4
| | | | | | Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
* sws: remove unused variablesMarcel Raad2019-06-051-17/+8
| | | | | | Unused since commit 2f44e94. Closes https://github.com/curl/curl/pull/3975
* tests/server/.gitignore: Add socksd to the ignore listSteve Holme2019-06-021-0/+1
| | | | | | Missed in 04fd6755. Closes #3978
* socksd: Fix typosDaniel Gustafsson2019-04-141-2/+2
| | | | Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* socksd: Properly decorate static variablesDaniel Gustafsson2019-04-141-4/+4
| | | | | | | | Mark global variables static to avoid compiler warning in Clang when using -Wmissing-variable-declarations. Closes #3778 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* socksd: new SOCKS 4+5 server for testsDaniel Stenberg2019-04-132-1/+1171
| | | | Closes #3752
* 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
* pipelining: removedDaniel Stenberg2019-04-061-59/+5
| | | | | | | As previously planned and documented in DEPRECATE.md, all pipelining code is removed. Closes #3651
* makefile: make checksrc and hugefile commands "silent"Daniel Stenberg2019-03-141-2/+7
| | | | | | | ... to match the style already used for compiling, linking etc. Acknowledges 'make V=1' to enable verbose. Closes #3681
* tvnow: silence conversion warningsMarcel Raad2019-01-011-1/+1
| | | | | | MinGW-w64 defaults to targeting Windows 7 now, so GetTickCount64 is used and the milliseconds are represented as unsigned long long, leading to a compiler warning when implicitly converting them to long.
* http: Implement trailing headers for chunked transfersAyoub Boudhar2018-12-141-1/+21
| | | | | | | | | | | | | This adds the CURLOPT_TRAILERDATA and CURLOPT_TRAILERFUNCTION options that allow a callback based approach to sending trailing headers with chunked transfers. The test server (sws) was updated to take into account the detection of the end of transfer in the case of trailing headers presence. Test 1591 checks that trailing headers can be sent using libcurl. Closes #3350
* snprintf: renamed and we now only use msnprintf()Daniel Stenberg2018-11-236-63/+64
| | | | | | | | | | | The function does not return the same value as snprintf() normally does, so readers may be mislead into thinking the code works differently than it actually does. A different function name makes this easier to detect. Reported-by: Tomas Hoger Assisted-by: Daniel Gustafsson Fixes #3296 Closes #3297
* Windows: fixes for MinGW targeting Windows VistaMarcel Raad2018-10-091-1/+2
| | | | | | | Classic MinGW has neither InitializeCriticalSectionEx nor GetTickCount64, independent of the target Windows version. Closes https://github.com/curl/curl/pull/3113
* whitespace fixesViktor Szakats2018-09-235-5/+0
| | | | | | | | | | | - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
* curl-compilers: enable -Wbad-function-cast on GCCMarcel Raad2018-08-211-1/+2
| | | | | | | This warning used to be enabled only for clang as it's a bit stricter on GCC. Silence the remaining occurrences and enable it on GCC too. Closes https://github.com/curl/curl/pull/2747
* http: fix for tiny "HTTP/0.9" responseDaniel Stenberg2018-08-131-3/+12
| | | | | | | | | | | Deal with tiny "HTTP/0.9" (header-less) responses by checking the status-line early, even before a full "HTTP/" is received to allow detecting 0.9 properly. Test 1266 and 1267 added to verify. Fixes #2420 Closes #2872
* CMake: Respect BUILD_SHARED_LIBSRuslan Baratov2018-08-081-1/+1
| | | | | | | | | | Use standard CMake variable BUILD_SHARED_LIBS instead of introducing custom option CURL_STATICLIB. Use '-DBUILD_SHARED_LIBS=%SHARED%' in appveyor.yml. Reviewed-by: Sergei Nikulov Closes #2755
* sws: handle EINTR when calling select()Michael Kaufmann2018-07-291-11/+14
| | | | Closes https://github.com/curl/curl/pull/2808
* CMake: Update scripts to use consistent styleRuslan Baratov2018-07-171-1/+1
| | | | | Closes #2727 Reviewed-by: Sergei Nikulov
* cppcheck: fix warningsMarian Klymov2018-06-117-47/+34
| | | | | | | | | | | | | - Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over etc Closes #2631
* spelling fixesViktor Szakats2018-06-032-8/+8
| | | | | | Detected using the `codespell` tool (version 1.13.0). Also secure and fix an URL.
* cmake: set -d postfix for debug builds if not specifiedSergei Nikulov2018-05-241-6/+0
| | | | | | using -DCMAKE_DEBUG_POSTFIX explicitly fixes #2121, obsoletes #2384
* tests: Fix format specifiersRikard Falkeborn2018-05-141-1/+1
|
* all: Refactor malloc+memset to use callocDaniel Gustafsson2018-04-151-6/+2
| | | | | | | | | | When a zeroed out allocation is required, use calloc() rather than malloc() followed by an explicit memset(). The result will be the same, but using calloc() everywhere increases consistency in the codebase and avoids the risk of subtle bugs when code is injected between malloc and memset by accident. Closes https://github.com/curl/curl/pull/2497
* spelling fixesViktor Szakats2018-02-233-6/+6
| | | | | | | | Detected using the `codespell` tool. Also contains one URL protocol upgrade. Closes https://github.com/curl/curl/pull/2334
* curl_ctype: private is*() type macros and functionsDaniel Stenberg2018-01-291-2/+4
| | | | | | | | ... since the libc provided one are locale dependent in a way we don't want. Also, the "native" isalnum() (for example) works differently on different platforms which caused test 1307 failures on macos only. Closes #2269
* scripts: allow all perl scripts to be run directlyJay Satiro2018-01-071-1/+1
| | | | | | | | - Enable execute permission (chmod +x) - Change interpreter to /usr/bin/env perl Closes https://github.com/curl/curl/pull/2222
* tests: added netinet/in6.h includes in test serversRandall S. Becker2017-12-063-0/+9
|
* timediff: return timediff_t from the time diff functionsDaniel Stenberg2017-10-253-8/+108
| | | | | | | | | | | | | | | ... to cater for systems with unsigned time_t variables. - Renamed the functions to curlx_timediff and Curl_timediff_us. - Added overflow protection for both of them in either direction for both 32 bit and 64 bit time_ts - Reprefixed the curlx_time functions to use Curl_* Reported-by: Peter Piekarski Fixes #2004 Closes #2005
* server/getpart: provide dummy function to build conversion enabledDaniel Stenberg2017-09-151-1/+29
|
* tests: add initial gssapi test using stub implementationIsaac Boukris2017-09-151-1/+14
| | | | | | | | | | | The stub implementation is pre-loaded using LD_PRELOAD and emulates common gssapi uses (only builds if curl is initially built with gssapi support). The initial tests are currently disabled for debug builds as LD_PRELOAD is not used then. Ref: https://github.com/curl/curl/pull/1687
* code style: use spaces around plusesDaniel Stenberg2017-09-115-15/+16
|
* code style: use spaces around equals signsDaniel Stenberg2017-09-117-66/+66
|
* CMake: set MSVC warning level to 4Marcel Raad2017-08-031-0/+4
| | | | | | | | | | | The MSVC warning level defaults to 3 in CMake. Change it to 4, which is consistent with the Visual Studio and NMake builds. Disable level 4 warning C4127 for the library and additionally C4306 for the test servers to get a clean CURL_WERROR build as that warning is raised in some macros in older Visual Studio versions. Ref: https://github.com/curl/curl/pull/1667#issuecomment-314082794 Closes https://github.com/curl/curl/pull/1711
* tests/server/util: fix curltime mistake from 4dee50b9c80f9Daniel Stenberg2017-08-021-1/+1
|
* timeval: struct curltime is a struct timeval replacementDaniel Stenberg2017-07-281-4/+4
| | | | | | | | | ... to make all libcurl internals able to use the same data types for the struct members. The timeval struct differs subtly on several platforms so it makes it cumbersome to use everywhere. Ref: #1652 Closes #1693
* tests/server/resolve.c: fix deprecation warningMarcel Raad2017-07-181-26/+28
| | | | | | | | MSVC warns that gethostbyname is deprecated. Always use getaddrinfo instead to fix this when IPv6 is enabled, also for IPv4 resolves. This is also consistent with what libcurl does. Closes https://github.com/curl/curl/pull/1682
* rtspd: fix GCC warning after MSVC warning fixMarcel Raad2017-07-161-1/+3
| | | | | | | | Older GCC warns: /tests/server/rtspd.c:1194:10: warning: missing braces around initializer [-Wmissing-braces] Fix this by using memset instead of an initializer.
* sockfilt: suppress conversion warning with explicit castMarcel Raad2017-07-161-1/+1
| | | | MSVC warns when implicitly casting -1 to unsigned long.
* rtspd: fix MSVC level 4 warningMarcel Raad2017-07-161-1/+1
| | | | warning C4701: potentially uninitialized local variable 'req' used
* http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASHDaniel Stenberg2017-06-191-0/+8
| | | | | | | | | | | ... to enable sending "OPTIONS *" which wasn't possible previously. This option currently only works for HTTP. Added test cases 1298 + 1299 to verify Fixes #1280 Closes #1462