Commit Graph

132 Commits

Author SHA1 Message Date
Yang Tse 3ca0b9bb47 fix compiler warning 2009-06-11 17:46:33 +00:00
Yang Tse af41fb79b5 Include <arpa/inet.h> if HAVE_ARPA_INET_H is defined 2009-04-27 23:59:41 +00:00
Dan Fandrich 640974fb28 If a HTTP request is Basic and num is already >=1000, the HTTP test server
adds 1 to num to get the data section to return. This allows testing
authentication negotiations using the Basic authentication method.
2008-11-25 23:23:47 +00:00
Dan Fandrich 88513d2d1a Fixed some compiler warnings with gcc 2008-10-01 17:34:24 +00:00
Yang Tse 57ee847ce7 Avoid the use of the '? :' operator inside the call to our
test-server logging function. It doesn't work on some systems.
2008-09-26 11:21:22 +00:00
Yang Tse 985bd18904 attempt to avoid HTTP server startup misdetection on some systems 2008-09-26 01:08:24 +00:00
Yang Tse b6f29bef06 fix compiler warning: defined but not used 2008-09-21 02:35:20 +00:00
Yang Tse fe5f448015 fix compiler warning: external definition with no prior declaration 2008-09-20 12:33:02 +00:00
Yang Tse a6c915aab9 fix compiler warning: external declaration in primary source file 2008-09-18 16:21:09 +00:00
Yang Tse 8733e087d7 fix print formatting string directives 2008-09-04 05:29:10 +00:00
Daniel Stenberg c67a99ff27 - When libcurl was doing a HTTP POST and the server would respond with
"Connection: close" and actually close the connection after the
  response-body, libcurl could still have outstanding data to send and it
  would not properly notice this and stop sending. This caused weirdness and
  sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222

  Note that there are still reasons to consider libcurl's behavior when
  getting a >= 400 response code while sending data, as Craig Perras' note
  "http upload: how to stop on error" specifies:
  http://curl.haxx.se/mail/archive-2008-08/0138.html
2008-08-29 10:47:59 +00:00
Dan Fandrich 1f26ea4a85 Added test case 1051 to test Location: following with PUT, as reported
by Ben Sutcliffe.  The test when run manually shows a problem in curl,
but the test harness web server doesn't run the test correctly so it's
disabled for now.
2008-07-30 07:24:59 +00:00
Yang Tse 96edebf4d9 improve synchronization between test harness runtests.pl script
and test harness servers to minimize risk of false test failures.

http://curl.haxx.se/mail/lib-2008-04/0392.html
2008-04-23 23:55:34 +00:00
Yang Tse ad1dd08693 fix minor memory leak triggered upon test failure 2008-04-22 13:07:27 +00:00
Yang Tse 95fd093c4a Remove fflush() + fsync() previously introduced accelerated writing of
server input and response request files of the test harness sws server.

Reintroduce, for test # 1001, the <postcheck> small delay. The delay is
needed even with the accelerated writing of server input and response
request files in test harness sws server.

