aboutsummaryrefslogtreecommitdiff
path: root/tests/server
AgeCommit message (Collapse)Author
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
2012-11-06uniformly use AM_CPPFLAGS, avoid deprecated INCLUDESDave Reisner
Since automake 1.12.4, the warnings are issued on running automake: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') Avoid INCLUDES and roll these flags into AM_CPPFLAGS. Compile tested on: Ubuntu 10.04 (automake 1:1.11.1-1) Ubuntu 12.04 (automake 1:1.11.3-1ubuntu2) Arch Linux (automake 1.12.4)
2012-09-11sws.c: Fixed warning: 'err' may be used uninitialized in this functionMarc Hoersken
2012-08-08Fix some compiler warnings.Guenter Knauf
2012-08-07sws: close sockets properlyJoe Mason
Fix a bug where closed sockets (fd -1) were left in the all_sockets list, because of missing parens in a pointer arithmetic expression Reenable the tests that were locking up due to this bug.
2012-08-07Remove debug logs that were accidentally checked inJoe Mason
2012-08-07Use select in sws, which has better cross-platform support than pollJoe Mason
2012-08-07Use cross-platform curlx_nonblock instead of fcntl in swsJoe Mason
2012-08-02Add a polling loop in main to read from more than one socket at once. Add ↵Joe Mason
the O_NONBLOCK and SO_KEEPALIVE flag to all sockets. Note that several loops which used to continue on a return value of 0 (theoretical since 0 would never be returned without O_NONBLOCK) now break on 0 so that they won't continue reading until after poll is called again.
2012-08-02Change return values of get_request, accept_connection and ↵Joe Mason
service_connection to add a return code for non-blocking sockets: now -1 means error or connection finished, 1 means data was read, and 0 means there is no data available now so need to wait for poll (new return value)
2012-08-02Hoist the loop out of get_request, and make sure that it can be reentered ↵Joe Mason
when a request is half-finished. Note the the req struct used to be re-initialized AFTER reading pipeline data, so now that we initialize it from the caller we must be careful not to overwrite the pipeline data. Also we now need to handle the case where the buffer is already full when get_request is called - previously this never happened as it was always called with an empty buffer and looped until done. Now get_request is called in a loop, so the next step is to run the loop on a socket only when poll signals it is readable.
2012-08-02Move blocks of code from the sws main loop into their own functions for ↵Joe Mason
easier refactoring later. The next step will be to call the correct function after a poll, rather than looping unconditionally
2012-08-02Remove the --fork option of sws, since it makes refactoring to use poll more ↵Joe Mason
complicated and should be redundant once we poll
2012-07-12SWS: use of uninitialized memory fixDaniel Stenberg
I made "connmon" not get initialized properly before use, and I use the big hammer and make sure we always clear the entire struct to avoid any problem like this in the future.
2012-07-12connection-monitor: always log disconnect when enabledDaniel Stenberg
This makes verifying easier and makes us more sure curl closes the connection only at the correct point in time. Adjusted test 206 and 1008 accordingly and updated the docs for it.
2012-07-05sws: support <servercmd> for CONNECT requestsDaniel Stenberg
I moved out the servercmd parsing into a its own function called parse_servercmd() and made sure it gets used also when the test number is extracted from CONNECT requests. It turned out sws didn't do that previously!
2012-07-05sws: add 'connection-monitor' command supportDaniel Stenberg
Using this, the server will output in the protocol log when the connection gets disconnected and thus we will verify correctly in the test cases that the connection doesn't get closed prematurely. This is important for example NTLM to work. Documentation added to FILEFORMAT, test 503 updated to use this.
2012-04-14headers: require GCC 2.7 or newer in order to allow attribute GCC'isms usageYang Tse
Usage in other code paths already protected and requiring even newer versions.
2012-04-12configure: NATIVE_WINDOWS no longer defined in config filesYang Tse
2012-04-11build adjustments: functionally revert commits 4d3fb91f and bbfe1182Yang Tse
Undefining CURL_HIDDEN_SYMBOLS in source files isn't the proper fix.
2012-04-10test servers: build adjustmentYang Tse
Undefine CURL_HIDDEN_SYMBOLS libcurl private preprocessor macro that might leak from lib/setup.h into source files where this should not be defined.
2012-03-22SWS: refuse to serve CONNECT unless running as proxyDaniel Stenberg
2012-01-17sws.c: fix proxy mode secondary connection monitoring conditionYang Tse
2012-01-16sws.c: improve proxy mode torture testing support - followup to 18c6c8a5Yang Tse
2012-01-16sws.c: improve proxy mode torture testing support - followup to c731fc58Yang Tse