aboutsummaryrefslogtreecommitdiff
path: root/tests/server
AgeCommit message (Collapse)Author
2014-01-26sockfilt.c: fixed and simplified Windows select functionMarc Hoersken
Since the previous complex select function with initial support for non-socket file descriptors, did not actually work correctly for Console handles, this change simplifies the whole procedure by using an internal waiting thread for the stdin console handle. The previous implementation made it continuously trigger for the stdin handle if it was being redirected to a parent process instead of an actual Console input window. This approach supports actual Console input handles as well as anonymous Pipe handles which are used during input redirection. It depends on the fact that ReadFile supports trying to read zero bytes which makes it wait for the handle to become ready for reading.
2013-11-03base64: Fixed compilation warnings when using Curl_base64_decode()Steve Holme
curl_sasl.c:294: warning: dereferencing type-punned pointer will break strict-aliasing rules getpart.c:201: warning: dereferencing type-punned pointer will break strict-aliasing rules
2013-11-02getpart: Fixed base64 encoded parts following commit e17c1b25bc33ebSteve Holme
2013-08-22tftpd: support "writedelay" within <servercmd>Daniel Stenberg
2013-08-22tftpd: convert 6 global variables into local onesDaniel Stenberg
2013-07-19WIN32 MemoryTracking: require UNICODE for wide strdup code supportYang Tse
2013-07-18Reinstate "WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usage".Yang Tse
This reverts commit 7ed25cc, reinstating commit 8ec2cb5. As of 18-jul-2013 we still do have code in libcurl that makes use of these memory functions. Commit 8ec2cb5 comment still applies and is yet valid. These memory functions are solely used in Windows builds, so all related code is protected with '#ifdef WIN32' preprocessor conditional compilation directives. Specifically, wcsdup() _wcsdup() are used when building a Windows target with UNICODE and USE_WINDOWS_SSPI preprocessor symbols defined. This is the case when building a Windows UNICODE target with Windows native SSL/TLS support enabled. Realizing that wcsdup() _wcsdup() are used is a bit tricky given that usage of these is hidden behind _tcsdup() which is MS way of dealing with code that must tolerate UNICODE and non-UNICODE compilation. Additionally, MS header files and those compatible from other compilers use this preprocessor conditional compilation directive in order to select at compilation time whether 'wide' or 'ansi' MS API functions are used. Without this code, Windows build targets with Windows native SSL/TLS support enabled and MemoryTracking support enabled misbehave in tracking memory usage, regardless of being a UNICODE enabled build or not.
2013-07-17cmake: Fix for MSVC2010 project generationSergei Nikulov
Fixed issue with static build for MSVC2010. After some investigation I've discovered known issue http://public.kitware.com/Bug/view.php?id=11240 When .rc file is linked to static lib it fails with following linker error LINK : warning LNK4068: /MACHINE not specified; defaulting to X86 file.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' Fix add target property /MACHINE: for MSVC generation. Also removed old workarounds - it caused errors during msvc build. Bug: http://curl.haxx.se/mail/lib-2013-07/0046.html
2013-06-04sws: support extracting test number from CONNECT ipv6-address!Daniel Stenberg
If an ipv6-address is provided to CONNECT, the last hexadecimal group in the address will be used as the test number! For example the address "[1234::ff]" would be treated as test case 255.
2013-05-12Revert "WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usage"Daniel Stenberg
This reverts commit 8ec2cb5544b86306b702484ea785b6b9596562ab. We don't have any code anywhere in libcurl (or the curl tool) that use wcsdup so there's no such memory use to track. It seems to cause mild problems with the Borland compiler though that we may avoid by reverting this change again. Bug: http://curl.haxx.se/mail/lib-2013-05/0070.html
2013-04-06sockfilt.c: Fixed detection of client-side connection closeMarc Hoersken
WINSOCK only: Since FD_CLOSE is only signaled once, it may trigger at the same time as FD_READ. Data actually being available makes it impossible to detect that the connection was closed by checking that recv returns zero. Another recv attempt could block the connection if it was not closed. This workaround abuses exceptfds in conjunction with readfds to signal that the connection has actually closed.
2013-04-06sockfilt.c: Reduce CPU load while running under a Windows PIPEMarc Hoersken
2013-04-06tftpd.c: Apply sread timeout to the whole data transfer sessionMarc Hoersken
2013-04-06tftpd.c: Follow up cleanup and restore of previous sockoptMarc Hoersken
2013-04-06tftpd.c: Fixed sread timeout on Windows by setting it manuallyMarc Hoersken
2013-04-06util.c: Revert workaround eeefcdf, 6eb56e7 and e3787e8Marc Hoersken
2013-04-06util.c: Follow up cleanup on eeefcdfMarc Hoersken
2013-04-06cpp: use #ifdef __MINGW32__ to avoid compiler complaintsDaniel Stenberg
... instead of just #if
2013-04-06util.c: Made write_pidfile write the correct PID on MinGW/MsysMarc Hoersken
This workaround fixes an issue on MinGW/Msys regarding the Perl testsuite scripts not being able to signal or control the server processes. The MinGW Perl runtime only sees the Msys processes and their corresponding PIDs, but sockfilt (and other servers) wrote the Windows PID into their PID-files. Since this PID is useless to the testsuite, the write_pidfile function was changed to search for the Msys PID and write that into the PID-file.
2013-04-05sockfilt.c: Fixed handling of multiple fds being signaledMarc Hoersken
2013-04-04sockfilt.c: Added wrapper functions to fix Windows console issuesMarc Hoersken
The new read and write wrapper functions support reading from stdin and writing to stdout/stderr on Windows by using the appropriate Windows API functions and data types.
2013-03-27test1509: verify proxy header response headers countDaniel Stenberg
Modified sws to support and use custom CONNECT responses instead of the previously naive hard-coded version. Made the HTTP test server able to extract test case number from the host name in a CONNECT request by finding the number after the last dot. It makes 'machine.moo.123' use test case 123. Adapted a larger amount of tests to the new <connect> style. Bug: http://curl.haxx.se/bug/view.cgi?id=1204 Reported by: Martin Jansen
2013-03-25WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usageYang Tse
As of 25-mar-2013 wcsdup() _wcsdup() and _tcsdup() are only used in WIN32 specific code, so tracking of these has not been extended for other build targets. Without this fix, memory tracking system on WIN32 builds, when using these functions, would provide misleading results. In order to properly extend this support for all targets curl.h would have to define curl_wcsdup_callback prototype and consequently wchar_t should be visible before that in curl.h. IOW curl_wchar_t defined in curlbuild.h and this pulling whatever system header is required to get wchar_t definition. Additionally a new curl_global_init_mem() function that also receives user defined wcsdup() callback would be required.
2013-03-15HTTP proxy: insert slash in URL if missingDaniel Stenberg
curl has been accepting URLs using slightly wrong syntax for a long time, such as when completely missing as slash "http://example.org" or missing a slash when a query part is given "http://example.org?q=foobar". curl would translate these into a legitimate HTTP request to servers, although as was shown in bug #1206 it was not adjusted properly in the cases where a HTTP proxy was used. Test 1213 and 1214 were added to the test suite to verify this fix. The test HTTP server was adjusted to allow us to specify test number in the host name only without using any slashes in a given URL. Bug: http://curl.haxx.se/bug/view.cgi?id=1206 Reported by: ScottJi
2013-02-04cmake: Fix mingw buildMatt Arsenault
2013-01-20Makefile.inc: fix $(top_srcdir) not allowed in _SOURCES variablesYang Tse
2013-01-11sockfilt.c: log file descriptor number on read/write errorYang Tse
2013-01-09test servers: handle W32/W64 SIGBREAK with exit_signal_handlerYang Tse
2013-01-09test servers: fix errno, ERRNO and SOCKERRNO usage for W32/W64Yang Tse
2013-01-09sockfilt.c: fix some W64 compiler warningsYang Tse
2013-01-09build: fix circular header inclusion with other packagesYang Tse
This commit renames lib/setup.h to lib/curl_setup.h and renames lib/setup_once.h to lib/curl_setup_once.h. Removes the need and usage of a header inclusion guard foreign to libcurl. [1] Removes the need and presence of an alarming notice we carried in old setup_once.h [2] ---------------------------------------- 1 - lib/setup_once.h used __SETUP_ONCE_H macro as header inclusion guard up to commit ec691ca3 which changed this to HEADER_CURL_SETUP_ONCE_H, this single inclusion guard is enough to ensure that inclusion of lib/setup_once.h done from lib/setup.h is only done once. Additionally lib/setup.h has always used __SETUP_ONCE_H macro to protect inclusion of setup_once.h even after commit ec691ca3, this was to avoid a circular header inclusion triggered when building a c-ares enabled version with c-ares sources available which also has a setup_once.h header. Commit ec691ca3 exposes the real nature of __SETUP_ONCE_H usage in lib/setup.h, it is a header inclusion guard foreign to libcurl belonging to c-ares's setup_once.h The renaming this commit does, fixes the circular header inclusion, and as such removes the need and usage of a header inclusion guard foreign to libcurl. Macro __SETUP_ONCE_H no longer used in libcurl. 2 - Due to the circular interdependency of old lib/setup_once.h and the c-ares setup_once.h header, old file lib/setup_once.h has carried back from 2006 up to now days an alarming and prominent notice about the need of keeping libcurl's and c-ares's setup_once.h in sync. Given that this commit fixes the circular interdependency, the need and presence of mentioned notice is removed. All mentioned interdependencies come back from now old days when the c-ares project lived inside a curl subdirectory. This commit removes last traces of such fact.
2013-01-08sockfilt.c: fix some compiler warningsYang Tse
2013-01-07tests/server/sockfilt.c: Fixed integer comparison warningMarc Hoersken
2013-01-07tests/server/sockfilt.c: Include required Win32 headersMarc Hoersken
2013-01-06tests/server/sockfilt.c: Fixed support for listening socketsMarc Hoersken
This commit fixes support for sockets that are ready to accept a new connection and have previously been put into listening mode. It also includes changes which are the result of investigation regarding Windows STDIN. These changes are the preparation for further improvements regarding support for reading data from STDIN on Windows. Open issue: WaitForMultipleObjectsEx does not support PIPE handles which are returned by GetStdHandle while running without a GUI.
2013-01-06tests/server/sockfilt.c: Set Windows Console to binary modeMarc Hoersken
2013-01-06tests/server/sockfilt.c: Improved log error messagesMarc Hoersken
Include error code and parameters in error messages.
2013-01-06Revert changes relative to lib/*.[ch] recent renamingYang Tse
This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bbfde follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
2013-01-03build: make use of 93 lib/*.c renamed filesYang Tse
93 *.c source files renamed to use our standard naming scheme. This change affects 77 files in libcurl's source tree.
2012-12-28build: make use of 76 lib/*.h renamed filesYang Tse
76 private header files renamed to use our standard naming scheme. This change affects 322 files in libcurl's source tree.
2012-12-26sockfilt.c: commit b44da5a82a follow-up 2Yang Tse
2012-12-26sockfilt.c: commit b44da5a82a follow-upYang Tse
2012-12-26sockfilt.c: fix some compiler warningsYang Tse
2012-12-25socklift.c: Quick fix to re-add missing codeMarc Hoersken
2012-12-25socklift.c: Added select_ws function to support WindowsMarc Hoersken
WinSock select() does not support standard file descriptors, it can only check SOCKETs. The following function is an attempt to create a select() function with support for other handles.
2012-12-14setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>Yang Tse
Inclusion of top two most included header files now done in setup_once.h
2012-12-04build: explain current role of LIBS in our Makefile.am filesYang Tse
BLANK_AT_MAKETIME may be used in our Makefile.am files to blank LIBS variable used in generated makefile at makefile processing time. Doing this functionally prevents LIBS from being used for all link targets in given makefile.
2012-11-29build: prevent global LIBS from influencing test server build targetsYang Tse
2012-11-28build: fix Windows build targets damaged since commit 550e403f00Yang Tse
2012-11-28build: avoid linkage of directly unused librariesYang Tse