http://curl.haxx.se/mail/lib-2008-04/0385.html
2008-04-22 12:40:05 +00:00
Yang Tse a87c468c5c accelerate the writing of server input and response request files
to disk, trying to defeat file and disk write-behind algorithms
2008-04-20 19:15:08 +00:00
Yang Tse ed63d9d4de header inclusion cleanup 2008-02-28 00:55:06 +00:00
Yang Tse 0d09f342c4 refactor some code out to write_pidfile() in util.c 2008-02-26 15:06:44 +00:00
Yang Tse fecb67b246 Use a long int data type to handle getpid() result 2008-02-06 16:54:01 +00:00
Yang Tse 2c0956200f Fix buffer size specification.
Improve handling of boundary conditions for huge requests.
2008-02-05 18:37:53 +00:00
Yang Tse acd9d72466 Minor variable type cleanups.
Disable "swsbounce" mode when the received request
isn't for the same test and part number.
2008-02-05 14:43:16 +00:00
Yang Tse cd63a461d7 proper initialization of httprequest, no longer zeroing out twice
the whole 150000+ bytes struct, and also removing an equally big
additional buffer for pipelining treatment.
2008-02-05 02:21:38 +00:00
Yang Tse 69e540dfa6 improve request initialization for test harness HTTP server 2008-01-25 05:08:53 +00:00
Yang Tse 2198869eb1 Dmitry Kurochkin's test harness HTTP server pipelining fix fot test 530 2008-01-25 05:07:04 +00:00
Yang Tse 1d49c04545 Detect, log and avoid storing a request with a negative size. 2007-10-26 00:36:36 +00:00
Patrick Monnerat 0678a51d3b Allow test server to handle binary POSTs.
Tests 35, 544 545 added: binary data POSTs.
2007-10-25 19:40:05 +00:00
Yang Tse 54bcde0a14 also log error message string 2007-10-09 23:24:28 +00:00
Yang Tse 06be8bc389 On error, close "log/server.response" 2007-10-04 02:09:33 +00:00
Yang Tse 0ac5fd354b If TCP_NODELAY is not defined we can't disable the Nagle algorithm 2007-10-03 23:38:07 +00:00
Daniel Stenberg 8d1239c091 Disable the Nagle algorithm and send back responses in small chunks in an
attempt to force smaller bits to get read by clients.
2007-10-02 10:13:37 +00:00
Yang Tse f2cd2882a0 Oops missing var 2007-02-19 03:59:41 +00:00
Yang Tse 31e598d2f3 add debug messages for initialization failures 2007-02-19 02:03:58 +00:00
Yang Tse 4894ce16fc use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handling 2007-02-16 16:01:19 +00:00
Yang Tse 5a267c4312 compiler warning fix 2007-02-14 13:46:08 +00:00
Yang Tse 7033a1c072 enhance HTTP server request input writing,
retrying upon EINTR errors.
2007-02-14 00:28:01 +00:00
Daniel Stenberg da58d03ff7 Venkat Akella found out that libcurl did not like HTTP responses that simply
responded with a single status line and no headers nor body. Starting now, a
HTTP response on a persistent connection (i.e not set to be closed after the
response has been taken care of) must have Content-Length or chunked
encoding set, or libcurl will simply assume that there is no body.

To my horror I learned that we had no less than 57(!) test cases that did bad
HTTP responses like this, and even the test http server (sws) responded badly
when queried by the test system if it is the test system. So although the
actual fix for the problem was tiny, going through all the newly failing test
cases got really painful and boring.
2006-11-25 13:32:04 +00:00
Daniel Stenberg e264f699d4 Tor Arntsen spotted this mistake 2006-11-13 13:48:55 +00:00
Yang Tse 13e60c55a1 Avoid trying to compare more than strlen bytes. 2006-10-23 19:16:19 +00:00
Yang Tse 4ec9316155 Replace is*() macros with our own IS*() ones. 2006-10-23 19:14:54 +00:00
Yang Tse e150150d9f Remove redundant __CYGWIN__ symbol check 2006-10-11 16:01:16 +00:00
Yang Tse 5a6c89661a Cygwin preprocessor adjustments 2006-09-12 01:17:16 +00:00
Daniel Stenberg e3c15fc4b9 test 530 is the first ever HTTP pipelining test for libcurl 2006-09-08 11:56:56 +00:00
Yang Tse ee3514ccdc Replace exit() with return() in main() 2006-08-14 17:00:08 +00:00
Yang Tse 46c5e562bf Abort if unable to write pid file. 2006-07-19 15:26:28 +00:00
Yang Tse 42f5a90d09 -Use curl_socket_t instead of int.
-Log errno in message if setsockopt() fails.

-Close listener socket on major errors.
2006-07-17 22:44:40 +00:00
Yang Tse 95aecc5dbb Fix compiler warning: comparison between signed and unsigned 2006-07-12 09:03:48 +00:00
Yang Tse 8272874704 Place parenthesis surrounding macro parameters so that the use of sread and swrite is more intuitive. 2006-07-12 06:52:40 +00:00
Yang Tse 88a1a10e6f Pay attention when typecasting an operation 2006-07-12 06:09:53 +00:00
Yang Tse 624e657210 sread now returns ssize_t 2006-07-12 05:54:06 +00:00
Yang Tse 58176d1484 Use platform's native types for recv() and send() arguments. 2006-07-12 05:19:00 +00:00