1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-07 10:05:06 -05:00
Commit Graph

422 Commits

Author SHA1 Message Date
Yang Tse
4b43d18c4a fix compiler warning: conversion from "long" to "size_t" may lose sign 2010-02-15 16:18:52 +00:00
Yang Tse
a07bc79117 removed trailing whitespace 2010-02-14 19:40:18 +00:00
Yang Tse
2268657272 fix compiler warning 2010-02-14 16:37:22 +00:00
Yang Tse
68d83a8142 Overhauled test suite getpart() function. Fixing potential out of bounds
stack and memory overwrites triggered with huge test case definitions.
2010-02-14 13:14:17 +00:00
Yang Tse
d20a2469ea - remove extra "\r\n" from doc404_RTSP
- avoid memory alignment issue when setting RTSP packet length
2010-02-10 13:03:32 +00:00
Yang Tse
f47b84b57f Validate server port argument 2010-02-04 17:17:19 +00:00
Yang Tse
232d17ec64 avoid possibility of using obsoleted stuff 2010-02-02 12:39:10 +00:00
Yang Tse
35fbeda003 Test suite support for RTSP 2010-02-01 12:05:08 +00:00
Yang Tse
703fa98a48 PKTSIZE might have been already defined in arpa/tftp.h 2010-01-23 13:51:53 +00:00
Yang Tse
1103d0c718 Update error message to include port number 2010-01-10 04:24:46 +00:00
Yang Tse
184f92d243 Remove extra line feed 2010-01-08 12:01:35 +00:00
Yang Tse
a114b7b1c0 sws and tftpd command line option naming adjustments 2010-01-08 01:48:54 +00:00
Yang Tse
7bede9180d log a message when continuing once sleep time is over 2009-12-22 13:45:01 +00:00
Yang Tse
002ed5f298 Test harness process control enhancements 2009-12-16 19:55:35 +00:00
Yang Tse
3802d027cd Test harness process control enhancements 2009-12-16 15:16:06 +00:00
Yang Tse
364d76aca7 Fix compiler warnings 2009-12-14 13:27:50 +00:00
Yang Tse
6e9a484ea6 signal handling to cleanup on SIGINT and SIGTERM, followup 2009-12-13 03:45:32 +00:00
Yang Tse
0653fa107f signal handling to cleanup on SIGINT and SIGTERM, followup 2009-12-09 18:41:43 +00:00
Yang Tse
d14bf09ab8 Fix 'uploaded' file descriptor leak 2009-12-03 20:37:49 +00:00
Yang Tse
2286f566d0 signal handling to cleanup on SIGINT and SIGTERM 2009-12-02 15:02:30 +00:00
Yang Tse
f07f17f2a4 Log sws IPv version, port and pid when exiting due to SIGINT or SIGTERM. 2009-11-27 12:01:25 +00:00
Yang Tse
cbd527843b Only attempt to clear the server-logs lock when previously set by this same server. 2009-11-26 10:15:08 +00:00
Yang Tse
fba233bb34 signal handling to cleanup on SIGINT and SIGTERM 2009-11-26 04:38:29 +00:00
Yang Tse
094afbeb56 Enhance some debug messages for initialization failures.
Fix compiler warning: conditional expression is constant.
2009-11-23 16:11:50 +00:00
Yang Tse
55e68ba333 I removed leading 'curl' path on the 'curlbuild.h' include statement in
curl.h, adjusting auto-makefiles include path, to enhance portability to
OS's without an orthogonal directory tree structure such as OS/400.
2009-11-05 15:04:03 +00:00
Yang Tse
640e49976f Fix compiler warning: loop without body 2009-10-10 12:29:32 +00:00
Yang Tse
ede2ac0ea2 Attempt to silence bogus compiler warning: "Potential null pointer dereference" 2009-09-17 15:33:32 +00:00
Yang Tse
be5c815f63 remove line obsoleted with previous commit 2009-09-17 14:02:50 +00:00
Yang Tse
31e106ced2 Attempt to silence bogus compiler warning: "Potential null pointer dereference" 2009-09-17 11:45:27 +00:00
Gunter Knauf
f1320d6733 add cast to silent compiler warning with 64bit systems. 2009-08-29 15:44:31 +00:00
Bill Hoffman
a8ea1e9ef4 ENH: add optional support for c-ares 2009-07-14 19:03:31 +00:00
Gunter Knauf
f671d0513c renamed generated config.h to curl_config.h in order to avoid clashes when libcurl is used with other projects which also have a config.h. 2009-07-14 13:25:14 +00:00
Yang Tse
c2ce2aa4de fix compiler warning 2009-06-12 09:01:41 +00:00
Yang Tse
4ea513cc38 fix compiler warning 2009-06-12 02:41:16 +00:00
Yang Tse
3ca0b9bb47 fix compiler warning 2009-06-11 17:46:33 +00:00
Bill Hoffman
744dceaffe ENH: lower case cmake functions and remove tabs and re-indent cmake code 2009-06-09 17:29:16 +00:00
Yang Tse
13fdb9d8a5 c-ares embbeded builds header include paths fully defined in makefiles 2009-06-04 04:13:39 +00:00
Yang Tse
4650732f4a Update copyright year, to force CVS to update the $Id date string format 2009-05-18 12:25:45 +00:00
Yang Tse
501e72c3de Remove temporary debug tracing, and add nasty error explanation 2009-05-18 02:19:21 +00:00
Yang Tse
6595592a71 Add some debug tracing 2009-05-14 19:52:19 +00:00
Yang Tse
199389c94a Fix detection of automatically choosen listener port number on IPv6 enabled builds. 2009-05-14 13:00:54 +00:00
Yang Tse
c31438b2f2 log each setsockopt/SO_REUSEADDR failure 2009-05-13 19:20:45 +00:00
Yang Tse
843f73ecaa fix print formatting-string directives 2009-05-13 04:16:00 +00:00
Yang Tse
9137e717b0 Use build-time configured curl_socklen_t instead of socklen_t 2009-05-02 02:37:32 +00:00
Yang Tse
b6282b99cb allow usage of in-tree c-ares when building from outside of the cvs tree 2009-04-29 00:38:08 +00:00
Yang Tse
af41fb79b5 Include <arpa/inet.h> if HAVE_ARPA_INET_H is defined 2009-04-27 23:59:41 +00:00
Daniel Stenberg
082b0d822c test 1099: "TFTP get first a non-existing file then an existing" added disabled
as things don't work right here!
2009-04-24 21:46:42 +00:00
Yang Tse
33a3753c3f libcurl's memory.h renamed to curl_memory.h 2009-04-21 11:46:16 +00:00
Yang Tse
74f9c570ea Adjust comment 2009-04-10 02:58:01 +00:00
Benoit Neil
4d396169c8 Cleaned up the custom definition I added (replaced by CURL_STATICLIB) 2009-04-09 19:59:38 +00:00
Gunter Knauf
2b96c3f5ce add back most likely acciedently removed function name justtimeout to fix autobuild breaks. 2009-04-09 02:46:56 +00:00
Benoit Neil
e5f1480a38 (Minor update) Added labal prefixes to tests targets 2009-04-08 23:48:07 +00:00
Benoit Neil
020955ebc2 Added special define for tests that directly include libcurl sources. 2009-04-08 23:35:09 +00:00
Gisle Vanem
59997ecad5 Avoid warnings when HAVE_ALRM and SIGALRM are not defined. 2009-04-08 18:37:11 +00:00
Gisle Vanem
6e2f0833ad #ifdef around variables to squelsh warnings. 2009-04-08 18:31:54 +00:00
Benoit Neil
25f626cc52 Fixed compile defines in CMake scripts 2009-04-08 11:42:45 +00:00
Daniel Stenberg
c4fba310d2 and include the .inc files in the release tarballs... 2009-04-07 22:07:07 +00:00
Benoit Neil
e9dd099870 Added missing tests in CMake, added Makefile.inc for tests (+ use in CMake scripts), and fixed a missing define under windows in a test source file. 2009-04-07 21:59:15 +00:00
Benoit Neil
7a9fab52be Fixed tests/server build (removed unnecessary link to libcurl). 2009-04-07 11:05:26 +00:00
Benoit Neil
b85154f13f Added tests (exes) targets, refactor a few things.
PS: Once again, sorry if the added files have executable perms on Linux.
2009-04-06 21:05:44 +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
a10044e110 Changed the "resolve" test precheck program to verify that an IPv6 socket
can be created before resolving the IPv6 name.  In the context of running
a test, it doesn't make sense to run an IPv6 test when a host is resolvable
but IPv6 isn't usable.  This should fix failures of test 1085 on hosts with
library and DNS support for IPv6 but where actual use of IPv6 has been
administratively disabled.
2008-10-28 20:03:22 +00:00
Yang Tse
068ba17e21 moved some definitions from tftp.h to tftpd.c 2008-10-23 14:34:08 +00:00
Yang Tse
4d10c96aa6 fix compiler warning 2008-10-23 14:07:28 +00:00
Yang Tse
e16bccbb91 attempt to fix compiler warning:
`variable' might be clobbered by `longjmp' or `vfork'
2008-10-14 17:35:25 +00:00
Yang Tse
445e4a9792 revert change introduced in tftpd.c revision 1.44 2008-10-03 03:42:44 +00:00
Yang Tse
9cea2dfb8f fix compiler warning: dereferencing type-punned pointer will break strict-aliasing rules 2008-10-02 14:44:18 +00:00
Yang Tse
26a651f7ae fix compiler warning: variable' might be clobbered by longjmp' or `vfork' 2008-10-02 13:28:10 +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
2d1f798d14 fix potential buffer overflow in test-server logging function 2008-09-26 00:17:01 +00:00
Yang Tse
2b767161da fix compiler warning: defined but not used 2008-09-21 04:02:13 +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
59e378f48f remove unnecessary typecasting of malloc() 2008-09-06 05:29:05 +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
Yang Tse
ac18b471d2 libcurl internal base64.h header file renamed to curl_base64.h 2008-08-17 00:25:38 +00:00
Yang Tse
14240e9e10 Initial support of curlbuild.h and curlrules.h which allows
to have a curl_off_t data type no longer gated to off_t.
2008-08-07 00:29:08 +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
912c29fd8c Undo using the sreadfrom() wrapper to replace recvfrom() in our code, for real ;-) 2008-07-30 06:20:43 +00:00
Yang Tse
537490e391 Undo using the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-30 05:10:42 +00:00
Yang Tse
51e84c77e7 fix compiler warning: implicit conversion from "long" to "int" 2008-07-21 09:23:56 +00:00
Yang Tse
1b37baf656 Use the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-21 03:06:07 +00:00
Yang Tse
1e7125ae7b add comment for include paths 2008-07-15 05:46:49 +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
6c2c281a7e fix log message used when unable to connect to destination port 2008-03-05 18:27:31 +00:00
Yang Tse
18cbb4d7d6 signal handling to properly cleanup on SIGINT and SIGTERM 2008-02-28 10:15:21 +00:00
Yang Tse
22e84d92b7 when terminating do it falling through cleanup code 2008-02-28 10:13:07 +00:00
Yang Tse
3d74649908 avoid inclusion of setup.h in util.h 2008-02-28 09:38:32 +00:00
Yang Tse
ed63d9d4de header inclusion cleanup 2008-02-28 00:55:06 +00:00
Yang Tse
8adc7038fe make comment more precise 2008-02-27 14:54:18 +00:00
Gunter Knauf
97a41f3646 trial to fix the HP-UX breakage... 2008-02-26 23:06:15 +00:00
Yang Tse
058e764af8 all reads from stdin and writes to stdout will be retried until the
whole operation completes or an unrecoverable condition is detected
2008-02-26 18:13:59 +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
1d95109ffa Revert sockfilt.c back to revision 1.42
Changes introduced in revision 1.43 were useless
2008-02-22 09:31:18 +00:00
Yang Tse
064eebeaf1 Avoid timeout restart when signal caught while awaiting socket and stdin events 2008-02-20 17:17:18 +00:00
Yang Tse
9df37b93df juggle() actually returns bool.
Remove redundant and unreachable log message.
2008-02-19 18:51:08 +00:00
Yang Tse
c9eb41c056 Reduce to 20 seconds the time allowed to set SO_REUSEADDR option on sockfilt listener socket.
Log some more error descriptions.
2008-02-18 20:13:30 +00:00
Yang Tse
23547fa2a0 sockfilt will quit when orphaned 2008-02-17 04:36:08 +00:00
Yang Tse
bad6410d08 Don't try to compare more than strlen chars 2008-02-06 17:35:17 +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
bdb2beb8e4 check availability of poll.h header at configuration time, and include
it when sys/poll.h is unavailable
2008-01-22 14:52:54 +00:00
Yang Tse
ed636cbe44 Replace isupper with our uppercase macro version 2007-11-15 13:20:18 +00:00
Yang Tse
c960cd41e8 Fix comment 2007-11-08 16:32:31 +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
Dan Fandrich
65ed696625 Fixed the test TFTP server to support the >10000 test number notation
Added test cases 2002 and 2003 (the latter disabled for now)
2007-10-24 22:48:23 +00:00
Patrick Monnerat
c67c54d4b3 Close log/server.input ASAP to avoid lengthy file lock on cygwin 2007-10-24 13:03:08 +00:00
Yang Tse
54bcde0a14 also log error message string 2007-10-09 23:24:28 +00:00
Yang Tse
660c86ce95 logmsg already appends '\n' 2007-10-09 23:21:29 +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
Dan Fandrich
16b95fc773 Enabled a few more gcc warnings with --enable-debug. Renamed a few
variables to avoid shadowing global declarations.
2007-09-27 01:45:22 +00:00
Dan Fandrich
9b11a84e74 Make the ftp server connect to the address given by curl in the PORT/EPRT
instead of hard-coding it to 127.0.0.1
2007-09-17 18:12:11 +00:00
Dan Fandrich
5d4c981e13 Fixed a few compiler warnings. Try to do a slightly better job of
cleaning up after an OOM condition in curl_multi_add_handle
2007-08-30 18:26:19 +00:00
Daniel Stenberg
c347db2e0a added a size > buffer size check to make it easier to track this in the
future
2007-08-22 14:09:13 +00:00
Daniel Stenberg
232a4553b8 Upped the buffer size to 17000+ bytes to prepare for the upcoming test 1003
that verfies ridiculously long server response lines. Also changed sprintf
to snprintf in a few places.
2007-08-22 13:57:49 +00:00
Daniel Stenberg
a53ba060c8 start the retry delay at 10 ms, double it for every failed attempt which makes
it 10 seconds delay after 11 attempts
2007-07-12 17:03:45 +00:00
Gunter Knauf
72bb5854f7 the timeout was probably too short with max = 1 sec, so lets test with 5 sec. 2007-07-12 10:54:15 +00:00
Gunter Knauf
0878b14f79 added time loop to sockfilt.c in order to wait for SO_REUSEADDR;
added go_sleep() to util.c.
2007-07-12 01:07:49 +00:00
Yang Tse
584f3639e3 update copyright year 2007-04-03 18:25:18 +00:00
Yang Tse
69565afab0 Check for stdbool.h at configuration stage, and include it if available.
Check for lowercase 'bool' type at configuration stage. If not available
provide a suitable replacement with a type definition of 'unsigned char'
in setup_once.h

Move definitions of TRUE and FALSE to setup_once.h
2007-02-22 02:51:54 +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
d9bf55570b Move portable error number symbolic name definitions to setup_once.h 2007-02-17 13:51:24 +00:00
Dan Fandrich
3f140a6008 getpart implicitly drags in some networking functions, so it needs to be
linked to the networking libraries.
2007-02-17 08:16:53 +00:00
Dan Fandrich
a0a47f2767 Better separate the library dependencies into those required by libcurl
and those required by other components to avoid forcing unneeded
dependencies into the target objects.
2007-02-17 01:29:01 +00:00
Dan Fandrich
213017e9cf Remove C99isms 2007-02-17 01:25:32 +00:00
Yang Tse
d46cab4a94 add debug messages for fopen() failures 2007-02-16 19:41:25 +00:00
Yang Tse
a1d5983991 use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handling 2007-02-16 18:19:35 +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
Yang Tse
c26ec47e90 compiler warning fix 2007-02-02 17:16:06 +00:00
Dan Fandrich
f68323da7d Ignore XML DOCTYPEs and declarations. 2007-01-23 20:24:26 +00:00
Dan Fandrich
33bea767eb Convert (most of) the test data files into genuine XML. A handful still
are not, due mainly to the lack of support for XML character entities
(e.g. & => &amp; ).  This will make it easier to validate test files using
tools like xmllint, as well as edit and view them using XML tools.
2007-01-23 02:25:56 +00:00
Dan Fandrich
b0d13fa4cb Leave the TFTPD test server running after a file upload.
Flush the protocol log data so it's immediately available to the test harness.
2007-01-15 21:03:53 +00:00
Daniel Stenberg
e61e09f658 prevent compiler warning since we use base64.h from libcurl which now has
function(s) using SessionHandle pointers
2007-01-04 23:04:50 +00:00