1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

4761 Commits

Author SHA1 Message Date
Fabian Keil
001758760b tests: add keywords for a couple of HTTP tests 2013-08-11 19:56:05 +02:00
Fabian Keil
2f06265e39 tests: add keywords for a couple of FTP tests 2013-08-11 19:56:01 +02:00
Fabian Keil
432431368f test1511: consistently terminate headers with CRLF 2013-08-11 19:55:44 +02:00
Daniel Stenberg
4b0028f82d DISABLED: shut of test 1512 for now
It shows intermittent failures and I haven't been able to track them
down yet. Disable this test for now.
2013-08-10 23:55:10 +02:00
Daniel Stenberg
d2b36e466a global dns cache: didn't work [regression]
CURLOPT_DNS_USE_GLOBAL_CACHE broke in commit c43127414d (been
broken since the libcurl 7.29.0 release). While this option has been
documented as deprecated for almost a decade and nobody even reported
this bug, it should remain functional.

Added test case 1512 to verify
2013-08-08 16:28:46 +02:00
Daniel Stenberg
7cc00d9a83 FTP: when EPSV gets a 229 but fails to connect, retry with PASV
This is a regression as this logic used to work. It isn't clear when it
broke, but I'm assuming in 7.28.0 when we went all-multi internally.

This likely never worked with the multi interface. As the failed
connection is detected once the multi state has reached DO_MORE, the
Curl_do_more() function was now expanded somewhat so that the
ftp_do_more() function can request to go "back" to the previous state
when it makes another attempt - using PASV.

Added test case 1233 to verify this fix. It has the little issue that it
assumes no service is listening/accepting connections on port 1...

Reported-by: byte_bucket in the #curl IRC channel
2013-08-06 09:57:59 +02:00
Daniel Stenberg
0ddc678927 formadd: wrong pointer for file name when CURLFORM_BUFFERPTR used
The internal function that's used to detect known file extensions for
the default Content-Type got the the wrong pointer passed in when
CURLFORM_BUFFER + CURLFORM_BUFFERPTR were used. This had the effect that
strlen() would be used which could lead to an out-of-bounds read (and
thus segfault). In most cases it would only lead to it not finding or
using the correct default content-type.

It also showed that test 554 and test 587 were testing for the
previous/wrong behavior and now they're updated as well.

Bug: http://curl.haxx.se/bug/view.cgi?id=1262
Reported-by: Konstantin Isakov
2013-08-04 23:32:36 +02:00
Fabian Keil
d020e2c381 tests: test1232 verifies dotdot removal from path with proxy 2013-07-23 20:51:15 +02:00
Yang Tse
0f4ba89ffd libtest: fix data type of some *_setopt() 'long' arguments 2013-07-22 21:40:45 +02:00
Yang Tse
6bcacff1a5 WIN32 MemoryTracking: require UNICODE for wide strdup code support 2013-07-19 12:33:10 +02:00
Yang Tse
90695fb2c5 Reinstate "WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usage".
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-18 23:37:33 +02:00
Sergei Nikulov
448d55ef0a cmake: Fix for MSVC2010 project generation
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-07-17 00:26:58 +02:00
Daniel Stenberg
1016637f5a test1414: FTP PORT download without SIZE support 2013-07-16 22:54:31 +02:00
Yang Tse
2e00872c04 tests/Makefile.am: add configurehelp.pm to DISTCLEANFILES 2013-07-16 22:51:35 +02:00
Yang Tse
c983aa9efc test 1511: fix enumerated type mixed with another type 2013-07-11 17:01:02 +02:00
Marc Hoersken
009d2336fe lib506.c: Fixed possible use of uninitialized variables 2013-07-01 21:42:15 +02:00
Daniel Stenberg
365c5ba395 formpost: better random boundaries
When doing multi-part formposts, libcurl used a pseudo-random value that
was seeded with time(). This turns out to be bad for users who formpost
data that is provided with users who then can guess how the boundary
string will look like and then they can forge a different formpost part
and trick the receiver.

My advice to such implementors is (still even after this change) to not
rely on the boundary strings being cryptographically strong. Fix your
code and logic to not depend on them that much!

I moved the Curl_rand() function into the sslgen.c source file now to be
able to take advantage of the SSL library's random function if it
provides one. If not, try to use the RANDOM_FILE for seeding and as a
last resort keep the old logic, just modified to also add microseconds
which makes it harder to properly guess the exact seed.

The formboundary() function in formdata.c is now using 64 bit entropy
for the boundary and therefore the string of dashes was reduced by 4
letters and there are 16 hex digits following it. The total length is
thus still the same.

Bug: http://curl.haxx.se/bug/view.cgi?id=1251
Reported-by: "Floris"
2013-06-25 09:55:49 +02:00
Daniel Stenberg
d3d5c4a40e tests: add test1395 to the tarball 2013-06-24 09:25:58 +02:00
Daniel Stenberg
6fab0bd9f1 test1396: invoke the correct test tool!
This erroneously run unit test 1310 instead of 1396!
2013-06-22 22:20:31 +02:00
Kamil Dudka
02964ed630 test1230: avoid using hard-wired port number
... to prevent failure when a non-default -b option is given
2013-06-22 22:12:49 +02:00
Daniel Stenberg
7877619f85 dotdot: introducing dot file path cleanup
RFC3986 details how a path part passed in as part of a URI should be
"cleaned" from dot sequences before getting used. The described
algorithm is now implemented in lib/dotdot.c with the accompanied test
case in test 1395.

Bug: http://curl.haxx.se/bug/view.cgi?id=1200
Reported-by: Alex Vinnik
2013-06-22 14:15:07 +02:00
Daniel Stenberg
0de7249bb3 unit1396: unit tests to verify curl_easy_(un)escape 2013-06-22 11:21:35 +02:00
Benjamin Gilbert
03a3dd9ee3 test506: verify that CURLOPT_COOKIELIST takes share lock
It doesn't right now: http://curl.haxx.se/bug/view.cgi?id=1215
2013-06-17 23:28:35 +02:00
YAMADA Yasuharu
f24dc09d20 cookies: follow-up fix for path checking
The initial fix to only compare full path names were done in commit
04f52e9b4d but found out to be incomplete. This takes should make the
change more complete and there's now two additional tests to verify
(test 31 and 62).
2013-06-12 11:19:56 +02:00
Sergei Nikulov
9e10963c20 lib1900: use tutil_tvnow instead of gettimeofday
Makes it build on windows
2013-06-12 10:52:23 +02:00
Eric Hu
8026bd7abd test2033: requires NTLM support 2013-06-12 10:34:10 +02:00
Daniel Stenberg
87cf677eca lib1500: remove bad check
After curl_multi_wait() returns, this test checked that we got exactly
one file descriptor told to read from, but we cannot be sure that is
true. curl_multi_wait() will sometimes return earlier without any file
descriptor to handle, just just because it is a suitable time to call
*perform().

This problem showed up with commit 29bf0598.

Bug: http://curl.haxx.se/mail/lib-2013-06/0029.html
Reported-by: Fabian Keil
2013-06-06 22:22:14 +02:00
Daniel Stenberg
5657c56f63 tests/Makefile: typo in the perlcheck target
Bug: http://curl.haxx.se/bug/view.cgi?id=1239
Reported-by: Christian Weisgerber
2013-06-04 23:22:11 +02:00
Daniel Stenberg
51b3445e84 test1230: verify CONNECT to a numerical ipv6-address 2013-06-04 22:52:13 +02:00
Daniel Stenberg
a7452b8b8c sws: support extracting test number from CONNECT ipv6-address!
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-06-04 22:50:58 +02:00
Daniel Stenberg
ac419bf562 Digest auth: escape user names with \ or " in them
When sending the HTTP Authorization: header for digest, the user name
needs to be escaped if it contains a double-quote or backslash.

Test 1229 was added to verify

Reported and fixed by: Nach M. S
Bug: http://curl.haxx.se/bug/view.cgi?id=1230
2013-05-27 19:45:12 +02:00
Daniel Stenberg
fc4759af9d tests: add test1394 file to the tarball 2013-05-19 12:44:44 +02:00
YAMADA Yasuharu
04f52e9b4d cookies: only consider full path matches
I found a bug which cURL sends cookies to the path not to aim at.
For example:
- cURL sends a request to http://example.fake/hoge/
- server returns cookie which with path=/hoge;
  the point is there is NOT the '/' end of path string.
- cURL sends a request to http://example.fake/hogege/ with the cookie.

The reason for this old "feature" is because that behavior is what is
described in the original netscape cookie spec:
http://curl.haxx.se/rfc/cookie_spec.html

The current cookie spec (RFC6265) clarifies the situation:
http://tools.ietf.org/html/rfc6265#section-5.2.4
2013-05-18 22:54:48 +02:00
Daniel Stenberg
7ed25ccf0d Revert "WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usage"
This reverts commit 8ec2cb5544.

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-05-12 15:10:01 +02:00
Daniel Stenberg
a45e3f93e4 libtest: gitignore more binary files 2013-05-08 14:35:45 +02:00
Steve Holme
6add1901a1 tests: Added new SMTP tests to verify commit 99b4045183 2013-05-07 22:52:43 +02:00
Daniel Stenberg
51b0f09b5e runtests.pl: support nonewline="yes" in client/stdin sections 2013-05-07 22:52:43 +02:00
Daniel Stenberg
8dac7be438 build: fixed unit1394 for debug and metlink builds 2013-05-06 23:28:04 +02:00
Kamil Dudka
bcf1b9dec1 unit1394.c: plug the curl tool unit test in 2013-05-06 15:03:13 +02:00
Jared Jennings
b045d079f8 unit1394.c: basis of a unit test for parse_cert_parameter() 2013-05-06 15:03:13 +02:00
Kamil Dudka
683f2b8323 src/Makefile.am: build static lib for unit tests if enabled 2013-05-06 15:03:12 +02:00
Steve Holme
99b4045183 smtp: Fixed sending of double CRLF caused by first in EOB
If the mail sent during the transfer contains a terminating <CRLF> then
we should not send the first <CRLF> of the EOB as specified in RFC-5321.

Additionally don't send the <CRLF> if there is "no mail data" as the
DATA command already includes it.
2013-05-04 10:00:33 +01:00
Steve Holme
087f9bb20a tests: Corrected MAIL SIZE for CRLF line endings
... which was missed in commit: f5c3d95384
2013-05-03 20:08:21 +01:00
Steve Holme
e2c7e19144 tests: Corrected infilesize for CRLF line endings
... which was missed in commit: f5c3d95384
2013-05-03 18:27:06 +01:00
Steve Holme
f5c3d95384 tests: Corrected test1406 to be RFC2821 compliant 2013-05-03 18:22:18 +01:00
Steve Holme
6b10f5b963 tests: Corrected test1320 to be RFC2821 compliant 2013-05-02 22:49:16 +01:00
Steve Holme
ee74b77d45 tests: Corrected typo in test909
Introduced in commit: 514817669e
2013-05-02 20:03:50 +01:00
Steve Holme
734bdb68c2 tests: Corrected test909 to be RFC2821 compliant 2013-05-02 18:52:52 +01:00
Steve Holme
514817669e tests: Updated test references to 909 from 1411
...and removed references to libcurl and test1406.
2013-05-02 18:50:00 +01:00
Steve Holme
cb9c0ac7d7 tests: Renamed test1411 to test909 as this is a main SMTP test 2013-05-02 18:46:11 +01:00
Daniel Stenberg
073e83b543 ftpserver: silence warnings
Fix regressions in commit b56e3d43e5. Make @data local and filter off
non-numerical digits from $testno in STATUS_imap.
2013-04-29 14:58:08 +02:00
Steve Holme
c3e6d69acb ftpserver.pl: Corrected the imap LOGIN response
...to be more realistic and consistent with the other imap responses.
2013-04-29 12:58:41 +01:00
Steve Holme
b56e3d43e5 tests: Added imap STATUS command test 2013-04-29 12:53:09 +01:00
Steve Holme
f317ffb7bb tests: Corrected the SMTP tests to be RFC2821 compliant
The emails that are sent to the server during these tests were
incorrectly formatted as they contained one or more LF terminated lines
rather than being CRLF terminated as per Section 2.3.7 of RFC-2821.

This wasn't a problem for the test suite as the <stdin> data matched the
<upload> data but anyone using these tests as reference would be sending
incorrect data to a server.
2013-04-28 16:14:58 +01:00
Steve Holme
790b2086d7 tests: Corrected command line arguments in test907 and test908 2013-04-27 16:36:17 +01:00
Steve Holme
f9b691cdb0 tests: Added SMTP AUTH with initial response tests 2013-04-27 13:04:02 +01:00
Steve Holme
4118c30261 tests: Updated SMTP tests to decouple client initial response
Updated test903 and test904 following the addition of CURLOPT_SASL_IR
as the default behaviour of SMTP AUTH responses is now to not include
the initial response. New tests with --sasl-ir support to follow.
2013-04-27 12:32:27 +01:00
Steve Holme
c4067a5678 ftpserver.pl: Fixed imap logout confirmation data
An IMAP server should response with the BYE continuation response before
confirming the LOGOUT command was successful.
2013-04-26 21:12:36 +01:00
Daniel Stenberg
0523152ad6 ftp_state_pasv_resp: connect through proxy also when set by env
When connecting back to an FTP server after having sent PASV/EPSV,
libcurl sometimes didn't use the proxy properly even though the proxy
was used for the initial connect.

The function wrongly checked for the CURLOPT_PROXY variable to be set,
which made it act wrongly if the proxy information was set with an
environment variable.

Added test case 711 to verify (based on 707 which uses --socks5). Also
added test712 to verify another variation of setting the proxy: with
--proxy socks5://

Bug: http://curl.haxx.se/bug/view.cgi?id=1218
Reported-by: Zekun Ni
2013-04-26 16:49:25 +02:00
Daniel Stenberg
c68c7e588e test709: clarify the test in the name 2013-04-25 23:42:38 +02:00
Daniel Stenberg
1498a0073e sshserver: disable StrictHostKeyChecking
I couldn't figure out why the host key logic isn't working, but having
it set to yes prevents my SSH-based test cases to run. I also don't see
a strong need to use strict host key checking on this test server.

So I disabled it.
2013-04-25 23:40:31 +02:00
Daniel Stenberg
27777949a0 runtests: log more commands in verbose mode
... to aid tracking down failures
2013-04-25 23:40:01 +02:00
Alessandro Ghedini
d791179d7f tests: add test1511 to check timecond clean-up
Verifies the timecond fix in commit c49ed0b6c0
2013-04-22 22:46:47 +02:00
Linus Nielsen Feltzing
6d9236e805 Add tests/http_pipe.py to the tarball build 2013-04-18 10:55:41 +02:00
Paul Howarth
1c40685d32 Add extra libs for lib1900 and lib2033 test programs
These are needed in cases where clock_gettime is used, from librt.
2013-04-15 23:06:10 +02:00
Daniel Stenberg
c5ba0c2f54 FTP: handle a 230 welcome response
...instead of the 220 we otherwise expect.

Made the ftpserver.pl support sending a custom "welcome" and then
created test 1219 to verify this fix with such a 230 welcome.

Bug: http://curl.haxx.se/mail/lib-2013-02/0102.html
Reported by: Anders Havn
2013-04-12 23:59:37 +02:00
Daniel Stenberg
61d259f950 FTP: access files in root dir correctly
Accessing a file with an absolute path in the root dir but with no
directory specified was not handled correctly. This fix comes with four
new test cases that verify it.

Bug: http://curl.haxx.se/mail/lib-2013-04/0142.html
Reported by: Sam Deane
2013-04-12 22:43:13 +02:00
Kamil Dudka
ddbda328b3 tests: prevent test206, test1060, and test1061 from failing
... in case runtests.pl is invoked with non-default -b option

Fixes a regression caused by 1e29d275c6.
2013-04-12 14:25:58 +02:00
Daniel Stenberg
5c5e1a1cd2 test1218: another cookie tailmatch test
... and make 1216 also verify it with a file input

These tests verify commit 3604fde3d3c9b0d, the fix for the "cookie
domain tailmatch" vulnerability. See
http://curl.haxx.se/docs/adv_20130412.html
2013-04-11 23:52:12 +02:00
Daniel Stenberg
f8da49eec0 test1217: verify parsing 257 responses with "rubbish" before path
Test 1217 verifies commit e0fb2d86c9, and without that change this
test fails.
2013-04-09 22:21:49 +02:00
Daniel Stenberg
11dee0bfae test1216: test tailmatching cookie domains
This test is an attempt to repeat the problem YAMADA Yasuharu reported
at http://curl.haxx.se/mail/lib-2013-04/0108.html
2013-04-09 15:45:27 +02:00
Fabian Keil
638c6da9db proxy: make ConnectionExists() check credential of proxyconnections too
Previously it only compared credentials if the requested needle
connection wasn't using a proxy. This caused NTLM authentication
failures when using proxies as the authentication code wasn't send on
the connection where the challenge arrived.

Added test 1215 to verify: NTLM server authentication through a proxy
(This is a modified copy of test 67)
2013-04-08 16:13:27 +02:00
Marc Hoersken
e73db5dcbd Revert "getpart.pm: Strip carriage returns to fix Windows support"
This reverts commit e51b23c925.
As discussed on the mailinglist, this was not the correct approach.
2013-04-07 00:28:15 +02:00
Marc Hoersken
4e2ed01a2e sockfilt.c: Fixed detection of client-side connection close
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-06 23:09:50 +02:00
Marc Hoersken
e34bc917d6 runtests.pl: Fixed --verbose parameter passed to http_pipe.py 2013-04-06 20:24:10 +02:00
Marc Hoersken
2ba0f1373c sockfilt.c: Reduce CPU load while running under a Windows PIPE 2013-04-06 19:05:16 +02:00
Marc Hoersken
b4fae9d73f tftpd.c: Apply sread timeout to the whole data transfer session 2013-04-06 19:00:42 +02:00
Marc Hoersken
e51b23c925 getpart.pm: Strip carriage returns to fix Windows support 2013-04-06 18:10:56 +02:00
Daniel Stenberg
18f0ab7bd3 ftp tests: libcurl returns CURLE_FTP_ACCEPT_FAILED better now
Since commit 57aeabcc1a, it handles errors on the control connection
while waiting for the data connection better.

Test 591 and 592 are updated accordingly.
2013-04-06 17:51:03 +02:00
Marc Hoersken
9474c4a9a5 tftpd.c: Follow up cleanup and restore of previous sockopt 2013-04-06 17:18:41 +02:00
Marc Hoersken
a181e7b084 tftpd.c: Fixed sread timeout on Windows by setting it manually 2013-04-06 14:39:56 +02:00
Marc Hoersken
34fa8d1e38 ftp.pm: Added tskill to support Windows XP Home 2013-04-06 12:55:57 +02:00
Marc Hoersken
a03d0c5b88 runtests.pl: Modularization of MinGW/Msys compatibility functions 2013-04-06 12:45:05 +02:00
Marc Hoersken
ac09b5a92b ftp.pm: Made Perl testsuite able to handle Windows processes 2013-04-06 11:56:04 +02:00
Marc Hoersken
91252d9fb9 util.c: Revert workaround eeefcdf, 6eb56e7 and e3787e8 2013-04-06 11:55:30 +02:00
Marc Hoersken
efa5488448 ftp.pm: Made Perl testsuite able to kill Windows processes 2013-04-06 11:33:55 +02:00
Marc Hoersken
e3787e862f util.c: Follow up cleanup on eeefcdf 2013-04-06 10:03:43 +02:00
Daniel Stenberg
6eb56e72de cpp: use #ifdef __MINGW32__ to avoid compiler complaints
... instead of just #if
2013-04-06 00:56:32 +02:00
Marc Hoersken
eeefcdff54 util.c: Made write_pidfile write the correct PID on MinGW/Msys
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-06 00:41:00 +02:00
Marc Hoersken
5e722b2d09 sockfilt.c: Fixed handling of multiple fds being signaled 2013-04-05 13:33:17 +02:00
Marc Hoersken
e5d25b6c68 sockfilt.c: Added wrapper functions to fix Windows console issues
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-04-04 22:50:01 +02:00
Yang Tse
a6eade56ca lib1509.c: fix compiler warnings 2013-04-04 16:31:27 +02:00
Linus Nielsen Feltzing
e87e76e2dc easy: Fix the broken CURLOPT_MAXCONNECTS option
Copy the CURLOPT_MAXCONNECTS option to CURLMOPT_MAXCONNECTS in
curl_easy_perform().

Bug: http://curl.haxx.se/bug/view.cgi?id=1212
Reported-by: Steven Gu
2013-04-04 10:33:39 +02:00
Daniel Stenberg
1e29d275c6 test1509: verify proxy header response headers count
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-27 15:30:46 +01:00
Yang Tse
8ec2cb5544 WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usage
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-25 03:32:47 +01:00
Steve Holme
c0c46c3137 imap-tests: Added CRLF to reply data to be compliant with RFC-822
Updated the reply data in tests: 800, 801, 802, 804 and 1321 to possess
the CRLF as per RFC-822.
2013-03-21 12:42:32 +00:00
Steve Holme
b8a986be06 lib1900.c: fix compilation warning
warning: declaration of 'time' shadows a global declaration
2013-03-20 23:32:48 +00:00
Yang Tse
b0dfbf305a tests: specify 'text' mode for some output files in verify section 2013-03-18 20:45:35 +01:00
Yang Tse
91e2ce6e76 tests: 96, 558, 1330: strip build subdirectory dependent leading path 2013-03-16 00:59:54 +01:00
Steve Holme
bf4cef1db1 imap-tests: Corrected copy/paste error in test808 reply data 2013-03-15 20:08:54 +00:00
Yang Tse
8ce915c7a4 unit1330.c: fix date 2013-03-15 20:05:03 +01:00
Yang Tse
1700668d78 tests: add #96 #558 and #1330
These verfy that the 'memory tracking' subsystem is actually doing its
job when using curl tool (#96), a test in libtest (#558) and also a unit
test (#1330), in order to prevent regressions in this functionallity.
2013-03-15 19:59:51 +01:00
Steve Holme
a8f93d4efc imap-tests: Added test808 for custom EXAMINE command 2013-03-15 18:12:58 +00:00
Daniel Stenberg
e4b733e3f1 HTTP proxy: insert slash in URL if missing
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-03-15 14:18:16 +01:00
Steve Holme
b50285d751 ftpserver.pl: Added EXAMINE_imap() for IMAP EXAMINE commands
Used hard coded data from RFC-3501 section 6.3.2.
2013-03-14 22:49:57 +00:00
Linus Nielsen Feltzing
0f147887b0 Multiple pipelines and limiting the number of connections.
Introducing a number of options to the multi interface that
allows for multiple pipelines to the same host, in order to
optimize the balance between the penalty for opening new
connections and the potential pipelining latency.

Two new options for limiting the number of connections:

CURLMOPT_MAX_HOST_CONNECTIONS - Limits the number of running connections
to the same host. When adding a handle that exceeds this limit,
that handle will be put in a pending state until another handle is
finished, so we can reuse the connection.

CURLMOPT_MAX_TOTAL_CONNECTIONS - Limits the number of connections in total.
When adding a handle that exceeds this limit,
that handle will be put in a pending state until another handle is
finished. The free connection will then be reused, if possible, or
closed if the pending handle can't reuse it.

Several new options for pipelining:

CURLMOPT_MAX_PIPELINE_LENGTH - Limits the pipeling length. If a
pipeline is "full" when a connection is to be reused, a new connection
will be opened if the CURLMOPT_MAX_xxx_CONNECTIONS limits allow it.
If not, the handle will be put in a pending state until a connection is
ready (either free or a pipe got shorter).

CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - A pipelined connection will not
be reused if it is currently processing a transfer with a content
length that is larger than this.

CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - A pipelined connection will not
be reused if it is currently processing a chunk larger than this.

CURLMOPT_PIPELINING_SITE_BL - A blacklist of hosts that don't allow
pipelining.

CURLMOPT_PIPELINING_SERVER_BL - A blacklist of server types that don't allow
pipelining.

See the curl_multi_setopt() man page for details.
2013-03-13 23:55:24 +01:00
Yang Tse
ba7fbd0960 test509: libcurl initialization with memory callbacks and actual usage 2013-03-13 21:50:40 +01:00
Yang Tse
83a42ee20e curl.h: stricter CURL_EXTERN linkage decorations logic
No API change involved.

Info: http://curl.haxx.se/mail/lib-2013-02/0234.html
2013-03-12 00:27:47 +01:00
Steve Holme
92295aa73c test806: Added CRLF to reply data to be compliant with RFC-822 2013-03-11 13:06:55 +00:00
Daniel Stenberg
50a83890c9 test805: added crlf newlines to make data size match
since mails sent are supposed to have CRLF line endings I added them and
now the data size after (\Seen) matches again properly
2013-03-11 13:26:15 +01:00
Daniel Stenberg
817f73dcda test: fix newline for the data check of 807 2013-03-11 13:23:51 +01:00
Yang Tse
bd86528e6b test801 to test807: fix protocol section line endings 2013-03-11 12:48:36 +01:00
Steve Holme
25d040035e Makefile.am: Corrected a couple of spurious tab characters
Corrected a couple of tab characters between test702 and test703, and
between test900 and test901 which should be spaces.
2013-03-10 20:27:05 +00:00
Jiri Hruska
8dc7393d89 imap: Added test807 for custom request functionality (STORE) 2013-03-10 20:23:23 +00:00
Jiri Hruska
245f522761 imap: Added test806 for IMAP (folder) LIST command 2013-03-10 20:20:10 +00:00
Jiri Hruska
90c8386187 imap: Added test805 for APPEND functionality 2013-03-10 20:14:01 +00:00
Jiri Hruska
263db764c4 imap: Added test804 for skipping SELECT if in the same mailbox 2013-03-10 20:04:38 +00:00
Jiri Hruska
3a5530a1f3 imap: Added test802 and test803 for UIDVALIDITY verification
Added one test for a request with matching UIDVALIDITY and one which is
a mismatched request that will fail.
2013-03-10 19:57:26 +00:00
Jiri Hruska
0d49f92872 imap: Added test801 for UID and SECTION URL parameters 2013-03-10 19:43:54 +00:00
Jiri Hruska
b12ddc4eed imap-tests: Accept quoted parameters in ftpserver.pl
Any IMAP parameter can come in escaped and in double quotes. Added a
simple function to unquote the command parameters and applied it to
the IMAP command handlers.
2013-03-10 19:34:30 +00:00
Jiri Hruska
c2e2938a7e tests: Fix ftpserver.pl indentation
The whole of FETCH_imap() had one extra space of indentation, whilst
APPEND_imap() used indentation of 2 instead of 4 in places.
2013-03-10 19:27:40 +00:00
Steve Holme
62b5015796 Makefile.am: Corrected end of line filler character
The majority of lines, that specify a test file for inclusion, end with
a tab character before the slash whilst some end with a space. Corrected
those that end with a space to end with a tab character as well.
2013-03-10 19:02:41 +00:00
Steve Holme
85e944928c email-tests: Updated the test data that corresponds to the test number
Finished segregating the email protocol tests, into their own protocol
based ranges, in preparation of adding more e-mail related tests to the
test suite.
2013-03-10 19:02:39 +00:00
Steve Holme
5a6464ae09 email-tests: Renamed the IMAP test to be 800
Continued segregating the email protocol tests, into their own protocol
based ranges, in preparation of adding more e-mail related tests to the
test suite.
2013-03-10 19:02:37 +00:00
Steve Holme
fb327e42c6 email-tests: Renamed the SMTP tests to be in the range 900-906
Continued segregating the email protocol tests, into their own protocol
based ranges, in preparation of adding more e-mail related tests to the
test suite.
2013-03-10 19:02:36 +00:00
Steve Holme
a1348aa23c email-tests: Renamed the POP3 tests to be in the range 850-857
Started segregating the email protocol tests, into their own protocol
based ranges, in preparation of adding more e-mail related tests to the
test suite.
2013-03-10 19:02:34 +00:00
Yang Tse
09b2db2dfd Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility 2013-03-09 16:23:52 +01:00
Yang Tse
70b5173410 configure: use XC_LIBTOOL for portability across libtool versions 2013-03-08 13:27:45 +01:00
Jiri Hruska
c1ce09d470 imap: Fixed test801 and test1321 to specify a message UID
Just a folder list would be retrieved if UID was not specified now.
2013-03-06 21:38:19 +00:00
Jiri Hruska
81408d2111 imap: Fixed ftpserver.pl to allow verification even through LIST command
Commit 198012ee inadvertently broke LIST_imap().
2013-03-06 21:36:12 +00:00
Jiri Hruska
acfce19de1 imap: Updated ftpserver.pl to be more compliant, added new commands
Enriched IMAP capabilities of ftpserver.pl in order to be able to
add tests for the new IMAP features.

* Added support for APPEND - Saves uploaded data to log/upload.$testno
* Added support for LIST - Returns the contents of <reply/> section in
  the current test, like e.g FETCH.
* Added support for STORE - Returns hardcoded updated flags
* Changed handling of SELECT - Returns much more information in the
  usual set of untagged responses; uses hardcoded data from an example
  in the IMAP RFC
* Changed handling of FETCH - Fixed response format
2013-03-06 19:48:01 +00:00
Nick Zitzmann
cc27aff7b3 darwinssl: fix undefined $ssllib warning in runtests.pl
I also added --with-darwinssl to the list of SSL options in configure.
2013-02-24 15:39:15 -07:00
Jiri Hruska
5c5b7c7146 imap: Added the ability to FETCH a specific UID and SECTION
Updated the FETCH command to send the UID and SECTION parsed from the
URL. By default the BODY specifier doesn't include a section, BODY[] is
now sent whereas BODY[TEXT] was previously sent. In my opinion
retrieving just the message text is rarely useful when dealing with
emails, as the headers are required for example, so that functionality
is not retained. In can however be simulated by adding SECTION=TEXT to
the URL.

Also updated test801 and test1321 due to the BODY change.
2013-02-23 21:11:47 +00:00
ulion
5cd85db9fa SOCKS: fix socks proxy when noproxy matched
Test 1212 added to verify

Bug: http://curl.haxx.se/bug/view.cgi?id=1190
2013-02-11 20:10:52 +01:00
Linus Nielsen Feltzing
da3fc1ee91 Fix NULL pointer reference when closing an unused multi handle. 2013-02-10 22:57:58 +01:00
Steve Holme
92f7606f29 smtp: Fixed an issue when processing EHLO failure responses (Part 3)
Follow up fix to commit 62bd217464 to cater for servers that don't
respond with a 250 in their EHLO responses. Additionally updated the
SMTP tests to respond with a 250 response code as per RFC5321.
2013-02-09 19:01:15 +00:00
Daniel Stenberg
72688317ad DONE: consider callback-aborted transfers premature
This bug report properly identified that when doing SMTP and aborting
the transfer with a callback, it must be considered aborted prematurely
by the code to avoid QUIT etc to be attempted as that would cause a
hang.

The new test case 1507 verifies this behavior.

Reported by: Patricia Muscalu
Bug: http://curl.haxx.se/bug/view.cgi?id=1184
2013-02-08 13:57:01 +01:00
Steve Holme
7704621f4c imap: Changed response tag generation to be completely unique
Updated the automatic response tag generation to follow the examples
given in RC3501, which list a 4 character string such as A001, A002,
etc.

As a unique identifier should be generated for each command the string
generation is based on the connection id and the incrementing command
id.
2013-02-07 00:18:23 +00:00
Linus Nielsen Feltzing
bd1f170a5a CURLMOPT_MAXCONNECTS: restore functionality
When a connection is no longer used, it is kept in the cache. If the
cache is full, the oldest idle connection is closed. If no connection is
idle, the current one is closed instead.
2013-02-05 09:17:52 +01:00
Matt Arsenault
a94a68a3c1 cmake: Fix mingw build 2013-02-04 22:35:09 +01:00
Ulion
2698520aef formpost: support quotes, commas and semicolon in file names
- document the double-quote and backslash need be escaped if quoting.
- libcurl formdata escape double-quote in filename by backslash.
- curl formparse can parse filename both contains '"' and ',' or ';'.
- curl now can uploading file with ',' or ';' in filename.

Bug: http://curl.haxx.se/bug/view.cgi?id=1171
2013-01-22 15:43:29 +01:00
Daniel Stenberg
fa176376c8 memanalyze.pl: handle fopen() of file names with quotes 2013-01-22 15:19:12 +01:00
Yang Tse
63605d281f Makefile.inc: fix $(top_srcdir) not allowed in _SOURCES variables 2013-01-20 04:20:02 +01:00
Yang Tse
ccb34cb46d runtests.pl: make VPATH builds find valgrind.supp 2013-01-18 11:20:41 +01:00
Daniel Stenberg
c43127414d always-multi: always use non-blocking internals
Remove internal separated behavior of the easy vs multi intercace.
curl_easy_perform() is now using the multi interface itself.

Several minor multi interface quirks and bugs have been fixed in the
process.

Much help with debugging this has been provided by: Yang Tse
2013-01-17 19:40:35 +01:00
Daniel Stenberg
533c31b785 FTP: reject illegal port numbers in EPSV 229 responses 2013-01-15 22:35:48 +01:00
Yang Tse
7ab3ae0bf0 commit bc682cbd follow-up 2013-01-15 19:54:47 +01:00
Yang Tse
4b401b2d99 build: use per-target '_CPPFLAGS' for those currently using default
Automake documents that doing this will make it choose a different name
for intermediate object files even when sharing source files across
targets of same Makefile.am.

Up to automake 1.13.1 target's intermediate object files were placed
in the build subdirectory of the target. We depended on this, probably
undocumented behavior, to achieve same behavior as if a per-target flag
had been specified when building targets that actually belong to
different Makefile.am files.

It seems automake 1.13.2 is going to break behavior mentioned above.

So, lets use a documented behavior in order to achieve same purpose,
across automake versions, no matter where automake wishes to place
intermediate object files.

Our build targets that already were using a per-target '_CFLAGS' or
'_CPPFLAGS' need no 'fixing', these were already 'fixed'. The only
Makefile.am or Makefile.in files in libcurl's source tree touched by
this 'fix' are tests/libtest/Makefile.inc and tests/unit/Makefile.inc.
2013-01-15 16:31:50 +01:00
Yang Tse
d7f2c3af5f tests/libtest/Makefile.inc: sort build targets 2013-01-15 16:31:49 +01:00
Yang Tse
bc682cbd3e tests/Makefile.am: remove wildcard usage in EXTRA_DIST 2013-01-15 16:31:48 +01:00
Yang Tse
d17f536688 sockfilt.c: log file descriptor number on read/write error 2013-01-11 00:03:37 +01:00
Yang Tse
308cce8231 test servers: handle W32/W64 SIGBREAK with exit_signal_handler 2013-01-09 22:23:50 +01:00
Yang Tse
a6848250d2 test servers: fix errno, ERRNO and SOCKERRNO usage for W32/W64 2013-01-09 22:23:50 +01:00
Yang Tse
a9ca5e61e5 sockfilt.c: fix some W64 compiler warnings 2013-01-09 22:23:49 +01:00
Yang Tse
5a053ffe80 build: fix circular header inclusion with other packages
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-09 00:49:50 +01:00
Yang Tse
fea3a3d569 sockfilt.c: fix some compiler warnings 2013-01-08 19:51:29 +01:00
Marc Hoersken
561b551deb tests/server/sockfilt.c: Fixed integer comparison warning 2013-01-07 07:47:54 +01:00
Marc Hoersken
6a4f5e5268 tests/server/sockfilt.c: Include required Win32 headers 2013-01-07 07:34:32 +01:00
Marc Hoersken
11f55a9672 tests/server/sockfilt.c: Fixed support for listening sockets
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-06 22:30:42 +01:00
Marc Hoersken
5475ac279d tests/server/sockfilt.c: Set Windows Console to binary mode 2013-01-06 22:30:42 +01:00
Marc Hoersken
a77d18efaf tests/server/sockfilt.c: Improved log error messages
Include error code and parameters in error messages.
2013-01-06 22:30:42 +01:00
Steve Holme
db20517796 imap: Added support for SASL based authentication mechanism detection
Added support for detecting the supported SASL authentication mechanisms
via the CAPABILITY command.
2013-01-06 19:13:58 +00:00
Yang Tse
4a5aa6682d Revert changes relative to lib/*.[ch] recent renaming
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-06 18:20:27 +01:00
Yang Tse
1795e24176 imap test server: fix typo in name of SELECT_imap() sub definition
IMAP test server breaking typo introduced with commit b708a522a1
2013-01-05 13:40:34 +01:00
Steve Holme
b708a522a1 imap test server: Added support for the CAPABILITY command
Added support for the CAPABILITY command in preparation of upcoming
changes.
2013-01-04 13:15:10 +00:00
Daniel Stenberg
65e8ba8e1d writeout: -w now supports remote_ip/port and local_ip/port
Added mention to the curl.1 man page.

Test case 1223 verifies remote_ip/port.
2013-01-03 23:16:38 +01:00
Yang Tse
0b3180b4f5 test 1222: 8 chars object name generation && test 1221: adjustments 2013-01-03 19:24:00 +01:00
Yang Tse
13606bbfde build: make use of 93 lib/*.c renamed files
93 *.c source files renamed to use our standard naming scheme.

This change affects 77 files in libcurl's source tree.
2013-01-03 05:50:26 +01:00
Yang Tse
dfe4769157 build and tests: curl_10char_object_name() shell function
lib/objnames.inc provides definition of curl_10char_object_name() shell
function. The intended purpose of this function is to transliterate a
(*.c) source file name that may be longer than 10 characters, or not,
into a string with at most 10 characters which may be used as an OS/400
object name.

Test case 1221 does unit testng of this function and also verifies
that it is possible to generate distinct short object names for all
curl and libcurl *.c source file names.

lib/objnames-test.sh is the shell script used for test case 1221.

tests/runtests.pl modified to accept shell script test cases.

More details inside lib/objnames.inc and lib/objnames-test.sh
2013-01-02 20:15:50 +01:00
Yang Tse
f871de0064 build: make use of 76 lib/*.h renamed files
76 private header files renamed to use our standard naming scheme.

This change affects 322 files in libcurl's source tree.
2012-12-28 19:37:11 +01:00
Yang Tse
ae2a2c9931 curl tool: renaming hugehelp files to tool_hugehelp 2012-12-26 23:30:54 +01:00
Yang Tse
eb5aa12c8b sockfilt.c: commit b44da5a82a follow-up 2 2012-12-26 20:03:35 +01:00
Yang Tse
77b5c0b2cf sockfilt.c: commit b44da5a82a follow-up 2012-12-26 19:30:22 +01:00
Yang Tse
b44da5a82a sockfilt.c: fix some compiler warnings 2012-12-26 17:17:52 +01:00
Daniel Stenberg
d49531dd3a lib556: enable VERBOSE to ease debugging on failures 2012-12-25 20:30:39 +01:00
Marc Hoersken
4a23b19a13 socklift.c: Quick fix to re-add missing code 2012-12-25 15:18:01 +01:00
Marc Hoersken
a662f86f6f socklift.c: Added select_ws function to support Windows
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-25 15:15:24 +01:00
Yang Tse
d335aa2cdc Enable tests 1503, 1504 and 1505 2012-12-25 13:34:46 +01:00
Yang Tse
e125eea5a6 test 1504 and 1505: same as 1502 but with different cleanup sequences 2012-12-25 13:34:43 +01:00
Yang Tse
5ed03ebe52 test 1503: same as 1502 but with a different cleanup sequence 2012-12-23 21:50:41 +01:00
Yang Tse
3456bbc4cc test 1502: OOM handling fixes 2012-12-23 21:50:40 +01:00
Yang Tse
dfe382c6ae runtests.pl: prepend $srcdir to HTTPTLS server config files path 2012-12-22 00:26:03 +01:00
Yang Tse
c59c5e8ea2 lib543.c: OOM handling fixes 2012-12-21 18:32:20 +01:00
Yang Tse
b7a1eccce8 libntlmconnect.c: fix compiler warnings and OOM handling 2012-12-19 19:53:16 +01:00
Yang Tse
a0b207164c setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
Inclusion of top two most included header files now done in setup_once.h
2012-12-14 17:38:18 +01:00
Fabian Keil
ca5f4e2135 runtests and friends: Do not add undefined values to @INC
On FreeBSD this fixes the warning:
Use of uninitialized value $p in string eq at /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN.pm line 36.
2012-12-06 23:04:33 +01:00
Yang Tse
60edbf65b6 libtest: fix some compiler warnings 2012-12-05 17:28:32 +01:00
Yang Tse
b908376bef build: explain current role of LIBS in our Makefile.am files
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-12-04 23:32:05 +01:00
Yang Tse
2ecdd48683 testcurl.pl: build example programs for several autobuilds
Affected autobuilds: IRIX, AIX, Tru64 and AIX.
2012-11-30 19:13:50 +01:00
Yang Tse
91b57cd6e5 build: prevent global LIBS from influencing libtest build targets 2012-11-30 14:34:48 +01:00
Yang Tse
d27a46f09b build: prevent global LIBS from influencing test server build targets 2012-11-29 21:56:48 +01:00
Yang Tse
4abf4fbaac build: fix Windows build targets damaged since commit 550e403f00 2012-11-28 20:51:13 +01:00
Yang Tse
16a8281f71 build: avoid linkage of directly unused libraries 2012-11-28 18:31:23 +01:00
Yang Tse
534d2ca1d7 dd missing NTLM feature for tests 2025, and 2028 to 2032 2012-11-27 18:01:55 +01:00
Yang Tse
79954a1b07 avoid mixing of enumerated type with another type 2012-11-26 16:23:48 +01:00
Fabian Keil
0683adbf50 Remove stray CRLF in chunk-encoded content-free request bodies
.. that are sent when auth-negotiating before a chunked
upload or when setting the 'Transfer-Encoding: chunked'
header and intentionally sending no content.

Adjust test565 and test1333 accordingly.
2012-11-26 15:28:53 +01:00
Daniel Stenberg
14dc679ce0 test: offer "automake" output and check for perl better
runtests.pl -am now uses the "PASS/FAIL: [desc]" output for each
executed test. You can run 'make test-am' in the root build directory to
invoke that. The reason for this output style is to better allow generic
test suite parsers to also grok our test output.

The test Makefile now also tests that perl was indeed found and that the
PERL variable points to an executable before it tries to run the main
test perl script runtests.pl,
2012-11-23 11:56:26 +01:00
Fabian Keil
ef6f040355 Test 206: Use a Content-Length header for the 407 response
Otherwise curl would have to guess where the body ends.
2012-11-21 22:13:44 +01:00
Fabian Keil
c1dd687af6 Test 206: Don't respond to a succesful CONNECT request with a body
It's against the spec and caused test failures when header
and response were read from the network separately in which
case bug #39 wasn't triggered.
2012-11-21 22:13:44 +01:00
Fabian Keil
52af6e69f0 Get test 2032 working when using valgrind
If curl_multi_fdset() sets maxfd to -1, the socket detection
loop is skipped and thus !found_new_socket is no cause for alarm.
2012-11-19 13:36:28 +01:00
Kamil Dudka
32be348af2 test2032: spurious failure caused by premature termination
Bug: http://curl.haxx.se/mail/lib-2012-11/0095.html
2012-11-19 13:36:10 +01:00
Fabian Keil
7e87499213 Fix comment typos in test 517 2012-11-19 10:58:14 +01:00
Fabian Keil
7719333f55 Test 92 and 194: normalize spaces in the Server headers
It makes no difference from curl's point of view but
makes it more convenient to use the tests with a
lws-normalizing proxy between curl and the test server.
2012-11-19 10:58:14 +01:00
Fabian Keil
276452ca10 Add a HOSTIP precheck for tests 31 and 1105
They currently only work for 127.0.0.1 which
is hardcoded and can't be easily changed.
2012-11-19 10:58:14 +01:00
Fabian Keil
1b10dd7aae Let test 8 work as long as %HOSTIP ends with ".0.0.1"
.. and add a precheck to skip the test otherwise.
2012-11-19 10:58:14 +01:00
Fabian Keil
7aebb3cc42 Add --resolve to the keywords and name of test 1318
This makes it easier to skip it automatically when
the test suite is used with external proxies.
2012-11-19 10:58:14 +01:00
Fabian Keil
6f444b2761 Add FTP keywords for a couple of currently keyword-less FTP tests 2012-11-19 10:58:14 +01:00
Fabian Keil
81d96c4421 Add keywords for a couple of currently keyword-less HTTP tests 2012-11-19 10:58:14 +01:00
Fabian Keil
10296ac665 Use carriage returns in all headers in test 31
Trailing spaces were left unmodifed, assuming they were intentional.
2012-11-19 10:58:14 +01:00
Fabian Keil
ab0fa55780 Do not mix CRLF and LF header endings in a couple of HTTP tests
Consistently use CRLF instead. The mixed endings weren't
documented so I assume they were unintentional.

This change doesn't matter for curl itself but makes using
the tests with a proxy between curl and the test server
more convenient.

Tests that consistently use no carriage returns were
left unmodified as one can easily work around this.
2012-11-19 10:58:02 +01:00
Daniel Stenberg
409f2a041f fixed memory leak: CURLOPT_RESOLVE with multi interface
DNS cache entries populated with CURLOPT_RESOLVE were not properly freed
again when done using the multi interface.

Test case 1502 added to verify.

Bug: http://curl.haxx.se/bug/view.cgi?id=3575448
Reported by: Alex Gruz
2012-11-18 16:39:31 +01:00
Daniel Stenberg
ee588fe088 mem-include-scan: verify memory #includes
If we use memory functions (malloc, free, strdup etc) in C sources in
libcurl and we fail to include curl_memory.h or memdebug.h we either
fail to properly support user-provided memory callbacks or the memory
leak system of the test suite fails.

After Ajit's report of a failure in the first category in http_proxy.c,
I spotted a few in the second category as well. These problems are now
tested for by test 1132 which runs a perl program that scans for and
attempts to check that we use the correct include files if a memory
related function is used in the source code.

Reported by: Ajit Dhumale
Bug: http://curl.haxx.se/mail/lib-2012-11/0125.html
2012-11-17 13:56:38 +01:00
Fabian Keil
32afaaef93 Fix the libauthretry changes from 7c0cbcf2f6
They broke the NTLM tests from 2023 to 2031.
2012-11-16 20:09:02 +01:00
Sergei Nikulov
7c0cbcf2f6 fixed Visual Studio 2010 compilation 2012-11-13 11:17:20 +01:00
Daniel Stenberg
e62ee60c7a runtests: limit execessive logging/output 2012-11-12 13:50:00 +01:00
Fabian Keil
6d1b493f3d Fix compilation of lib1501 2012-11-08 18:33:47 +01:00
Daniel Stenberg
cda6d891ab test1413: verify redirects to URLs with fragments
The bug report claimed it didn't work. This problem was probably fixed
in 473003fbdf.

Bug: http://curl.haxx.se/bug/view.cgi?id=3581898
2012-11-06 23:25:52 +01:00
Daniel Stenberg
473003fbdf URL parser: cut off '#' fragments from URLs (better)
The existing logic only cut off the fragment from the separate 'path'
buffer which is used when sending HTTP to hosts. The buffer that held
the full URL used for proxies were not dealt with. It is now.

Test case 5 was updated to use a fragment on a URL over a proxy.

Bug: http://curl.haxx.se/bug/view.cgi?id=3579813
2012-11-06 23:17:57 +01:00
Daniel Stenberg
8d97bed806 test 2027/2030: take duplicate Digest requests into account
With the reversion of ce8311c7e4 and the new clear logic, this flaw
is present and we allow it.
2012-11-06 22:23:56 +01:00
Daniel Stenberg
95326a40ff test1412: verify Digest with repeated URLs
This test case verifies that bug 3582718 is fixed.

Bug: http://curl.haxx.se/bug/view.cgi?id=3582718
Reported by: Nick Zitzmann (originally)
2012-11-06 22:23:56 +01:00
Dave Reisner
550e403f00 uniformly use AM_CPPFLAGS, avoid deprecated INCLUDES
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-11-06 00:32:21 +01:00
Daniel Stenberg
f99430d89e libauthretry.c: shorten lines to fit within 80 cols 2012-11-06 00:06:21 +01:00
Daniel Stenberg
9019a0a86c test/README: mention the 1500 test number range 2012-11-04 23:18:20 +01:00
Daniel Stenberg
b2954e66e8 FTP: prevent the multi interface from blocking
As pointed out in Bug report #3579064, curl_multi_perform() would
wrongly use a blocking mechanism internally for some commands which
could lead to for example a very long block if the LIST response never
showed.

The solution was to make sure to properly continue to use the multi
interface non-blocking state machine.

The new test 1501 verifies the fix.

Bug: http://curl.haxx.se/bug/view.cgi?id=3579064
Reported by: Guido Berhoerster
2012-11-04 19:05:39 +01:00
Daniel Stenberg
84e6c7a9e5 test2006: Updated expected output to include hash name
Output changed in commit a34197ef77
2012-09-18 00:14:34 +02:00
Marc Hoersken
b3d72a95be metalink tests: Updated expected output to include hash name 2012-09-17 07:35:11 +02:00
Sara Golemon
b78944146a curl_multi_wait: Add parameter to return number of active sockets
Minor change to recently introduced function.  BC breaking, but since
curl_multi_wait() doesn't exist in any releases that should be fine.
2012-09-16 19:58:02 +02:00
Marc Hoersken
c8846c0907 libntlmconnect.c: Fixed typo and conversion 2012-09-11 12:58:08 +02:00
Marc Hoersken
f9da9a0edb libntlmconnect.c: Fixed warning: curl_easy_getinfo expects long pointer
Fixed tests/libtest/libntlmconnect.c:52: warning: call to
'_curl_easy_getinfo_err_long' declared with attribute warning:
curl_easy_getinfo expects a pointer to long for this info
2012-09-11 12:19:05 +02:00
Marc Hoersken
6372144be0 sws.c: Fixed warning: 'err' may be used uninitialized in this function 2012-09-11 11:48:27 +02:00
Marc Hoersken
ef753b710b libntlmconnect.c: Fixed warning: comparison of signed/unsigned integer
Windows does not use -1 to represent invalid sockets and the
SOCKET type is unsigned.
2012-09-11 11:02:09 +02:00
Daniel Stenberg
1b0477a5a9 FILEFORMAT: the FTP commands work for more protocols 2012-09-04 19:41:09 +02:00
Daniel Stenberg
4ae2f77ba1 test1411: verify SMTP without SIZE support 2012-09-04 19:40:46 +02:00
Daniel Stenberg
da0d15733c ftpserver: respond with a 250 to SMTP EHLO
... and specify that SIZE is supported. 250 is the "correct" response
code according to RFC 2821
2012-09-04 16:50:31 +02:00
Sara Golemon
09d9dd8873 Unit test for curl_multi_wait() 2012-09-01 23:27:11 +02:00
Joe Mason
40153716a3 Use MAX_EASY_HANDLES instead of hardcoding the number of handles twice 2012-09-01 20:21:30 +02:00
Daniel Stenberg
7735141e73 test2032: bail out after last transfer
The test would hang and get aborted with a "ABORTING TEST, since it
seems that it would have run forever." until I prevented that from
happening.

I also fixed the data file which got broken CRLF line endings when I
sucked down the path from Joe's repo == my fault.

Removed #37 from KNOWN_BUGS as this fix and test case verifies exactly
this.
2012-08-31 23:23:40 +02:00
Joe Mason
3b7d31c1ed NTLM: verify multiple connections work
Add test2032 to test that NTLM does not switch connections in the middle
of the handshake
2012-08-31 22:53:17 +02:00
Daniel Stenberg
bf6dc61967 verbose messages: fixed output of hostnames in re-used connections
I suspect this is a regression introduced in commit 207cf150, included
since 7.24.0.

Avoid showing '(nil)' as hostname in verbose output by making sure the
hostname fixup function is called early enough to set the pointers that
are used for this. The name data is set again for each request even for
re-used connections to handle multiple hostnames over the same
connection (like with proxy) or that the casing etc of the host name is
changed between requests (which has proven to be important at least once
in the past).

Test1011 was modified to use a redirect with a re-used a connection
since it then showed the bug and now lo longer does. There's currently
no easy way to have the test suite detect 'nil' texts in verbose ouputs
so no tests will detect if this problem gets reintroduced.

Bug: http://curl.haxx.se/mail/lib-2012-07/0111.html
Reported by: Gisle Vanem
2012-08-08 13:57:56 +02:00
Guenter Knauf
154fc29f58 Fix some compiler warnings. 2012-08-08 05:03:16 +02:00
Joe Mason
42e4c34ff3 sws: close sockets properly
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-07 00:28:21 +02:00
Joe Mason
0df14c8393 Remove debug logs that were accidentally checked in 2012-08-07 00:21:14 +02:00
Joe Mason
60a2ee88a5 Use select in sws, which has better cross-platform support than poll 2012-08-07 00:21:14 +02:00
Joe Mason
66a77a9b49 Use cross-platform curlx_nonblock instead of fcntl in sws 2012-08-07 00:21:14 +02:00
Guenter Knauf
69f5fe070d Fixed compiler warning - argument is type long. 2012-08-06 11:45:06 +02:00
Daniel Stenberg
5dedda1448 DISABLED: disable the new tests that do NTLM
The tests 2025, 2028 and 2031 don't work for me so I'll have them
disabled for now until we solve the problem.
2012-08-06 00:33:25 +02:00
Joe Mason
24c43e9d34 Add tests of auth retries 2012-08-03 17:01:54 -04:00
Joe Mason
674da8ae07 Add a polling loop in main to read from more than one socket at once. Add 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-02 18:52:38 -04:00
Joe Mason
84490052d4 Change return values of get_request, accept_connection and 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-02 18:52:31 -04:00
Joe Mason
19035292d0 Hoist the loop out of get_request, and make sure that it can be reentered 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-02 17:43:25 -04:00
Joe Mason
81656a8466 Move blocks of code from the sws main loop into their own functions for easier refactoring later.
The next step will be to call the correct function after a poll, rather than looping unconditionally
2012-08-02 17:43:15 -04:00
Joe Mason
76ba591957 Remove the --fork option of sws, since it makes refactoring to use poll more complicated and should
be redundant once we poll
2012-08-02 17:34:45 -04:00
Kamil Dudka
d317ca50ae http: print reason phrase from HTTP status line on error
Bug: https://bugzilla.redhat.com/676596
2012-07-22 02:12:43 +02:00
Daniel Stenberg
1fc5a41447 test Makefile: only feature 'unit' once in the list of dirs 2012-07-20 21:56:27 +02:00
Guenter Knauf
0f15ed1617 Fixed CR issue with Win32 version on MSYS.
Previous fix didnt work on Linux ...
2012-07-20 17:22:10 +02:00
Guenter Knauf
5d80017fd6 Fixed CR issue with Win32 version on MSYS. 2012-07-20 15:39:28 +02:00
Guenter Knauf
e1711b0e9a Fixed MSYS <-> Windows path convertion.
Replaced the Windows real path from mount hack with a more
reliable and simpler hack: the MSYS shell has a builtin pwd
which understands a -W option which does convertion to Windows
paths. Tested and confirmed that this works on all MSYS versions
I have back to a 3 year old one.
2012-07-20 15:30:41 +02:00
Guenter Knauf
c27cc4cfe0 Follow-up fix to detect SSL libs with MinGW.
1) the check for winssl needs to come before nss check
2) the SSL checks must begin with a new if or else we will
never find any SSL lib with MinGW.
2012-07-19 16:31:08 +02:00
Guenter Knauf
da2bde9d62 Trial to teach runtests.pl about WinSSL. 2012-07-17 07:13:58 +02:00
Guenter Knauf
13abfd997e Fixed warning 'uninitialized value in numeric gt'.
This is a MSYS/MinGW-only warning; full warning text is:
Use of uninitialized value in numeric gt (>) at ../../curl/tests/runtests.pl line 2227.
2012-07-17 06:55:38 +02:00
Daniel Stenberg
1c4663bc42 tests: verify the stricter numeric option parser
Test 1409 and 1410 verifies the stricter numeric option parser
introduced the other day in commit f2b6ebed7b.
2012-07-12 00:32:23 +02:00
Daniel Stenberg
d759a70db8 SWS: use of uninitialized memory fix
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-12 00:08:38 +02:00
Daniel Stenberg
1dcf4418ba test48: verify that HEAD doesn't close extra
Two commits ago, we fixed a bug where the connction would be closed
prematurely after a HEAD. Now I added connection-monitor to test 48 and
added a second HEAD and make sure that both are sent over the same
connection.

This triggered a failure before the bug fix and now works. Will help us
avoid a future regression of this kind.
2012-07-12 00:08:37 +02:00
Daniel Stenberg
685366006c connection-monitor: always log disconnect when enabled
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-12 00:08:37 +02:00
Daniel Stenberg
c7106b3eb7 test231: fix wrong -C use! 2012-07-10 23:20:05 +02:00
Daniel Stenberg
40cd996cc0 test 46: use different path lengths to get reliable sort order
Since the order of the cookies is sorted by the length of the paths,
having them on the same path length will make the test depend on what
order the qsort() implementation will put them. As seen in the
windows/msys output posted by Guenter in this posting:
http://curl.haxx.se/mail/lib-2012-07/0105.html
2012-07-09 15:25:54 +02:00
Daniel Stenberg
1b27bb446f tests: use connection-monitor and verify results
Test 1008 and 206 don't show the disconnect since it happens when SWS
awaits a new request, but 503 does and so the verify section needs that
string added.
2012-07-05 11:24:23 +02:00
Daniel Stenberg
176f7ea3bb sws: support <servercmd> for CONNECT requests
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-05 11:24:23 +02:00
Daniel Stenberg
6398c8bba8 FILEFORMAT: provided a full description of connection-monitor 2012-07-05 11:24:23 +02:00
Daniel Stenberg
c5de48b56c lib503: enable verbose to ease debugging this 2012-07-05 11:24:23 +02:00
Daniel Stenberg
28dc509dde sws: add 'connection-monitor' command support
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-07-05 11:24:23 +02:00
Daniel Stenberg
c75ece4442 cookies: change the URL in the cookie jar file header 2012-07-03 11:27:45 +02:00
Neil Bowers
33e19f881e testcurl.pl: fix missing semicolon 2012-07-02 23:25:30 +02:00
Yang Tse
b3ebfc2b74 testcurl.pl: allow non in-tree c-ares enabled autobuild 2012-07-02 20:21:48 +02:00
Yang Tse
069b280f63 configure.ac: verify that libmetalink is new enough
Enabling test2017 to test2022.
2012-07-02 16:42:54 +02:00
Yang Tse
febd598597 test2017 to test2022: more metalink tests
With this commit, checks done in previous test2017 are now done in test2018.

Whole range test2017 to test2022 DISABLED until configure is capable of
requiring a new-enough metalink library.

Don't try these without mentioned check in place!
2012-06-29 16:09:55 +02:00
Yang Tse
7747136421 test2005 to test2016: improve failure detection 2012-06-29 15:44:50 +02:00
Yang Tse
dd707b746f lib582.c: fix conversion warning 2012-06-28 17:14:41 +02:00
Tatsuhiro Tsujikawa
bf4580d5fd Metalink: message updates
Print "parsing (...) OK" only when no warnings are generated.  If
no file is found in Metalink, treat it FAILED.

If no digest is provided, print WARNING in parse_metalink().
Also print validating FAILED after download.

These changes make tests 2012 to 2016 pass.
2012-06-28 00:26:16 +02:00
Yang Tse
6c09ffaf46 tests: add five more Metalink test cases 2012-06-27 13:16:01 +02:00
Yang Tse
5ce9e7a0b7 tests: update Metalink message format 2012-06-27 13:16:00 +02:00
Ghennadi Procopciuc
861e1ba604 test: Added test HTTP receive cookies over IPv6 2012-06-24 22:59:15 +02:00
Yang Tse
7731c34d79 tests: add another Metalink test case 2012-06-22 20:14:30 +02:00
Tatsuhiro Tsujikawa
14dc361433 tests: Enable test2010 and fixed hash value 2012-06-22 19:06:10 +02:00
Yang Tse
b193ba8a02 tests: add six Metalink test cases 2012-06-21 18:32:31 +02:00
Yang Tse
53423673ca test 2005: add verification of hash checking outcome 2012-06-21 18:32:31 +02:00
Yang Tse
2f738c7f40 getpart.pm: remove misleading comment 2012-06-21 18:32:30 +02:00
Tatsuhiro Tsujikawa
7292486ec3 tests: Added Metalink test case # 2005 2012-06-21 04:16:53 +02:00
Tatsuhiro Tsujikawa
a3e3f8ffa0 runtests.pl: make it support metalink feature 2012-06-20 20:15:42 +02:00
Yang Tse
07086c9487 getpart.pm: make test definition section/part parser more robust
Test definition section parts which needed to include xml-lingo as contents
of that part required that the xml-blurb was written as a single line. Now the
xml-data inside the part can be written multiline making it more readable.

Tested with <client><file> part which is written to disk before <command> runs.
2012-06-20 20:14:53 +02:00
Guenter Knauf
16c725dbc7 Fixed typo. 2012-06-15 02:25:09 +02:00
Yang Tse
63e9685470 tests: fix test definitions # 1355, 1363, 1385 and 1393
-i without HTTP protocol shall not include headers in the output
2012-06-11 13:56:40 +02:00
Yang Tse
a884ffe430 Fixes allowing 26 more test cases in 1334 to 1393 range to succeed 2012-06-09 05:49:49 +02:00
Yang Tse
c29d1f4e3a tests: fix test definitions # 1370 and 1371
-J without -O shall not honor C-D filename
2012-06-09 05:49:48 +02:00
Daniel Stenberg
2e48139fbf lib554.c: use curl_formadd() properly
The length/size options take longs so make sure to pass on such types.

Reported by: Neil Bowers
Bug: http://curl.haxx.se/mail/lib-2012-06/0001.html
2012-06-07 23:10:40 +02:00
Yang Tse
7352ac408b Fixes allowing HTTP test cases 1338, 1339, 1368 and 1369 to succeed 2012-06-07 21:57:53 +02:00
Yang Tse
c41d959ee6 tests 1364 to 1393: several -o filename -J -i -D combinations for HTTP and FTP 2012-06-07 17:45:37 +02:00
Yang Tse
430791616b tests 1348 to 1363: test definition polishing
Verify that the "Saved to filename 'blabla'" message is only displayed when
the 'blabla' filename being used _actually_ has been specified by the server
in the Content-Disposition header.

Use relative path for unintended file creation postcheck.
2012-06-07 15:29:46 +02:00
Yang Tse
37550c16f9 Disable non-HTTP header related tests
These now detect incompleate header data and fail
2012-06-06 13:04:18 +02:00
Yang Tse
b1f2a680bd tests 1348 to 1363: compleate header data part of test definition 2012-06-06 12:59:52 +02:00
Yang Tse
2b56e4c1bb tests 1334 to 1363 revisited.
Add a postcheck section to verify unintended file creation.

Remove needless <file> checks in verify section. Renumbering where appropriate.
2012-06-05 20:20:40 +02:00
Yang Tse
62f374b19e tests: adjust file part behavior in test verify section.
When a <file> part is now specified with no contents at all, this
will actually verify that the specified file has no contents at all.
Previously file contents would be ignored.
2012-06-05 20:20:39 +02:00
Yang Tse
c5b66836a5 tests 1348 to 1363: add a comma in test description 2012-06-05 13:16:35 +02:00
Daniel Stenberg
0c460e80ed pop3 tests: CAPA instead of AUTH
After Steve's commit e336bc7c42 test 1319 and 1407 need to check
for CAPA instead of AUTH.
2012-06-04 22:34:06 +02:00
Yang Tse
04a6f0a1a4 tests 1356 to 1363: several -O -J -i -D combinations with FTP protocol
Currently 1356 to 1362 succeed but a write failure is logged in traceNNNN.

Currently 1363 fails, so disabled for now.
2012-06-04 20:59:45 +02:00
Steve Holme
1fc89eb87f tests: Updated pop3 tests for change in auth mechanism detection 2012-06-04 19:41:56 +01:00
Yang Tse
3bfff57e1f tests 1348 to 1355: several -O -J -i -D combinations with FTP protocol
Currently 1348 to 1354 succeed but a write failure is logged in traceNNNN.

Currently 1355 fails, so disabled for now.
2012-06-04 19:40:04 +02:00
Yang Tse
628e62a966 tests 1346 to 1347: several -O -J -i -D combinations with HTTP protocol 2012-06-04 18:56:28 +02:00
Yang Tse
379efd62aa tests 1334 to 1345: several -O -J -i -D combinations with HTTP protocol 2012-06-01 05:48:26 +02:00
Yang Tse
00dd45720e tests: support test definitions with up to 5 file checks in <verify> section
This is done introducing tags <file1> to <file4> besides existing <file> one,
as well as corresponding <stripfile1> to <stripfile4> ones, that can be used
in the <verify> section in the same way as the non-numbered ones.
2012-06-01 05:37:00 +02:00
Yang Tse
b420f60a06 pop3 test server: allow pop3 test server verification to succeed again
Introduce SUPPORTCAPA and SUPPORTAUTH config commands to allow further
pop3 test server expansion for tests that require CAPA or AUTH support,
although this will need some extra work to make it fully functional.
2012-05-30 17:39:14 +02:00
Daniel Stenberg
a03100c357 test1013.pl: filter out Metalink
Since it isn't a feature supported by curl-config we can't compare that
with the --version output
2012-05-27 23:43:23 +02:00
Steve Holme
c267c53017 pop3: Added support for SASL based authentication mechanism detection
Added support for detecting the supported SASL authentication mechanisms
via the AUTH command. There are two ways of detecting them, either by
using the AUTH command, that will return -ERR if not supported or by
using the CAPA command which will return SASL and the list of mechanisms
if supported, not include SASL if SASL authentication is not supported
or -ERR if the CAPA command is not supported. As such it seems simpler
to use the AUTH command and fallback to normal clear text authentication
if the the command is not supported.

Additionally updated the test cases to return -ERR when the AUTH command
is encountered. Additional test cases will be added when support for the
individual authentication mechanisms is added.
2012-05-27 19:09:38 +01:00
Tatsuhiro Tsujikawa
b061fed981 Made -D option work with -O and -J.
To achieve this, first new structure HeaderData is defined to hold
necessary data to perform header-related work.  Then tool_header_cb now
receives HeaderData pointer as userdata.  All header-related work
(currently, dumping header and Content-Disposition inspection) are done
in this callback function.  HeaderData.outs->config is used to determine
whether each work is done.

Unit tests were also updated because after this change, curl code always
sets CURLOPT_HEADERFUNCTION and CURLOPT_HEADERDATA.

Tested with -O -J -D, -O -J -i and -O -J -D -i and all worked fine.
2012-05-25 23:06:08 +02:00
Daniel Stenberg
560cd62272 HTTP: empty chunked POST ended up in two zero size chunks
When doing a chunked-encoded POST with -d (CURLOPT_POSTFIELDS) and the
size of the POST was zero length, it made libcurl first send a zero
chunk and then the terminating one. This could confuse a receiver and it
should rather just send the terminating chunk as it does with this fix.

Test case 1333 is added to verify.

Bug: http://curl.haxx.se/mail/archive-2012-04/0060.html
Reported by: Arnaud Compan
2012-04-20 22:25:31 +02:00
Yang Tse
ce8a321dd0 Some explicit conversion to 'long' of curl_easy_setopt() third argument
Explicit conversion to 'long' of curl_easy_setopt() third argument for options
CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH given that this is how its bitmasks are
docummented to be used.
2012-04-18 21:03:20 +02:00
Yang Tse
3833765ba5 build adjustments: commit 9e24b9c7 follow-up 2012-04-17 13:29:12 +02:00
Kamil Dudka
4c385cf896 tests/valgrind.pm: suppress memleaks of NSS_InitContext()
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=745224
2012-04-16 20:11:47 +02:00
Yang Tse
48d13b44c6 headers: require GCC 2.7 or newer in order to allow attribute GCC'isms usage
Usage in other code paths already protected and requiring even newer versions.
2012-04-14 15:12:30 +02:00
Yang Tse
4d2c3f0a4d testcurl.pl: build example programs for Android cross-compiles 2012-04-13 19:33:45 +02:00
Yang Tse
1c3a99b52c testcurl.pl: build example programs for MinGW cross-compiles 2012-04-12 21:21:10 +02:00
Yang Tse
8ed40acac6 testcurl.pl: log more environment vars that modify configure and build behavior 2012-04-12 17:11:17 +02:00
Yang Tse
38ae6ec1a2 configure: NATIVE_WINDOWS no longer defined in config files 2012-04-12 13:08:48 +02:00
Yang Tse
9e24b9c7af build adjustments: CURL_HIDDEN_SYMBOLS no longer defined in config files
configure script now provides conditional definitions for Makefile.am
that result in CURL_HIDDEN_SYMBOLS being defined by resulting makefiles
when appropriate.

Additionally, configure script option for symbol hiding control is now
named --enable-symbol-hiding --disable-symbol-hiding. While still valid,
old option name --enable-hidden-symbols --disable-hidden-symbols will
be deprecated in some future release.
2012-04-11 19:33:54 +02:00
Yang Tse
a144bb8b76 build adjustments: functionally revert commits 4d3fb91f and bbfe1182
Undefining CURL_HIDDEN_SYMBOLS in source files isn't the proper fix.
2012-04-11 19:28:40 +02:00
Yang Tse
4d3fb91fb4 test servers: build adjustment
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-04-10 17:32:06 +02:00
Yang Tse
bbfe118209 libtests: build adjustment
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-04-10 17:29:37 +02:00
Yang Tse
21423497ef configure: Windows cross-compilation fixes
BUILDING_LIBCURL and CURL_STATICLIB are no longer defined in curl_config.h,
configure will generate appropriate conditionals so that mentioned symbols
get defined and used in Makefiles at compilation time
2012-04-09 21:24:16 +02:00
Daniel Stenberg
1dd69921d3 test: added test 1332 that tests --post303 2012-04-05 23:37:16 +02:00
Daniel Stenberg
a0b3535735 test1331: cookies on a 407 response
Verify that cookies are sent back even after a 407 response has been
received
2012-04-05 23:22:15 +02:00
Yang Tse
e7661d198f lib599.c: fix compiler warning 2012-04-04 17:24:29 +02:00
Daniel Stenberg
13c7b91133 runtests: yassl and polarssl are not openssl
Don't set the "has_openssl" variable if yassl or polarssl is found as
they will simply not work as 100% drop-in replacements for some of the
stuff the "OpenSSL" feature is used for.

I spotted this problem when doing test runs with PolarSSL builds.
2012-04-04 00:07:26 +02:00
Daniel Stenberg
c44d45db86 HTTP: reset expected DL/UL sizes on redirects
With FOLLOWLOCATION enabled. When a 3xx page is downloaded and the
download size was known (like with a Content-Length header), but the
subsequent URL (transfered after the 3xx page) was chunked encoded, then
the previous "known download size" would linger and cause the progress
meter to get incorrect information, ie the former value would remain
being sent in. This could easily result in downloads that were WAY
larger than "expected" and would cause >100% outputs with the curl
command line tool.

Test case 599 was created and it was used to repeat the bug and then
verify the fix.

Bug: http://curl.haxx.se/bug/view.cgi?id=3510057
Reported by: Michael Wallner
2012-04-01 00:07:24 +02:00
Yang Tse
459435dca1 test #1405: support HTTP disabled builds 2012-03-26 23:54:27 +02:00
Steve Holme
3fdb7808ef test #809: Updated error code to match recent pop3 changes 2012-03-26 21:08:16 +01:00
Yang Tse
456d8db35e tests #1316 #1319 #1320 #1321: add missing keywords 2012-03-23 18:31:29 +01:00
Yang Tse
e952a7e710 test #598: add missing keywords 2012-03-23 18:15:34 +01:00
Yang Tse
b8b2cf612b tests #1400 #1401: add missing keywords 2012-03-22 18:32:19 +01:00
Yang Tse
d2e5222ebc test #598: add to Makefile.am 2012-03-22 04:59:16 +01:00
Yang Tse
3aab542e77 test #598: OOM handling fixes 2012-03-22 04:58:38 +01:00
Yang Tse
3c80309c27 fix several compiler warnings 2012-03-22 04:54:04 +01:00
Daniel Stenberg
805788e043 SWS: refuse to serve CONNECT unless running as proxy 2012-03-22 00:12:37 +01:00
Yang Tse
c6825b7a6b fix several compiler warnings 2012-03-20 18:28:24 +01:00
Yang Tse
e6a89cb6c4 tests 140X: fix --libcurl generated source file reading mode for MSYS builds 2012-03-18 05:56:07 +01:00
Daniel Stenberg
1a7bba1975 test: --libcurl fixes
The line endings broke when I saved the three recent patches (my fault,
not Colin's) to 'git am' them.

Adjusted the stripping of the test program for comparing to also exclude
the SSH key file name as that will differ and use a local path name.
2012-02-23 23:16:58 +01:00
Colin Hogben
21130dab4f Add helper script convsrctest.pl to manipulate --libcurl tests.
The intention is to take the output of curl's --libcurl option,
as exercised in test 14xx, and generate a corresponding test15xx
in which the generated code is compiled and run.  This will verify
that the generated code behaves equivalently to the original
invocation of the curl command.

The script is not yet integrated into the configure / makefile
machinery.
2012-02-23 22:33:06 +01:00
Colin Hogben
c3cae332c5 Add tests for curl's --libcurl output.
These tests check the output of the --libcurl option of curl,
including the improved option handling added in a related patch.
2012-02-23 22:33:02 +01:00
Daniel Stenberg
77a21ff623 pop3 test server: send terminating ".CRLF" only
With commit 035ef06bda applied, the test pop3 server needs to send
".\r\n" as the body terminating sequence and there needs to be a final
CRLF in the actual body in the test data file.
2012-02-21 22:24:44 +01:00
Daniel Stenberg
ecc93caaeb parse_proxy: bail out on zero-length proxy names!
The proxy parser function strips off trailing slashes off the proxy name
which could lead to a mistaken zero length proxy name which would be
treated as no proxy at all by subsequent functions!

This is now detected and an error is returned. Verified by the new test
1329.

Reported by: Chandrakant Bagul
Bug: http://curl.haxx.se/mail/lib-2012-02/0000.html
2012-02-10 16:26:20 +01:00
Daniel Stenberg
ea055407fa curl_easy_reset: reset the referer string
When CURLOPT_REFERER has been used, curl_easy_reset() did not properly
clear it.

Verified with the new test 598

Bug: http://curl.haxx.se/bug/view.cgi?id=3481551
Reported by: Michael Day
2012-02-07 23:07:43 +01:00
Daniel Stenberg
65103efe49 curl tool: don't abort glob-loop due to failures
We want to continue to the next URL to try even on failures returned
from libcurl. This makes -f with ranges still get subsequent URLs even
if occasional ones return error. This was a regression as it used to
work and broke in the 7.23.0 release.

Added test case 1328 to verify the fix.

Bug: http://curl.haxx.se/bug/view.cgi?id=3481223
Reported by: Juan Barreto
2012-02-06 16:52:17 +01:00
Yang Tse
e277d3b52b test harness: update stunnel.pem Diffie-Hellman parameters from 512 to 1024 bit 2012-01-25 11:50:44 +01:00
Daniel Stenberg
c11c30a8c8 tests: test CRLF in URLs
Related to the security vulnerability: CVE-2012-0036

Bug: http://curl.haxx.se/docs/adv_20120124.html
2012-01-24 08:54:26 +01:00
Yang Tse
a7e8f4aabc testtrace.c: fix compiler warning 2012-01-19 22:54:57 +01:00
Colin Hogben
5d70a61b94 Add two tests for telnet: URLs
Add simple telnet tests which (ab)use the http server.
The second test checks for an input file handling bug.
2012-01-18 22:20:33 +01:00
Yang Tse
24526d0c0f tests: enable time tracing on tests 500, 573 and 585 2012-01-17 21:33:17 +01:00
Yang Tse
a752850acc tests: testtrace.[ch] provides debug callback for libtest usage
Allows tests from the libtest subdir to generate log traces
similar to those of curl with --tracetime and --trace-ascii
options but with output going to stderr.
2012-01-17 21:32:05 +01:00
Yang Tse
2b9fafd622 sws.c: fix proxy mode secondary connection monitoring condition 2012-01-17 12:28:28 +01:00
Yang Tse
b15024be4d sws.c: improve proxy mode torture testing support - followup to 18c6c8a5 2012-01-16 19:01:35 +01:00
Yang Tse
18c6c8a5e7 sws.c: improve proxy mode torture testing support - followup to c731fc58 2012-01-16 12:30:03 +01:00
Yang Tse
c731fc58ea sws.c: improve proxy mode torture testing support - followup to d4bf87dc 2012-01-15 20:13:32 +01:00
Daniel Stenberg
f1092b387e test: verify HTTP response code 308
This newly speced HTTP status code already works as intended in the new
spec:
http://greenbytes.de/tech/webdav/draft-reschke-http-status-308-02.html

Test 1325 is added to verify that the method is kept after the redirect
2012-01-14 16:34:59 +01:00
Yang Tse
d4bf87dc0e sws.c: improve proxy mode torture testing support 2012-01-13 05:13:48 +01:00
Yang Tse
123c92c904 sws.c: replace sleep() usage with wait_ms() 2012-01-09 22:50:47 +01:00
gsengun
d28411c3cc FTP: CURLE_PARTIAL_FILE should not cause control connection to be closed
Test 161 updated accordingly
2012-01-09 22:50:20 +01:00
Yang Tse
2705af6267 sws.c: some compiler warning fixes 2012-01-08 19:28:46 +01:00
Yang Tse
dd69a3e868 sws.c: 812fa73057 follow-up 2012-01-06 01:52:45 +01:00
Yang Tse
812fa73057 sws.c: some IPv6 proxy mode peparatory adjustments 2012-01-05 20:52:48 +01:00
Yang Tse
8ef7a5706e test1320 test1321: avoid User-Agent comparison 2012-01-04 19:34:52 +01:00
Yang Tse
c358bab809 httpserver.pl: reorder sws command line options
make 'pidfile' and 'logfile' options appear first on command line in order
to ensure that processing of other options which write to logfile do this
to intended file and not the default one.
2012-01-04 19:28:22 +01:00
Yang Tse
4bc6c1a026 sws.c: fix proxy mode segfault 2012-01-04 19:14:19 +01:00
Daniel Stenberg
2f4a487a68 tests: test IMAP, POP3 and SMTP over HTTP proxy tunnel 2012-01-03 16:12:58 +01:00
Daniel Stenberg
82180643f4 test proxy supports CONNECT
There's a new 'http-proxy' server for tests that runs on a separate port
and lets clients do HTTP CONNECT to other ports on the same host to
allow us to test HTTP "tunneling" properly.

Test cases now have a <proxy> section in <verify> to check that the
proxy protocol part matches correctly.

Test case 80, 83, 95, 275, 503 and 1078 have been converted. Test 1316
was added.
2012-01-03 15:01:22 +01:00
Yang Tse
63e2718f8d runtests.pl: on test failure, don't show trace log files of other tests 2012-01-02 13:40:12 +01:00
Daniel Stenberg
08107111ac runtests: put trace outputs in log/trace[num] for all tests 2012-01-01 19:48:24 +01:00
Daniel Stenberg
207cf15032 changed case: use new host name for subsequent HTTP requests
When a HTTP connection is re-used for a subsequent request without
proxy, it would always re-use the Host: header of the first request. As
host names are case insensitive it would make curl send another host
name case that what the particular request used.

Now it will instead always use the most recent host name to always use
the desired casing.

Added test case 1318 to verify.

Bug: http://curl.haxx.se/mail/lib-2011-12/0314.html
Reported by: Alex Vinnik
2011-12-31 10:45:28 +01:00
Dan Fandrich
9e3f8c4850 runtests.pl: Use logmsg more consistently 2011-12-31 00:49:34 -08:00
Yang Tse
ed0364343d removed trailing whitespace 2011-12-30 03:36:18 +01:00
Yang Tse
5c0ad9581d ftpserver.pl: arbitrary application data splitting among TCP packets [II]
Take in account that 'pingpong' server commands may arrive splitted among
several sockfilt 'DATA' PDU's.
2011-12-29 23:40:06 +01:00
Yang Tse
e99128a5c9 ftpserver.pl: arbitrary application data splitting among TCP packets [I]
Initial step in order to allow our pingpong server to better support arbitrary
application data splitting among TCP packets. This first commit only addresses
reasembly of data that sockfilter processes reads from soockets and pingpong
server later reads from sockfilters stdout.
2011-12-28 23:04:23 +01:00
Yang Tse
33c2e1cafc testcurl.pl: 82c344a3 follow-up 2011-12-27 13:23:47 +01:00
Yang Tse
84f736981c testcurl.pl: log ACLOCAL_FLAGS 2011-12-26 17:09:44 +01:00
Yang Tse
82c344a347 testcurl.pl: third party m4 warnings filtering adjustment
Make testcurl.pl ignore messages pertaining to third party m4 files we don't
care nor use on a file basis policy while retaining all other warnings.

This closes temporary commit e71e226f
2011-12-26 17:01:04 +01:00
Daniel Stenberg
3e4181f88e new test: verify --resolve
Test 1317 verifies --resolve (leaked memory)

Bug: http://curl.haxx.se/bug/view.cgi?id=3463121
Reported by: "tw84452852"
2011-12-23 14:46:20 +01:00
Yang Tse
e71e226f6b testcurl.pl: temporary change
Allow autobuilds to run a couple of days without filtering out aclocal
underquoted definition warnings.
2011-12-23 11:13:39 +01:00
Dan Fandrich
ba238e3a18 runtests.pl: Fixed perl warning when using the -l option 2011-12-20 18:31:53 -08:00
Gokhan Sengun
c834213ad5 FTP: perform active connections non-blocking
1- Two new error codes are introduced.

CURLE_FTP_ACCEPT_FAILED to be set whenever ACCEPTing fails because of
FTP server connected.

CURLE_FTP_ACCEPT_TIMEOUT to be set whenever ACCEPTing timeouts.

Neither of these errors are considered fatal and control connection
remains OK because it could just be a firewall blocking server to
connect to the client.

2- One new setopt option was introduced.

CURLOPT_ACCEPTTIMEOUT_MS

It sets the maximum amount of time FTP client is going to wait for a
server to connect. Internal default accept timeout is 60 seconds.
2011-12-20 20:30:02 +01:00
Daniel Stenberg
e9040f2954 lib500: verify timers relative each other
As commit ce896875f8 fixed a timer that accidentally had been moved in
code and then returned a bad timer, the lib500.c code (used in test 500
and some others) now verifies 5 timers against each other to verify that
they have the correct relative values. We cannot compare against
absolute values as the timings will vary a lot.
2011-12-20 15:41:43 +01:00
Daniel Stenberg
7b8590d1f5 curl -F: fix multiple file upload with custom type
Test case 1315 was added to verify this functionality. When passing in
multiple files to a single -F, the parser would get all confused if one
of the specified files had a custom type= assigned.

Reported by: Colin Hogben
2011-12-16 11:43:25 +01:00
Colin Hogben
9b185aac43 New test for multiple file upload
test 1315 checks correct behaviour when uploading multiple files.
Buggy behaviour has been seen where only two attachments are sent.
2011-12-16 11:39:53 +01:00
Colin Hogben
7111ca6f5f Correct substitution var names
Two variable names were wrong in the documentation.
2011-12-15 17:27:51 +01:00
Gokhan Sengun
2b24dd870e multi interface: fix block when CONNECT_ONLY option is used 2011-12-07 15:37:05 +01:00
Daniel Stenberg
d5b5f64bce FTP: close callback fix
Keep track of which sockets that are the result of accept() calls and
refuse to call the closesocket callback for those sockets. Test case 596
now verifies that the open socket callback is called the same number of
times as the closed socket callback for active FTP connections.

Bug: http://curl.haxx.se/mail/lib-2011-12/0018.html
Reported by: Gokhan Sengun
2011-12-05 12:34:27 +01:00
Daniel Stenberg
088ba97a24 FTP: call opensocket callback properly
When the new socket is created for an active connection, it is now done
using the open socket callback.

Test case 596 was modified to run fine, although it hides the fact that
the close callback is still called too many times, as it also gets
called for closing sockets that were created with accept().
2011-12-05 11:42:10 +01:00
Daniel Stenberg
5971d401d4 test: verify the opensocket callback for FTP
test 595: for passive FTP
test 596: for active FTP
2011-12-04 23:10:12 +01:00
Daniel Stenberg
83350c9cc4 test 815: verify POP3 dot-first-on-line unescaping 2011-12-01 10:20:42 +01:00
Daniel Stenberg
af64666434 POP3: detect when LIST returns no mails
By making sure the function can detect an "end of body" sequence
immediately on the first line, test 811 is now enabled.
2011-11-29 13:43:46 +01:00
Daniel Stenberg
2d72489f0f ftpserver: output CRLF in logs
Previously the log function would just filter out all CR and LF
occurances from the log to make it more readable. This had the downside
that it made it very hard to see CR LFs when they actually matters.

Now, they're instead converted to "[CR]" and "[LR]" in the log to become
apparent to readers.
2011-11-29 13:43:12 +01:00
Daniel Stenberg
dda815b776 POP3: fix end of body detection
Curl_pop3_write() now has a state machine that scans for the end of a
POP3 body so that the CR LF '.' CR LF sequence can come in everything
from one up to five subsequent packets.

Test case 810 is modified to use SLOWDOWN which makes the server pause
between each single byte and thus makes the POP3 body get sent to curl
basically one byte at a time.
2011-11-29 00:25:21 +01:00
Daniel Stenberg
8d3efb6be0 test: added POP3 test with dot-prefixed line
Test 815 is disabled for now since libcurl currently doesn't unescape
such lines the way it should. See mail:

http://curl.haxx.se/mail/lib-2011-11/0324.html
2011-11-28 23:34:16 +01:00
Daniel Stenberg
71ce2470dc test 1211: FTP test to repeat bug #3429299
"Active FTP hangs if server does not open data connection"

The server first sends a 150 and then when libcurl waits for the data
transfer, the server sends a 425.
2011-11-25 23:15:58 +01:00
Daniel Stenberg
ac54d27d4b FTP tests 1206 - 1209: don't expect QUIT
The protocol parts for these tests do not include QUIT simply because
the error is CURLE_OPERATION_TIMEDOUT (28) which is a generic timeout
error without specificly saying for which connection it concerns, and
for timeouts libcurl marks the control channel as "invalid". As this
test case times out for the data connection it could still use the
control channel.
2011-11-25 22:49:49 +01:00
Yang Tse
97d7a9260e tvdiff_secs(): sub-zero time difference adjustment
Skip a floating point addition operation when integral part of time difference
is zero. This avoids potential floating point addition rounding problems while
preserving decimal part value.
2011-11-25 13:51:55 +01:00
Jonas Schnelli
2c905fd1f8 query-part: ignore the URI part for given protocols
By setting PROTOPT_NOURLQUERY in the protocol handler struct, the
protocol will get the "query part" of the URL cut off before the data is
handled by the protocol-specific code. This makes libcurl adhere to
RFC3986 section 2.2.

Test 1220 is added to verify a file:// URL with query-part.
2011-11-24 23:31:19 +01:00
Yang Tse
c482e946f7 lib573.c: fix double data type variable comparison with zero 2011-11-24 18:18:42 +01:00
Daniel Stenberg
c532604b13 -J -O: use -O name if no Content-Disposition header comes!
A regression between 7.22.0 and 7.23.0 -- downloading a file with the
flags -O and -J results in the content being written to stdout if and
only if there was no Content-Disposition header in the http response. If
there is a C-D header with a filename attribute, the output is correctly
written.

Reported by: Dave Reisner
Bug: http://curl.haxx.se/mail/archive-2011-11/0030.html
2011-11-20 23:35:49 +01:00
Jonas Schnelli
c0db5ff678 test: SFTP quote commands with * prefix
Related to the f64812ca63 commit
2011-11-18 20:30:46 +01:00
Jonas Schnelli
f64812ca63 SFTP: support '*' prefix for quote operations
prefixing a command with '*' means it is allowed to fail without
aborting the chain actions
2011-11-18 16:04:52 +01:00
Alejandro Alvarez Ayllon
97b73fec7a libtest build: add the missing lib586 2011-11-17 23:33:42 +01:00
Yang Tse
082e8a3b03 Active mode FTP test cases with server not establishing data connection
591 -> FTP multi PORT and 425 on upload
592 -> FTP multi PORT and 421 on upload
593 -> FTP multi PORT upload, no data conn and no transient neg. reply
594 -> FTP multi PORT upload, no data conn and no positive prelim. reply

1206 -> FTP PORT and 425 on download
1207 -> FTP PORT and 421 on download
1208 -> FTP PORT download, no data conn and no transient negative reply
1209 -> FTP PORT download, no data conn and no positive preliminary reply
2011-11-11 19:46:44 +01:00
Daniel Stenberg
2c09d21fdf test 590: verify the bug fix in 4851dafcf1
This test is created to verify Rene Bernhardt's patch which makes sure
libcurl properly _not_ deals with Negotiate if not asked to even if the
proxy says it can serve it.
2011-11-06 17:28:28 +01:00
Yang Tse
3f5e267b9d FTP test server: NODATACONN commands follow-up
Make NODATACONN425 and NODATACONN421 return a 150 positive preliminary reply
before 425 or 421.

New NODATACONN150 returns 150 without further positive nor negative reply

Now NODATACONN doesn't reply anything at all.
2011-11-02 13:38:31 +01:00
Yang Tse
af425efe83 FTP test server: NODATACONN commands follow-up
Make NODATACONN custom commands apply to both active and passive FTP,
and ensure 425 and 421 are not returned unless data channel usage is
attempted.
2011-11-01 14:11:36 +01:00
Yang Tse
8bfc3a800a FTP test server: NODATACONN commands commit c761fcb0 follow-up
Adjustments that make NODATACONN custom commands fully usable.
2011-10-31 07:29:13 +01:00
Yang Tse
0b315c1cf1 FTP test server: fix server unresponsiveness
Some torture tests left FTP test server in an unresponsive state, resulting
in torture tests that actually completed following unexpected code paths.

Changes in this commit solely address this issue and some adjustments for
ftpserver.pl logging relative to data channel establishment and tear down.
Pending NODATACONN relative adjustments reserved for a further commit.
2011-10-30 17:12:20 +01:00
Yang Tse
e2928e1555 runtests.pl: running server checks - commit 4464583a follow-up
Ensure verification takes place with no server commands file.
Ignore verbose setting for running server precheck.
Tweak unresponsive server message, to allow detection by haxx.se scripts.
2011-10-30 16:45:14 +01:00
Yang Tse
bae4e3f035 runtests.pl: running server checks - commit 3676ec96 follow-up
Fix called sub when checking TFTP server, and adjust message.
2011-10-28 15:59:36 +02:00
Yang Tse
3676ec9680 runtests.pl: running server checks - commit 4464583a follow-up
Extended server checks to others in addition to pingpong when torture testing.
2011-10-28 00:05:16 +02:00
Yang Tse
8ccf7bf8d7 lib589.c: add CURLOPT_READDATA missing stuff 2011-10-27 22:00:23 +02:00
Yang Tse
c761fcb055 ftpserver.pl: three new custom FTP server commands to disable data channel
NODATACONN421: applies only to active FTP mode, instructs server to not
establish data connection back to client and reply with FTP 421.

NODATACONN425: applies only to active FTP mode, instructs server to not
establish data connection back to client and reply with FTP 425.

NODATACONN: applies to both active and passive FTP modes, instructs server
to not establish nor accept a data channel and fool client into believing
that the data channel connection is possible.

Some polishing probably required.
2011-10-27 21:59:00 +02:00
Yang Tse
692f344118 test 589: active FTP upload using multi timeout and EPRT disabled server 2011-10-26 18:57:14 +02:00
Yang Tse
51e5a2bf3f multi tests: OOM handling fixes - commit 629d2e34 follow-up 2011-10-26 18:57:14 +02:00
Yang Tse
4464583a6e runtests.pl: running server checks
When running torture tests, verify before each test case that required
pingpong servers which are supposed to be alive are actually responsive.
If found not responsive then restart them.
2011-10-25 23:19:36 +02:00
Daniel Stenberg
22502c9550 dist: add test 587
I created test 587 in commit 840eff44f2 but forgot to add the file to
the tarball. Added now.
2011-10-24 23:09:59 +02:00
Daniel Stenberg
39c6d18d9c test 588: verify active FTP with multi interface without EPRT
This is using the verbatim 525 test code but it disables EPRT in the
server and this should work just as well anyway.
2011-10-24 23:08:16 +02:00
Daniel Stenberg
f4405d30e0 FTP server: allow EPRT by default
EPRT is now supported by default by the server. To disable it, use the
generic REPLY instruction in the <servercmd> tag. Test 116 now has it
disabled. All other existing active FTP port tests strip out the port
commands from the logs already so the change of the server isn't that
noticable.
2011-10-24 23:07:53 +02:00
Yang Tse
134e87c53b ftpserver.pl: ensure integral number usage for passive mode string 2011-10-24 20:45:12 +02:00
Daniel Stenberg
515f11e79b large headers: have curl accept >16K headers
As commit 5850cc4808 clarifies, libcurl can deliver header lines that
are longer than CURL_MAX_WRITE_SIZE, only body data is limited to that
size. The curl tool has check (when built debug-enabled) that made the
wrong checks and this new test 1205 verifies that larger headers work.
2011-10-24 17:28:41 +02:00
Dan Fandrich
d67b75c9f9 Added some missing test case XML tags and keywords 2011-10-21 13:33:40 -07:00
Yang Tse
9d0d1ada05 runtests.pl: fix printing of multivalued error codes 2011-10-21 16:52:15 +02:00
Yang Tse
629d2e3450 multi tests: OOM handling fixes
Additionally, improved error checking and logging.
2011-10-21 16:52:14 +02:00
Daniel Stenberg
ff0a295cdb Curl_http_input_auth: handle multiple auths in WWW-Authenticate
The fix is pretty much the one Nick Zitzmann provided, just edited to do
the right indent levels and with test case 1204 added to verify the fix.

Bug: http://curl.haxx.se/mail/lib-2011-10/0190.html
Reported by: Nick Zitzmann
2011-10-20 13:12:02 +02:00
Dan Fandrich
cf0f6729e7 Silenced a compiler warning about an unused variable 2011-10-19 21:18:52 -07:00
Daniel Stenberg
840eff44f2 formdata: ack read callback abort
When doing a multipart formpost with a read callback, and that callback
returns CURL_READFUNC_ABORT, that return code must be properly
propagated back and handled accordingly. Previously it would be handled
as a zero byte read which would cause a hang!

Added test case 587 to verify. It uses the lib554.c source code with a
small ifdef.

Reported by: Anton Bychkov
Bug: http://curl.haxx.se/mail/lib-2011-10/0097.html
2011-10-16 01:09:56 +02:00
Yang Tse
fd10c047df sws.c: HTTP and GOPHER test server-side connection closing adjustment
When, for a given test, server is instructed to close connection after
server reply we now wait a very small amount of time (50ms) before doing
so. This is done to allow client to, at least partially, read server
reply before getting an ECONNRESET.

The above is required to make test cases 1070, 1200, 1201 and 1202 pass
with Cygwin 1.5.X on W2K.

GOPHER test server closes connection after _every_ server-reply, as such,
at some point it could require a bigger time or using shutdown() before
a server-side initiated disconnection.
2011-10-14 17:33:05 +02:00
Yang Tse
a84b8a3922 lib540.c: OOM handling fixes making test 540 pass torture testing 2011-10-10 12:27:17 +02:00
Yang Tse
17f48fe879 libcurl: some OOM handling fixes 2011-10-07 20:50:57 +02:00
Yang Tse
1958fe5745 test harness: non-stunnel https server integration overhaul 2011-10-06 20:26:42 +02:00
Alejandro Alvarez
5793bc370c SSL session sharing support added
With locking, plus test, plus documentation
2011-09-28 23:06:34 +02:00
Daniel Stenberg
bd158607ca tests/README: extended and reformatted 2011-09-27 22:14:24 +02:00
Daniel Stenberg
e9cf4cb791 test 814: smtp without --mail-from
Verifies the fix from commit 322f3d5af7
2011-09-21 22:32:27 +02:00
Daniel Stenberg
81b41095ef Curl_follow: handle redirects to "//hostname/path" 2011-09-20 11:16:40 +02:00
warp kawada
aff70e2e95 Curl_add_custom_headers: support headers with no data
A custom HTTP header ending in a semicolon instead of a colon
will be treated as a header to be added without any data
portion.
2011-09-13 16:17:21 -07:00
Yang Tse
0413e24891 runtests.pl: replace TAB with spaces 2011-09-10 01:23:21 +02:00
Yang Tse
be8e68494c test harness: revert needless commit 0a5bbb2ac1
https, ftps and ssh servers allowed start up time back to previous values
2011-09-10 01:14:52 +02:00
Yang Tse
28d09cb0f5 lib582.c: fix segfault triggered when torture testing test case 582 2011-09-08 01:22:47 +02:00
Yang Tse
6539047694 test case 583: ensure that test failures don't go unnoticed - follow-up 2011-09-06 19:59:42 +02:00
Yang Tse
774ad4e31d test suite: libtest header inclusion cleanup - follow-up
Adjust tests/libtest/Makefile.inc and remove a couple of unused headers from
tests/libtest/lib583.c
2011-09-06 18:11:11 +02:00
Yang Tse
f764da8afb test case 583: ensure that test failures don't go unnoticed 2011-09-06 17:56:39 +02:00
Yang Tse
c8ba8740b9 test suite: libtest header inclusion cleanup
Added missing memoryTracking to test cases 560 and 583. If this triggers
leak detection on these, it only means that previously it was going unnoticed.
2011-09-06 17:47:54 +02:00
Yang Tse
a50210710a fix bool variables checking and assignment 2011-09-05 20:46:09 +02:00
Yang Tse
eb44ac0138 test suite: use test case specific netrc file names 2011-09-05 12:39:50 +02:00
Yang Tse
6b75d2c2df fix a bunch of MSVC compiler warnings 2011-09-03 16:07:09 +02:00
Yang Tse
0a5bbb2ac1 test harness: https, ftps and ssh servers allowed start up time increased 33% 2011-09-01 22:21:57 +02:00
Yang Tse
437848d754 test harness: fix detection of test harness client knownhosts file
Regenerate curl's tests client knownhosts file also when, somehow,
this file is empty.
2011-08-31 19:59:26 +02:00
Yang Tse
38fff918f9 test harness: fix detection of test harness host and client key files
Regenerate curl's tests host and client key files also when, somehow,
any of these files are empty.
2011-08-31 18:16:14 +02:00
Kamil Dudka
3445fa2e3f tests: break busy loops in tests 502, 555, and 573 2011-08-29 15:14:39 +02:00
Yang Tse
b976d108f1 NTLM_WB: final congruency naming adjustments
Configure script option --enable-wb-ntlm-auth renamed to --enable-ntlm-wb
Configure script option --disable-wb-ntlm-auth renamed to --disable-ntlm-wb

Preprocessor symbol WINBIND_NTLM_AUTH_ENABLED renamed to NTLM_WB_ENABLED
Preprocessor symbol WINBIND_NTLM_AUTH_FILE renamed to NTLM_WB_FILE

Test harness env var CURL_NTLM_AUTH renamed to CURL_NTLM_WB_FILE

Static function wb_ntlm_close renamed to ntlm_wb_cleanup
Static function wb_ntlm_initiate renamed to ntlm_wb_init
Static function wb_ntlm_response renamed to ntlm_wb_response
2011-08-27 06:31:18 +02:00
Yang Tse
b4f6319cf7 NTLM single-sign on adjustments (XI)
Feature string literal NTLM_SSO renamed to NTLM_WB.
Preprocessor symbol USE_NTLM_SSO renamed to WINBIND_NTLM_AUTH_ENABLED.
curl's 'long' option 'ntlm-sso' renamed to 'ntlm-wb'.
Fix some comments to make clear that this is actually a NTLM delegation.
2011-08-27 01:33:35 +02:00
Yang Tse
fd00b382b2 base64: fix Curl_base64_encode and Curl_base64_decode interfaces
Previous interfaces for these libcurl internal functions did not allow to tell
apart a legitimate zero size result from an error condition. These functions
now return a CURLcode indicating function success or otherwise specific error.
Output size is returned using a pointer argument.

All usage of these two functions, and others closely related, has been adapted
to the new interfaces. Relative error and OOM handling adapted or added where
missing. Unit test 1302 also adapted.
2011-08-24 08:10:30 +02:00
Yang Tse
a659cc4794 runtests.pl: option -gw for single test windowed debugging (where possible) 2011-08-21 19:25:35 +02:00
Yang Tse
838dd8f594 MemoryTracking: adjust initialization calling - followup
Fix macro definition
2011-08-21 06:10:52 +02:00
Yang Tse
aaab5fa299 MemoryTracking: adjust initialization calling
Calling of curl_memdebug() was still done with a pending free()
2011-08-20 17:26:42 +02:00
Daniel Stenberg
7b054a42aa test573: fix the keywords 2011-08-19 00:15:37 +02:00
Daniel Stenberg
ef2059a44c test572: fixed
Two problems were fixed:

GET_PARAMETER responses that have no body must be 204 response or
properly set length to 0.

One of the <data> sections had the wrong content-length for its
GET_PARAMETER response.

Enabled test 572 again.
2011-08-15 22:40:28 +02:00
Yang Tse
6a7ce5cc76 tests: disable #572 2011-08-15 00:20:32 +02:00
Daniel Stenberg
7c21c1c4f9 cookie parser: handle 'secure='
There are two keywords in cookie headers that don't follow the regular
name=value style: secure and httponly. Still we must support that they
are written like 'secure=' and then treat them as if they were written
'secure'. Test case 31 was much extended by Rob Ward to test this.

Bug: http://curl.haxx.se/bug/view.cgi?id=3349227
Reported by: "gnombat"
2011-08-09 14:02:05 +02:00
Daniel Stenberg
45d883d88d CURLFORM_BUFFER: insert filename as documented
A regression where CURLFORM_BUFFER stopped to properly insert the file
name part in the formpart. Bug introduced in commit f851f76857.

Added CURLFORM_BUFFER use to test 554 to verify this.

Bug: http://curl.haxx.se/mail/lib-2011-07/0176.html
Reported by: Henry Ludemann
2011-08-08 18:45:03 +02:00
Daniel Stenberg
afe88d85f4 test710: verify that --proxy socks5://hostname works 2011-08-05 00:46:59 +02:00
Daniel Stenberg
75fa3d2d6e test709: HTTP GET via SOCKS5 set in environment 2011-08-05 00:28:03 +02:00
Daniel Stenberg
86b50a1fe5 test1313: test content-disposition with uneven quotes 2011-08-04 23:25:55 +02:00
Daniel Stenberg
519d0c0dd2 -J: support ';' in quoted file names
Content-disposition headers can provide file names with semicolons which
previously would be cut off at that point.

Added test case 1311 and 1312 to verify -J.

Bug: http://curl.haxx.se/bug/view.cgi?id=3375603
Reported by: Peter Hjalmarsson
2011-08-04 17:48:45 +02:00
Daniel Stenberg
d2c22411af getpart.pm: when no part match, return blank when section ends 2011-08-04 17:36:31 +02:00
Daniel Stenberg
c4142034ff runtests.pl: support option=no-include 2011-08-04 17:36:00 +02:00
Yang Tse
10a0bed485 NTLM single-sign on adjustments (VIII)
Use preprocessor symbols WINBIND_NTLM_AUTH_ENABLED and WINBIND_NTLM_AUTH_FILE
for Samba's winbind daemon ntlm_auth helper code implementation and filename.

Retain preprocessor symbol USE_NTLM_SSO for NTLM single-sign-on feature
availability implementation independent.

For test harness, prefix NTLM_AUTH environment vars with CURL_

Refactor and rename configure option --with-ntlm-auth to --enable-wb-ntlm-auth[=FILE]
2011-07-31 20:44:41 +02:00
Dan Fandrich
cc3e01cfae Renumbered test2005 to test1310
The 20xx range is for multiple sequential tests.
2011-07-29 12:35:52 -07:00
Yang Tse
bcbac913d6 socketpair() usage tracking to allow fd leak detection 2011-07-29 13:27:10 +02:00
Yang Tse
5cdbfa1837 fix compiler warning 2011-07-29 13:27:08 +02:00
Yang Tse
35051d274f NTLM single-sign on adjustments (VI)
Fix compiler warning
2011-07-28 22:47:42 +02:00
Dan Fandrich
435e2bc757 Removed an extraneous \n that violated the SSO daemon protocol
This caused fake_ntlm to abort due to an invalid command
causing sporadic test 2005 failures.
2011-07-28 12:41:44 -07:00
Yang Tse
99848d3dab NTLM single-sign on adjustments (V)
Enhance test harness fake_ntlm logging upon invalid input.
2011-07-28 21:12:41 +02:00
Yang Tse
dddf9aa610 NTLM single-sign on adjustments (IV)
Fix compiler warning
2011-07-27 20:10:02 +02:00
Yang Tse
6ac4eeab2f NTLM single-sign on adjustments (II)
Ensure test harness fake_ntlm main function can properly handle arguments.
2011-07-27 19:04:55 +02:00
Yang Tse
8350fb8f2f NTLM single-sign on adjustments (I)
Use fake_ntlm absolute filename in NTLM_AUTH environment variable for test
2005 definition.
2011-07-27 18:58:21 +02:00
Dan Fandrich
cfcca89b76 Fixed test 2005 to work in out-of-tree builds
Also, set the test number in the test data file so fake_ntlm can
be reused in future tests.
2011-07-26 12:48:16 -07:00
Yang Tse
78bbd0eecf fix compiler warning 2011-07-26 19:42:16 +02:00
Yang Tse
ef2176109f errno.h inclusion conditionally done in setup_once.h 2011-07-24 04:39:43 +02:00
Daniel Stenberg
3f9b4afdfd http error response: stop sending when error is received
When libcurl has said to the server that there's a POST or PUT coming
(with a content-length and all) it has to either deliver that amount of
data or it needs to close the connection before trying a second request.

Adds test case 1129, 1130 and 1131

The bug report is about when used with 100-continue, but the change is
more generic.

Bug: http://curl.haxx.se/mail/lib-2011-06/0191.html
Reported by: Steven Parkes
2011-07-20 00:08:41 +02:00
Daniel Stenberg
0ae15092d4 test2005: require a debug build 2011-07-19 23:50:34 +02:00
Daniel Stenberg
b9313af838 runtests: add 'debug' as a feature a test can require 2011-07-19 23:49:40 +02:00
Daniel Stenberg
177fd0a14c gitignore: ignore fake_ntlm 2011-07-18 23:49:31 +02:00
Mandy Wu
aa26c2751a test2005: verify ntlm single-signon 2011-07-18 23:48:53 +02:00
Daniel Stenberg
650a504b2f sws: don't enable pipelining for requests with content-length
Log texts also modified and some white space edits
2011-07-17 00:39:23 +02:00
Daniel Stenberg
9c1f50c583 runtests: ignore the 'all_proxy' environment variable as well
We should probably also make sure that [protocol]_proxy for all possible
protocols libcurl supports are unset.
2011-07-14 11:04:00 +02:00
Daniel Stenberg
c7a4df16e0 sws: allow multiple commands in <servercmd> 2011-07-03 19:15:06 +02:00
Daniel Stenberg
fb48e2050b libtests: stop checking for CURLM_CALL_MULTI_PERFORM
CURLM_CALL_MULTI_PERFORM stopped being a valid return code from
curl_multi_perform back in 7.20.0. All the libcurl tests are ajusted to
this and no longer check for this return code. Makes them simpler.
2011-06-27 16:01:41 +02:00
Dan Fandrich
78480892cd Fixed test 1300 to pass the memory torture test 2011-06-24 12:33:30 -07:00
Dan Fandrich
17a2d70dc4 Display notes from setup file in testcurl.pl
Autobuild submitters can use this to add some text to their
setup files to describe issues they've found with the build
or tests. This could include laying blame on test failures on
network issues or dependent libraries, explaining away compiler
warnings or providing any additional information that could be
useful to people reviewing and investigating problems with the
publicly available autobuild logs.  Note that persistent test
failures that are not issues with curl itself should normally be
fixed by excluding them from the test run instead.

This is an entirely optional field that is not entered by the
user the first time a new build is created.
2011-06-23 22:49:28 -07:00
Dan Fandrich
43ce5580a8 Added a leap second test to test517 2011-06-23 21:20:29 -07:00
Daniel Stenberg
0215f7cb4d runtests.pl: warn if a test is explicitly disabled
Just to make sure a user is aware of it.
2011-06-23 23:10:00 +02:00
Daniel Stenberg
57d51be60c parsedate: detect more invalid dates better 2011-06-23 13:49:29 +02:00
Ori Avtalion
af6dcc92d5 [pop3] remove extra space in LIST command
Some servers, e.g. mail.bezeqint.net:110, consider it a syntax error
2011-06-21 18:12:05 +03:00
Amr Shahin
c9f16e67ef unitteset: Curl_llist_move
adding unit test for Curl_llist_move, documenting unit-tested functions
in llist.c, changing unit-test to unittest, replacing assert calls with
abort_unless calls
2011-06-19 22:22:49 +02:00
Daniel Stenberg
f851f76857 CURLFORM_STREAM: acknowledge CURLFORM_FILENAME
The CURLFORM_STREAM is documented to only insert a file name (and thus
look like a file upload) in the part if CURLFORM_FILENAME is set, but in
reality it always inserted a filename="" and if CURLFORM_FILENAME wasn't
set, it would insert insert rubbish (or possibly crash).

This is now fixed to work as documented, and test 554 has been extended
to verify this.

Reported by: Sascha Swiercy
Bug: http://curl.haxx.se/mail/lib-2011-06/0070.html
2011-06-17 22:23:42 +02:00
Daniel Stenberg
0aedccc18a curl_formget: fix FILE * leak
Properly deal with the fact that the last fread() call most probably is
a short read, and when using callbacks in fact all calls can be short
reads. No longer consider a file read done until it returns a 0 from the
read function.

Reported by: Aaron Orenstein
Bug: http://curl.haxx.se/mail/lib-2011-06/0048.html
2011-06-13 22:32:00 +02:00
Dan Fandrich
a6fa7fc38e Added http as a dependency of test 1308 2011-06-11 17:02:37 -07:00
Daniel Stenberg
b122f8be61 test1309: added to the dist 2011-06-12 00:10:51 +02:00
Daniel Stenberg
950fb3efcc write: add return code checks when used
These were just warnings in test code but it still makes it nicer to not
generate them.
2011-06-11 23:01:09 +02:00
Dan Fandrich
b688f2c260 Fixed test 1309 to pass the torture test
Removing dynamic allocations also simplifies the test.
2011-06-11 00:10:09 -07:00
Daniel Stenberg
c4dd8df081 splay: add unit tests
The test code that was #ifdef'ed in the code was converted into unit
tests in test case 1309. I also removed the #if 0'ed code from splay.c
2011-06-10 20:19:35 +02:00
Daniel Stenberg
36a22f9074 unit test formpost: added test case 1308
This is a few first rather basic tests of curl_formadd() and
curl_formget(). Should serve as building blocks to add more variations
to the test.
2011-06-10 12:03:29 +02:00
Daniel Stenberg
c0b9dd27b5 HTTP time condition: force closure for 200 OK
When a time condition isn't met, so that no body is delivered to the
application even though a 2xx response is being read from the server, we
must close the connection to avoid a re-use of the connection to be
completely tricked.

Added test 1128 to verify.
2011-06-07 13:40:11 +02:00
Yang Tse
2a31dde76c unit tests: attempt to fix linkage issue 2011-06-02 22:26:01 +02:00
Yang Tse
aa76dec33a unit tests: more build adjustments 2011-06-01 21:40:09 +02:00
Yang Tse
685359d4c3 makefile: avoid preprocessor definition usage when linking 2011-06-01 14:43:25 +02:00
Daniel Stenberg
3d64ed25df testcurl.pl: allow configure args to use '=' 2011-05-31 13:35:26 +02:00
Yang Tse
f5d78919af distribution: Fix EXTRA_DIST letter case 2011-05-27 13:37:20 +02:00
Yang Tse
5d39dea3b3 compiler warning: fix
Fix compiler warning: variable was set but never used

Fix compiler warning: clobber ignored
2011-05-26 12:40:04 +02:00
Yang Tse
9f390a356e unit tests: build adjustment
Also define UNITTESTS macro when building unit test sources.

Fixing compiler warning: external definition with no prior declaration
2011-05-25 20:24:03 +02:00
Yang Tse
9b5343054a unit tests: README, adjust header inclusion order 2011-05-24 21:23:52 +02:00
Yang Tse
ec33742d1b compiler warning: fix
Fix compiler warning: external definition with no prior declaration
2011-05-24 17:35:08 +02:00
Yang Tse
2ea31b0e6f compiler warning: fix
Fix compiler warning: external definition with no prior declaration
2011-05-24 17:29:50 +02:00
Yang Tse
de70ddb749 compiler warning: fix
Fix compiler warning: argument is incompatible with corresponding format
string conversion
2011-05-24 17:24:59 +02:00
Yang Tse
8b849265d8 compiler warning: fix
Fix compiler warning: enumerated type mixed with another type
2011-05-21 14:39:42 +02:00
Yang Tse
02f3ff3b0a unit tests: adjust header inclusion order
Additionally, prevent multiple inclusions of curl_config.h
2011-05-21 13:22:11 +02:00
Yang Tse
b578534508 tests: verify OPEN/CLOSESOCKETFUNCTION
Test 585: Fix opensocket return type, and avoid function name clash.
2011-05-19 22:28:28 +02:00
Daniel Stenberg
873d70a6d8 tests: verify OPEN/CLOSESOCKETFUNCTION
Test 585 and 586 were added. Using a modified lib500.c
2011-05-18 22:56:46 +02:00
Daniel Stenberg
0c8e6f598a tests: added HTTP If-Modified-Since tests
Added test 1126 and 1127 to verify curl's behaviour when If-Modified-Since
is used and a 200 is returned.

The list of test cases in Makefile.am is now sorted numerically.
2011-05-13 08:55:15 +02:00
Daniel Stenberg
3b1b26578f proxy: allow socks:// prefix in proxy string
Inspired by a patch from OB.Conseil. Added test case 708 to verify.
2011-04-28 15:08:09 +02:00
Daniel Stenberg
4a42e5cdaa multi-socks: fix connect to proxy
When connecting to a socks or similar proxy we do the proxy handshake at
once when we know the TCP connect is completed and we only consider the
"connection" complete after the proxy handshake. This fixes test 564
which is now no longer considered disabled.

Reported by: Dmitri Shubin
Bug: http://curl.haxx.se/mail/lib-2011-04/0127.html
2011-04-28 10:06:49 +02:00
Dan Fandrich
d8373cb992 Fixed test 1023 when using daily snapshots 2011-04-21 14:47:35 -07:00
Dan Fandrich
7872c8d5a2 Fixed closing test tag 2011-04-20 16:51:44 -07:00
Dan Fandrich
1b6df743f6 Fixed test 1022 when using daily snapshots 2011-04-20 14:11:12 -07:00
Daniel Stenberg
8e4fb01e64 transfer-encoding: added new option and cmdline
Added CURLOPT_TRANSFER_ENCODING as the option to set to request Transfer
Encoding in HTTP requests (if built zlib enabled). I also renamed
CURLOPT_ENCODING to CURLOPT_ACCEPT_ENCODING (while keeping the old name
around) to reduce the confusion when we have to encoding options for
HTTP.

--tr-encoding is now the new command line option for curl to request
this, and thus I updated the test cases accordingly.
2011-04-18 19:46:21 +02:00
Daniel Stenberg
9d191a6a40 TE: do the Connection: header
When TE: is inserted in the request, we must add a "Connection: TE" as
well to be HTTP 1.1 compliant. If a custom Connection: header is passed
in, we must use that and only append TE to it. Test case 1125 verifies
TE: + custom Connection:.
2011-04-18 19:46:21 +02:00
Daniel Stenberg
be973b6f91 test1124: verify gzip AND chunked transfer-encoding 2011-04-18 19:46:21 +02:00
Daniel Stenberg
0790b27910 HTTP: add support for gzip and deflate Transfer-Encoding
Transfer-Encoding differs from Content-Encoding in a few subtle ways,
but primarily it concerns the transfer only and not the content so when
discovered to be compressed we know we have to uncompress it. There will
only arrive compressed transfers in a response after we have requested
them with the appropriate TE: header.

Test case 1122 and 1123 verify.
2011-04-18 19:46:21 +02:00
Daniel Stenberg
82ecc85d9e curl-config: fix --version
curl-config --version didn't output the correct version string (bug
introduced in commit 0355e33b5f), and unfortunately the test
case 1022 that was supposed to check for this was broken.

This change fixes the test to detect this problem and it fixes the
output.

Bug: http://curl.haxx.se/bug/view.cgi?id=3288727
2011-04-18 09:03:12 +02:00
Chris Smowton
d54668eb00 HTTP pipelining: Fix handling of zero-length responses
Also add test case 584 for the same

Bug: http://curl.haxx.se/bug/view.cgi?id=3214223
2011-04-07 14:18:07 +02:00
Dan Fandrich
c22c258029 Changed some nonportable types 2011-04-05 22:31:45 -07:00
Daniel Stenberg
9680df4807 headers: more copyright headers added 2011-03-22 22:48:11 +01:00
Julien Chaffraix
8702ebff74 unit1305: Fixed the test to match our coding style. 2011-03-20 08:03:25 -07:00
Dan Fandrich
7f57fb359d Added two more POP3 tests 2011-03-18 13:59:48 -07:00
Daniel Stenberg
4b51484a68 symbol-scan.pl: detect duplicates
Test 1119 now also makes sure that symbols-in-versions doesn't contain
any duplicates
2011-03-18 15:42:58 +01:00
Dan Fandrich
ef1c18b952 Added support for LISTing a single POP3 message
Added tests for a number of POP3 LIST operations, including one
that shows a curl problem when listing no messages, so is
disabled.
2011-03-17 16:59:30 -07:00
Daniel Stenberg
14e8b13a45 lib582: use curl_socket_t for portability 2011-03-15 18:37:35 +01:00
Guenter Knauf
5a433a033f Removed unused var. 2011-03-15 12:21:58 +01:00
Daniel Stenberg
6c5448d59f test 582: enabled again
Commit ca37692bf4 should now hopefully make it run
2011-03-13 14:11:48 +01:00
Daniel Stenberg
e649a7baae Revert "test582: enabled"
This reverts commit b847818740.
2011-03-13 00:55:27 +01:00
Daniel Stenberg
0718b7e31e test583: verify early SSH multi remove handle
This test case is meant to verify that the logic in commit
60172a0446 actually works. This test failed for me before that
change and it works after it.
2011-03-13 00:18:04 +01:00
Daniel Stenberg
b847818740 test582: enabled 2011-03-12 23:10:58 +01:00
Daniel Stenberg
7612ca2a7e test582: improved info messages 2011-03-12 23:01:16 +01:00
Daniel Stenberg
1aeb635cdd sources: update source headers
All C and H files now (should) feature the proper project curl source
code header, which includes basic info, a copyright statement and some
basic disclaimers.
2011-03-10 12:04:33 +01:00
Daniel Stenberg
08221e738d tests: phase out haxx.se
Instead of using haxx.se as a fixed magic host name in lots of tests,
this is a first step to move toward the generic example.com host
instead.
2011-03-09 23:05:44 +01:00
Daniel Stenberg
16dcd13a2a test523: avoid using haxx.se
... since search engines find what they think is a URL in this, they
hammer www.haxx.se on this port!
2011-03-09 23:05:44 +01:00
Daniel Stenberg
3d3735d9a1 lib582: used for test 582
Accidentally not included in commit 0e74e1d8d8
2011-03-08 08:22:06 +01:00
Henry Ludemann
0e74e1d8d8 sftp-multi: test 582 added
Add test 582 for uploading a file using sftp and the multi interface.

(Patch and test slightly tweaked by Daniel Stenberg)

Initially marked as disabled until it is fixed in the source.
2011-03-08 00:20:48 +01:00
Dan Fandrich
c60a6153be Moved test 577 into the unit test framework as test 1307 2011-03-04 15:56:40 -08:00
Dan Fandrich
80225b08cd Added unit test 1306 so tests 558 & 559 are now fully replaced 2011-03-04 15:13:12 -08:00
Dan Fandrich
bfc491a2d2 The unit test argument is allowed to be used 2011-03-04 15:11:21 -08:00
Dan Fandrich
fb199cd29d Converted tests 558 & 559 to use the unit test framework as 1305
Test 558 was just a subset of 559 which is something that can be
easily added later.
2011-03-04 14:32:58 -08:00
Dan Fandrich
a8aab6e7d4 Fixed test 1300 to pass the torture test 2011-03-04 13:54:04 -08:00
Dan Fandrich
32aedf1d3d Added abort_* unit test macros
These are for when a test failure makes it impossible to continue
running further tests.
2011-03-04 13:53:15 -08:00
Daniel Stenberg
2345c1dd66 runtests.pl/stopserver: space separate pids
The stopserver function would append pids to kill and could append them
without separating them with space properly. The result would be a very
large number that by (some implementations of) kill would be interpreted
as a negative number and that process group would be wiped...

Bug: http://curl.haxx.se/bug/view.cgi?id=3188836
Reported by: Greg Pratt
2011-02-22 13:42:00 +01:00
Julien Chaffraix
9f8e960a1a tests: Cleaned up netrc testing.
Removed the "netrc_debug" keyword replaced with --netrc-file additions.
Removed the debug code from Curl_parsenetrc as it is superseeded by
--netrc-file.
2011-02-20 21:11:52 -08:00
Julien Chaffraix
311bd4c7b1 netrc: Enable setting up the filename in unit tests.
Unset the environment variable so that we can specify different
filenames in the unit test.
2011-02-10 07:38:48 -08:00
Julien Chaffraix
39d0d787d2 test1304: Added some unit tests for Curl_parsenetrc.
Moved some definitons into the header file so that we can reuse them.
2011-02-10 07:38:48 -08:00
Daniel Stenberg
08a77025c6 unit1300: code style cleanup 2011-02-02 13:35:55 +01:00
Amr Shahin
7a4b5079c6 adding unit tests for Curl_llist_remove 2011-02-02 13:24:04 +01:00
Daniel Stenberg
28c830efd8 test: add test 580 to the dist 2011-01-28 00:24:47 +01:00
Daniel Stenberg
20690e412d tests: more multiple headers checks 2011-01-25 18:09:54 +01:00
Daniel Stenberg
dbcaa00657 HTTP: memory leak on multiple Location:
The HTTP parser allocated memory on each received Location: header
without properly freeing old data. Starting now, the code only considers
the first Location: header and will blissfully ignore subsequent ones.

Bug: http://curl.haxx.se/bug/view.cgi?id=3165129
Reported by: Martin Lemke
2011-01-25 12:06:50 +01:00
Guenter Knauf
73b518f269 Fixed C++ style comment not allowed in ISO C90. 2011-01-22 09:52:09 +01:00
Dan Fandrich
3427bece89 Mention axTLS in some more documentation 2011-01-21 14:27:10 -08:00
Daniel Stenberg
e79c1e39e9 runtests.pl: make -s not show skipped tests 2011-01-20 23:17:22 +01:00
Amr Shahin
77f0fcae0e unittest: add 3 tests to test1300
Testing Curl_llist_insert_next
2011-01-20 23:16:30 +01:00
Daniel Stenberg
511031c8d8 dist: add new certs to tarball 2011-01-19 21:02:54 +01:00
Quinn Slack
59cf93ccdb TLS-SRP: support added when using GnuTLS 2011-01-19 20:35:02 +01:00
Dan Fandrich
ebb9c7ae04 Made unit_setup() return an error code to abort the test early
This makes it possible to skip the call to unit_stop() in such
cases.  Also use Curl_safefree() in unit test 1302 so it will
pass the memory torture test.
2011-01-05 23:53:24 -08:00
Daniel Stenberg
e21b103c3e tests: <info> tag corrections 2011-01-04 23:13:10 +01:00
Daniel Stenberg
0029b2f042 unittest: 1303 tests Curl_timeleft
I came up with 33 different ways to call it and verify that it returns the
correct return code.
2011-01-04 23:13:10 +01:00
Daniel Stenberg
7c5d888ea6 curlcheck.h: add fail()
fail is a new function/macro that a test case can use to indicate a test
failure for cases when the standard macros are not sufficient.
2011-01-04 23:13:10 +01:00
Dan Fandrich
a2c8966d50 Fixed path to allow out-of-tree builds 2011-01-04 12:59:44 -08:00
Daniel Stenberg
1e52ea92eb ignore: all executable unit test cases 2011-01-04 16:51:41 +01:00
Daniel Stenberg
28888a0b41 tests: add 1302 to the package 2011-01-04 16:50:59 +01:00
Daniel Stenberg
1022e754f4 unittest: test base64 encode/decode 2011-01-04 16:42:31 +01:00
Daniel Stenberg
703573c72b curlcheck.h: avoid using NULL pointers 2011-01-04 16:41:42 +01:00
Daniel Stenberg
7af54ef9a5 curlcheck.h: add verify_memory
This check verifies that a pointer contains the correct data.
2011-01-04 16:31:54 +01:00
Daniel Stenberg
1602ed6ba1 curlcheck.h: add newlines in error messages 2011-01-04 16:14:23 +01:00
Daniel Stenberg
9e46318a03 unittest: verify curl_strequal 2011-01-04 16:13:58 +01:00
Daniel Stenberg
83e9fb21aa curlcheck.h: add fail_if() fix code
The UNITTEST_START and UNITTEST_STOP defines needed to do a new brace
level so that test cases can declare variables fine and still remain
fine C89 code.
2011-01-03 23:47:34 +01:00
Daniel Stenberg
5c42b2ceae unittests: basic docs 2011-01-03 23:47:13 +01:00
Daniel Stenberg
82aa386732 ignore: unit test files 2011-01-03 22:52:50 +01:00
Daniel Stenberg
c43ad0f972 unittests: a dedicated feature in tests
The test runner script now knows if unittests can run and the unit test
setup file says it is one. I also made runtests.pl deal with no
<command> tag set, so that the description file can get even simpler.
2011-01-03 22:42:46 +01:00
Daniel Stenberg
53640a3ce0 unittesting: build a separate static lib
When configure --enable-debug has been used, all files in lib/ are now
built twice and a separate static library crafted for unit-testing will
be linked. The unit tests in the tests/unit subdir will use that
library.
2011-01-03 22:16:16 +01:00
Daniel Stenberg
35e1d6538a unittest: framework for unit-testing
This is the first approach at doing fairly clean and easy to write and
debug unit tests.
2011-01-03 19:38:10 +01:00
Yang Tse
15aeb94f3f test harness: take in account that Windows does not support LD_PRELOAD
configure.ac: Test harness libhostname library will not be built for Windows.

runtests.pl: LD_PRELOAD mechanism will not be used to load libhostname
library on operating systems which lack LD_PRELOAD support.
2010-12-28 16:52:20 +01:00
Daniel Stenberg
49465fffdb cookies: tricked dotcounter fixed
Providing multiple dots in a series in the domain field (domain=..com) could
trick the cookie engine to wrongly accept the cookie believing it to be
fine. Since the tailmatching would then match all .com sites, the cookie would
then be sent to all of them.

The code now requires at least one letter between each dot for them to be
counted. Edited test case 61 to verify this.
2010-12-23 22:52:32 +01:00
Daniel Stenberg
e6d99f4ba7 SMTP tests: updated MAIL FROM use
They were all wrong previously since none used the <brackets> they
should for MAIL FROM. Now libcurl adds them itself if the app doesn't so
they end up wrong less easy.
2010-12-22 14:53:13 +01:00
Paul Howarth
1df74d886d tftpd: avoid buffer overflow report from glibc 2010-12-17 19:08:43 +01:00
Yang Tse
f6ebae65d6 axTLS integration: silence runtests.pl perl warning 2010-12-16 17:33:53 +01:00
Eric Hu
a7cf30f808 Minor fixes to pass tests 301 and 306 with a patched axTLS. 2010-12-15 16:05:17 +01:00
Eric Hu
be312336f6 Initial axTLS integration. Connections can be made and some tests pass.
Failed HTTPS tests: 301, 306, 311, 312, 313, 560
311, 312 need more detailed error reporting from axTLS.
313 relates to CRL, which hasn't been implemented yet.
2010-12-15 16:05:17 +01:00
Yang Tse
34127c7adc sws: fix compier warning: external definition with no prior declaration 2010-12-06 14:51:44 +01:00
Yang Tse
07f60235b0 fix compiler warning: rounding, sign extension, or loss of accuracy may result 2010-12-02 18:46:13 +01:00
Yang Tse
5db0a412ff atoi: remove atoi usage 2010-11-28 23:11:14 +01:00
Yang Tse
ef24ecde68 symbol-scan: use configure script knowledge about how to run the C preprocessor 2010-11-25 21:05:20 +01:00
Yang Tse
e8bc33d0a3 ignore file generated by configure 2010-11-25 13:34:47 +01:00
Dan Fandrich
1bb05ac16f Check for errors while preprocessing curl.h in test 1119
This showed a problem when running the test out-of-tree, so
an include path is now being added to pick up the generated
curlbuild.h file.
2010-11-19 15:54:21 -08:00
Dan Fandrich
091c52fef7 Use the 3-argument open for compatibility with older perls 2010-11-19 15:27:28 -08:00
Yang Tse
a768e39b2d test servers: fix strict aliasing compiler warnings 2010-11-19 19:20:38 +01:00
Daniel Stenberg
0b20de0194 test1120: verify FTP response 421
curl mustn't try to use the control connection after the 421 is received
2010-11-10 15:36:42 +01:00
Daniel Stenberg
d596a523b9 ftpserver.pl: spellfix comment 2010-11-10 15:36:28 +01:00
Daniel Stenberg
7d8343934b symbols-in-version: add CURL_SOCKET_BAD
I also documented the filtering logic in the symbol-scan.pl function to
clarify why not all CURL_* symbols are included.
2010-11-09 14:20:23 +01:00
Kamil Dudka
c6b97a8278 ftp: close connection as soon as ABOR has been sent
... and do not send ABOR unless really necessary.

Bug: https://bugzilla.redhat.com/649347
Reported by: Simon H.
2010-11-08 20:50:52 +01:00
Daniel Stenberg
1786950759 test: remove test 580
Test 580 is removed again for two reasons:

1) Some compilers aren't satisfied by just a data variable called 'test'
when first.o wants a function called 'test'. The Solaris compiler says
"ld: warning: symbol `test' has differing types:" while the AIX compiler
downright rejects it.

2) Test case 1119 that was added after this test is way more complete
and cover everything test 580 does and more without introducing the same
problems.
2010-11-05 11:26:26 +01:00
Dan Fandrich
96945c98d5 Allow building test 580 out of tree 2010-11-03 19:03:02 -07:00
Daniel Stenberg
1db61aca3b dist: add symbol-scan.pl to the tarball 2010-11-03 11:25:06 +01:00
Daniel Stenberg
bbb6eb3aaa test1119: verify symbols-in-versions 2010-11-03 11:23:54 +01:00
Daniel Stenberg
a4765b0551 runtests: allow tests written as perl scripts
If a command is set type="perl", it can now specify a perl program that will
be run instead of an ordinary curl or built tool.

A perl test automatically disables memory and valgrind debugging.
2010-11-03 11:22:46 +01:00
Daniel Stenberg
29de7dd288 symbol-scan: verifies symbols-in-versions
This new script scans for all enums and #defines used by the curl/curl.h
and curl/multi.h headers. Then it reads all symbols mentioned in
symbols-in-vesions and make sure that there's no entries missing in
there. It then proceeds to verify that the entries that
symbols-in-vesions mentions but aren't found in the sources are truly
documented as removed.

This script is used in the new test case 1119
2010-11-03 11:20:19 +01:00
Dan Fandrich
282b41c69b Added mk580.pl to the tar ball 2010-11-02 23:17:36 -07:00
Daniel Stenberg
36420330de ignore: lib580.c is generated by mk580.pl 2010-11-02 23:34:37 +01:00
Daniel Stenberg
cc87913294 test: added test 580 - verifies symbols-in-versions
The new perl script mk580.pl generates a C table in a fresh source file
named lib580.c and if that compiles fine we know that the file
docs/libcurl/symbols-in-versions at least doesn't include any symbols
that are misspelled.

An additional feature would be to somehow scan curl/curl.h and compare
with symbols-in-versions to see if there are symbols missing.
2010-11-02 22:27:33 +01:00
Kamil Dudka
0c8e5f7e6a ftp: prevent server from hanging on closed data connection
Some FTP servers (e.g. Pure-ftpd) end up hanging if we close the data
connection before transferring all the requested data.  If we send ABOR
in that case, it prevents the server from hanging.

Bug: https://bugzilla.redhat.com/643656
Reported by: Pasi Karkkainen, Patrick Monnerat
2010-10-29 12:01:19 +02:00
Daniel Stenberg
98d9dc7840 URL-parsing: consider ? a divider
The URL parser got a little stricter as it now considers a ? to be a
host name divider so that the slightly sloppier URLs work too. The
problem that made me do this change was the reported problem with an URL
like: www.example.com?email=name@example.com This form of URL is not
really a legal URL (due to the missing slash after the host name) but is
widely accepted by all major browsers and libcurl also already accepted
it, it was just the '@' letter that triggered the problem now.

The side-effect of this change is that now libcurl no longer accepts the
?  letter as part of user-name or password when given in the URL, which
it used to accept (and is tested in test 191). That letter is however
mentioned in RFC3986 to be required to be percent encoded since it is
used as a divider.

Bug: http://curl.haxx.se/bug/view.cgi?id=3090268
2010-10-19 20:20:06 +02:00
Dan Fandrich
4b0c411ce6 Fixed the IPv6 host address in test1203
Reported by: Christian Weisgerber
Bug: http://curl.haxx.se/bug/view.cgi?id=3087479
2010-10-14 12:45:01 -07:00
Guenter Knauf
7e46061cac Added --noconfigure switch to testcurl.pl. 2010-10-14 00:57:36 +02:00
Daniel Stenberg
6a43ffa0d5 test: urlglob error messages have no extra newline anymore 2010-10-11 14:32:37 +02:00
Daniel Stenberg
2ae6c47d5d HTTP: remove special case for 416
It was pointed out that the special case libcurl did for 416 was
incorrect and wrong. 416 is not really different to other errors so the
response body must be handled like for other errors/http responses.

Reported by: Chris Smowton
Bug: http://curl.haxx.se/bug/view.cgi?id=3076808
2010-10-02 00:22:48 +02:00
Dan Fandrich
15622e69a9 sws: Added writedelay HTTP server command
This delays between write operations, hopefully making it easier
to spot problems where libcurl doesn't flush the socket properly
before waiting for the next response.
2010-10-02 00:21:59 +02:00
Dan Fandrich
9e1083488f Renamed test1204 to test1117 to move it into the normal range 2010-09-29 13:02:37 -07:00
Daniel Stenberg
5df13c3173 curl_easy_escape: don't escape "unreserved" characters
According to RFC3986 section 2.3 the letters -, ., _ and ~ should not be
percent-encoded.

Reported by: Miguel Diaz
Bug: http://curl.haxx.se/mail/lib-2010-09/0227.html
2010-09-28 23:49:32 +02:00
Dan Fandrich
e329586489 Added test case 1204 to test HTTP range failure
This is an attempt to reproduce bug #3076808
2010-09-27 16:44:12 -07:00
Daniel Stenberg
4d58f97f60 parsedate: allow time specified without seconds
The date format in RFC822 allows that the seconds part of HH:MM:SS is
left out, but this function didn't allow it. This change also includes a
modified test case that makes sure that this now works.

Reported by: Matt Ford
Bug: http://curl.haxx.se/bug/view.cgi?id=3076529
2010-09-27 16:54:02 +02:00
Dan Fandrich
8e2f16e66f Link curl and the test apps with -lrt explicitly when necessary
When curl calls a function from that library then it needs to
explicitly link to the library instead of piggybacking on
libcurl's own dependency.  Without this, GNU ld with the
--no-add-needed flag fails when linking (which Fedora now does
by default).

Reported by: Quanah Gibson-Mount
Bug: http://curl.haxx.se/mail/lib-2010-09/0085.html
2010-09-11 17:08:23 -07:00
Tor Arntsen
c3c4626fab test565: Don't hardcode IP:PORT
Use %HOSTIP:%HTTPPORT instead of 127.0.0.1:8990 so that
verification works if the baseport change option is used
when executing runtests.pl.
2010-09-09 12:42:28 +02:00
Dan Fandrich
55c266de6d Added proxy keyword to allow skipping test in proxyless configs 2010-08-30 15:07:21 -07:00
Dan Fandrich
ae467115bb Tweaked some test data files
Fixed some issues that caused xmllint failures, added features
and keywords, fixed some quotes and removed some <strip> sections
that unnecessarily limited test checking.
2010-08-25 16:43:26 -07:00
Daniel Stenberg
a049528e94 runtests: fix uninitialized variable warning 2010-08-25 15:10:40 +02:00
Daniel Stenberg
2fbbddbe85 gopher tests: revert parts of gopher in the pingpong server
Introduced in the initial gopher commits, there was added logic to do
GOPHER test serving in the pingpong server but as it resembles HTTP much
more than FTP or SMTP, the gopher testing has been moved over to instead
use the sws (HTTP) server. This change simply removes unused code.
2010-08-25 14:22:43 +02:00
Daniel Stenberg
ecb3fe63d7 gopher tests: use sws and adjusted to more standard style 2010-08-25 14:21:25 +02:00
Daniel Stenberg
6ed72fd7fa sws: added basic gopher support 2010-08-25 14:21:25 +02:00
Daniel Stenberg
53151db167 gopher: fix test case line endings
Patches over email very easily lose CRLF line endings in files otherwise
LF-only so I had to put them back where needed.
2010-08-25 14:21:25 +02:00
Cameron Kaiser
67d1616018 Gopher using Curl_write; test suite (4 tests) 2010-08-25 14:21:25 +02:00
Daniel Stenberg
6b6a3bcb61 http: handle trailer headers in all chunked responses
HTTP allows that a server sends trailing headers after all the chunks
have been sent WITHOUT signalling their presence in the first response
headers. The "Trailer:" header is only a SHOULD there and as we need to
handle the situation even without that header I made libcurl ignore
Trailer: completely.

Test case 1116 was added to verify this and to make sure we handle more
than one trailer header properly.

Reported by: Patrick McManus
Bug: http://curl.haxx.se/bug/view.cgi?id=3052450
2010-08-25 13:42:14 +02:00
Dan Fandrich
77ba147e76 Fixed a NULL pointer dereference in form posting
It was introduced in commit eeb2cb05 along with the -F type=
change. Also fixed a typo in the name of the magic filename=
parameter. Tweaked tests 39 and 173 to better test this path.
2010-08-24 16:45:31 -07:00
Daniel Stenberg
eeb2cb05a1 cmdline: make -F type= accept ;charset=
The -F option allows some custom parameters within the given string, and
those strings are separated with semicolons. You can for example specify
"name=daniel;type=text/plain" to set content-type for the
field. However, the use of semicolons like that made it not work fine if
you specified one within the content-type, like for:
"name=daniel;type=text/plain;charset=UTF-8"
... as the second one would be seen as a separator and "charset" is no
parameter curl knows anything about so it was just silently discarded.

The new logic now checks if the semicolon and following keyword looks
like a parameter it knows about and if it isn't it is assumed to be
meant to be used within the content-type string itself.

I modified test case 186 to verify that this works as intended.

Reported by: Larry Stone
Bug: http://curl.haxx.se/bug/view.cgi?id=3048988
2010-08-21 00:21:24 +02:00
Guenter Knauf
f37affab8c Trial to fix win32 autobuilds.
It seems that its time to look at some better ideas for the win32
non-configure builds; probably a prebuild target which copies
config-win32.h to curl_config.h and appends also then feature
defines like USE_ARES.
2010-08-20 02:33:29 +02:00
Dan Fandrich
ebbe694e78 Removed a C99ism & made an array const 2010-08-18 22:16:46 -07:00
Julien Chaffraix
70baf46d8d test: added test 579 to verify progress callback for chunked post
The 66 bytes checked are those 38 bytes with the chunked encoding
headers added: 8+8+10+35+5 = 66

The three-letter words become 8 bytes on the wire because they are sent
like: "3\r\none\r\n"

... and there's the trailing 5 bytes write after the four lines since
the final chunk is sent (which is "0\r\n\r\n").
2010-08-19 00:27:04 +02:00
Julien Chaffraix
6b490ed33c progress: callback for POSTs less than MAX_INITIAL_POST_SIZE
Add a call to Curl_pgrsSetUploadSize in this case valided by a test
case.

Reported by: Никита Дорохин.
Bug: http://curl.haxx.se/mail/lib-2010-04/0173.html
2010-08-16 22:56:43 +02:00
Dan Fandrich
4d703ee100 Make the LD_PRELOAD path absolute in the tests that use it
In some situations, libtool will change directories and perform
a link step before executing the libtest test app. Since
LD_PRELOAD is in effect for this entire process, the path to the
binary must be absolute so it will be valid no matter in which
directory the app is running.
2010-08-16 13:36:51 -07:00
Dan Fandrich
9f4a174698 Clear stdout and stderr files on each test run
This allows a test to be run several times in the same test
session even when the -k option is given.
2010-08-16 12:09:18 -07:00
Dan Fandrich
72da720b4a Reset environment variables before starting servers
Otherwise, variables from tests could affect the servers
themselves.
2010-08-13 22:14:26 -07:00
Daniel Stenberg
a43201e578 runtests: clear old setenv remainders before test
Due to the layout of the singletest function there are situations where
it returns before it clears the environment variables that were
especially set for the single specific test case. That could lead to
subsequent tests getting executed with environment variables sticking
around from a previous test which could lead to badness.

This change makes sure to clear all custom variables that may be laying
around from a previous round, before running a test case.

Reported by: Kamil Dudka
Bug: http://curl.haxx.se/mail/lib-2010-08/0141.html
2010-08-11 23:12:39 +02:00
Daniel Stenberg
37201e3c36 callbacks: acknowledge progress callback error returns
When the progress callback is called during the TCP connection, an error
return would accidentally not abort the operation as intended but would
instead be counted as a failure to connect to that particular IP and
libcurl would just continue to try the next. I made singleipconnect()
and trynextip() return CURLcode properly.

Added bonus: it corrected the error code for bad --interface usages,
like tested in test 1084 and test 1085.

Reported by: Adam Light
Bug: http://curl.haxx.se/mail/lib-2010-08/0105.html
2010-08-10 23:16:08 +02:00
Guenter Knauf
ff26895b5c Added msys Perl since git for Win32 comes with own Perl which identifies as msys. 2010-08-10 07:10:57 +02:00
Guenter Knauf
7115245f88 Make testcurl.pl Watcom-aware. 2010-08-10 04:09:35 +02:00
Daniel Stenberg
dc2157a087 parse_remote_port: fix ;type= URL suffix over HTTP proxy
Test 563 is enabled now and verifies that the combo FTP type=A URL,
CURLOPT_PORT set and proxy work fine. As a bonus I managed to remove the
somewhat odd FTP check in parse_remote_port() and instead converted it
to a better and more generic 'slash_removed' struct field. Checking the
->protocol field isn't right since when an FTP:// URL is sent over a
HTTP proxy, the protocol is HTTP but the URL was handled by the FTP code
and thus slash_removed is set TRUE for this case.
2010-08-10 00:56:45 +02:00
Yang Tse
b24e872502 build: don't build libhostname unless shared libcurl is built 2010-08-09 09:33:53 +02:00
Yang Tse
50a1d5ee1c build: libhostname and chkhostname linkage adjustments followup 2010-08-09 05:45:11 +02:00
Yang Tse
c49e9683b8 build: libhostname linkage adjustments followup 2010-08-08 02:59:55 +02:00
Yang Tse
af4eae77ac build: chkhostname build adjustments followup 2010-08-07 17:39:36 +02:00
U-D5B1PQ1J\Administrador
7d342c723c build: allow NTLM tests to run on more build configurations 2010-08-07 15:03:54 +02:00
Yang Tse
59bad26bb2 build: ensure that libhostname doesn't get installed 2010-08-06 18:40:13 +02:00
Yang Tse
1cbe66fbc8 build: remove unused file 2010-08-04 18:54:45 +02:00
Daniel Stenberg
687df5c8c3 sethostname: provide local prototype for gethostname
This is only to avoid warnings on some systems.
2010-08-02 22:51:24 +02:00
Daniel Stenberg
d296dd4ee8 sethostname: avoid including unistd.h to duck for warnings 2010-07-30 22:32:57 +02:00
Daniel Stenberg
04eff9beb9 sethostname: ISO C does not allow extra `;' outside of a function 2010-07-30 22:26:19 +02:00
Kamil Dudka
b5c3feda17 NTLM tests: boost coverage by forcing the hostname
A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM
test-cases to override the system implementation of gethostname().  It
makes it possible to test the NTLM authentication for exact match, and
this way test the implementation of MD4 and DES.

If LD_PRELOAD doesn't work, a debug build willl also workk as debug
builds are now made to prefer a specific environment variable and will
then return that content as host name instead of the actual one.

Kamil wrote the bulk of this, Daniel Stenberg polished it.
2010-07-30 00:51:24 +02:00
Kamil Dudka
d63bdba097 test575: do not fail with threaded DNS resolver 2010-06-17 17:07:15 +02:00
Yang Tse
12043e3c9c fix compiler warning: external declaration in primary source file 2010-05-31 16:58:24 +02:00
Yang Tse
a324fa7b97 fix compiler warning: variable was set but never used 2010-05-31 16:51:36 +02:00
Kamil Dudka
35955179c6 CURL_LLONG_MAX: avoid constant overflow
... when (CURL_SIZEOF_CURL_OFF_T == 4)
2010-05-29 21:23:18 +02:00
Daniel Stenberg
4b96e5c70f test1115: verify that unexpected 1xx responses work fine 2010-05-28 00:55:11 +02:00
Kamil Dudka
75743b009b lib577: avoid redefinition of ERROR 2010-05-28 00:50:11 +02:00
Kamil Dudka
01459828ef test313: a new test for CRL support 2010-05-27 23:45:18 +02:00
Kamil Dudka
99179da4cc tests/certs: re-generated because of lost pass-phrase 2010-05-27 23:39:54 +02:00
Kamil Dudka
645bdd837a tests/certs/scripts: generate also CRL
... and make it possible to do so without any user interaction
2010-05-27 23:33:19 +02:00
Tor Arntsen
eadeb5bd9a lib573: do not compare double for exact match 2010-05-27 20:20:08 +02:00
Tor Arntsen
22f3b01478 Test 573: Use correct type for CURLINFO_CONNECT_TIME
curl_easy_getinfo() called with a pointer to long instead of double
would sigbus on RISC processors (e.g. MIPS) due to wrong alignment
of pointer address.
2010-05-20 17:12:53 +02:00
Kamil Dudka
2ffe834bff ftp wildcard: a new option CURLOPT_FNMATCH_DATA 2010-05-16 02:52:33 +02:00
Dan Fandrich
43b816538f Fixed test 577 to work when --enable-hidden-symbols is configured 2010-05-14 14:42:58 -07:00
Dan Fandrich
a82c5a39c4 Added directories.pm to the source tar ball 2010-05-14 13:31:07 -07:00
Pavel Raiskup
0825cd80a6 FTP: WILDCARDMATCH/CHUNKING/FNMATCH added 2010-05-12 23:17:51 +02:00
Daniel Stenberg
adaf87530d multi interface: missed storing connection time
Dirk Manske reported a regression. When connecting with the multi
interface, there were situations where libcurl wouldn't store
connect time correctly as it used to (and is documented to) do.

Using his fine sample program we could repeat it, and I wrote up
test case 573 using that code. The problem does not easily show
itself using the local test suite though.

The fix, also as suggested by Dirk, is a bit on the ugly side as
it adds yet another call to Curl_verboseconnect() and setting the
TIMER_CONNECT time.  That situation is subject for some closer
inspection in the future.
2010-05-07 23:49:29 +02:00
Hoi-Ho Chan
51427e1947 PolarSSL: initial support added
This is Hoi-Ho Chan's patch with some minor fixes by me. There
are some potential issues in this, but none worse than we can
sort out on the list and over time.
2010-05-05 22:30:46 +02:00
Daniel Stenberg
7f616eb513 test: enable valgrind for 604, seems to work 2010-04-28 23:27:31 +02:00
Paul Howarth
fe818c8076 add 1s post-command delay to tests 513 and 514
addressing http://curl.haxx.se/mail/lib-2009-12/0031.html
2010-04-28 23:21:59 +02:00
Kamil Dudka
d487ade72c test536: do not fail with threaded DNS resolver
Also tweaked comments in certain examples using curl_multi_fdset().
2010-04-24 12:14:21 +02:00
monnerat
4bfe07640c Implement SMTP authentication 2010-04-19 11:16:30 +02:00
Dan Fandrich
f38510f4b5 Eliminated an unlikely race condition in some tests.
Based on a patch from the FreeBSD ports by Peter Pentchev.
2010-04-15 10:51:03 -07:00
Daniel Stenberg
5a814f6f2c ignore files generated by 'maketgz' 2010-04-14 17:12:34 +02:00
Guenter Knauf
92b387f57a Use correct directory for c-ares git pull
Signed-off-by: Tor Arntsen <tor@spacetec.no>
2010-04-13 22:55:33 +02:00
Guenter Knauf
9c7a9f8329 added last git commit output for c-ares too. 2010-04-13 04:05:43 +02:00
Guenter Knauf
6ab2cae55e changed the git update block to take care of c-ares repo if detected. 2010-04-13 03:15:31 +02:00
Guenter Knauf
a8f85e778f updated timestamp of the script. 2010-04-12 23:06:31 +02:00
Guenter Knauf
f6b7471f40 removed obsolete var in gitpull() function
no need to create a var - lets just return the status var itself.
2010-04-12 22:57:48 +02:00
Daniel Stenberg
7427acc472 mention missing test servers for <server> 2010-04-10 23:27:04 +02:00
Daniel Stenberg
02892e4fd8 FTP quote commands prefixed with '*' now can fail without aborting
Prefixing the FTP quote commands with an asterisk really only
worked for the postquote actions. This is now fixed and test case
227 has been extended to verify.
2010-04-09 16:54:52 +02:00
Dan Fandrich
e78e584035 Fixed misleading test message 2010-03-31 22:22:37 -07:00
Dan Fandrich
8c6793d79a Call curl_global_cleanup() in test 560 to avoid a memory leak 2010-03-30 12:52:44 -07:00
Dan Fandrich
643ae2ca8b Allow test 538 to run even when proxy support is disabled 2010-03-30 11:40:34 -07:00
Ben Greear
302507d5dc Allow running ./tests/testcurl.pl from within git repo.
My first instinct was to run the test script within the checked out
repository.  This small change to the script allows that to work as
expected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-03-28 22:57:52 +02:00
Daniel Stenberg
e2bd52e553 ignore pid files and stunnel.conf
all used while running tests
2010-03-27 22:56:47 +01:00
Daniel Stenberg
d4fbf2c3f0 make sure git pull is actually done! 2010-03-27 18:57:24 +01:00
Daniel Stenberg
05de2cf180 remove all .cvsignore files 2010-03-25 23:22:03 +01:00
Tor Arntsen
5e1859014b Avoid double newline for the 'last commits' log in testcurl.pl
The backtick command which extracts 'git log' lines come with a
newline, so chomp the newline before calling logit(), as the logit
function adds a newline by itself.
2010-03-25 18:28:35 +01:00
Tor Arntsen
e1c38791b7 Change to version-independent git option for 'git log --oneline'
'git log --oneline' is a relatively recent Git function. It is
documented to be the same as 'git log --pretty=oneline --abbrev-commit',
so use that instead. It works all the way back to Git 1.5.0.
2010-03-25 18:27:44 +01:00
Daniel Stenberg
ac8b2ef563 show 5 commits even if no git pull was made 2010-03-25 13:56:01 +01:00
Daniel Stenberg
efcf372d86 don't touch ares/aclocal.m4 and show recent git commits
since c-ares no longer embedded, we must not touch such files
anymore

we show the 5 last git commits if git was proven in use, to help
us see exactly what's being tested
2010-03-25 13:44:13 +01:00
Daniel Stenberg
a1a66c7cd6 s/CVS/DEV in the version string from the git repo 2010-03-25 10:38:17 +01:00
Bill Hoffman
bed30bc6df Merge branch 'master' of github.com:bagder/curl 2010-03-24 23:49:26 -04:00
Bill Hoffman
d610519246 Add .gitattributes files to turn off CRLF translation for some files 2010-03-24 23:48:35 -04:00
Daniel Stenberg
4f44717590 provide a version number as today's date
It should at least help visualize which autobuilds that are
using this script.
2010-03-24 22:40:56 +01:00
Daniel Stenberg
49d309866c testcurl now uses git instead of CVS 2010-03-24 22:26:41 +01:00
Chris Conroy
c869ae7447 remove debug printfs 2010-03-24 15:12:49 +01:00
Daniel Stenberg
8aa68b4cad remove trace of CVS 2010-03-24 13:27:49 +01:00
Chris Conroy
1ac168e576 Fix RTSP GET_PARAMETER empty and non-empty operation.
Test coverage included. Thanks to Massimo Callegari for the bug report
2010-03-24 13:21:14 +01:00
Daniel Stenberg
50b51161c9 s/CVS/DEV/ in the version string for repo versions 2010-03-24 11:30:34 +01:00
Daniel Stenberg
be28825b2d restore executable bits on some files 2010-03-24 11:07:35 +01:00
Daniel Stenberg
2309b4e330 remove the CVSish $Id$ lines 2010-03-24 11:02:54 +01:00
Daniel Stenberg
e32fe30d0c enabled valgrind
I ran it now successfully and it helped to pinpoint a libssh2
memory leak!
2010-03-23 23:30:39 +01:00
Daniel Stenberg
b33ddd615a ignore more files generated when tests run in the source tree 2010-03-23 12:43:42 +01:00
Yang Tse
bcd1c7c2e9 fix compiler warning 2010-02-26 16:42:33 +00:00
Yang Tse
4ad984043e fix file name 2010-02-25 08:03:05 +00:00
Yang Tse
6a8aa246ff Fixed bug report #2958074 indicating
(http://curl.haxx.se/bug/view.cgi?id=2958074) that curl on Windows with
option --trace-time did not use local time when timestamping trace lines.
This could also happen on other systems depending on time souurce.
2010-02-25 06:59:04 +00:00
Yang Tse
e25c5283d8 enable 802 and 803 2010-02-24 01:47:28 +00:00
Yang Tse
8904064c3a fix socket data type 2010-02-23 13:35:01 +00:00
Yang Tse
439f62bfa8 convert Curl_ultous() and Curl_ultouc() functions to curlx_ultous() and
curlx_ultouc(), exposing them through curlx.h to allow proper code reuse
later in our test harness.
2010-02-22 18:56:29 +00:00
Yang Tse
693abbae3a updated sources 2010-02-22 16:16:35 +00:00
Patrick Monnerat
e1625ba727 _ Adjusted RFC821 HELO fallback and enabled test804 2010-02-22 13:57:57 +00:00
Patrick Monnerat
338553eda3 - Proper handling of STARTTLS on SMTP, taking CURLUSESSL_TRY into account.
- SMTP falls back to RFC821 HELO when EHLO fails (and SSL is not required).
- Use of true local host name (i.e.: via gethostname()) when available, as default argument to SMTP HELO/EHLO.
- Test case 804 for HELO fallback.
2010-02-22 12:41:02 +00:00
Daniel Stenberg
a4a60afabb - Fixed the SMTP compliance by making sure RCPT TO addresses are specified
properly in angle brackets. Recipients provided with CURLOPT_MAIL_RCPT now
  get angle bracket wrapping automatically by libcurl unless the recipient
  starts with an angle bracket as then the app is assumed to deal with that
  properly on its own.
2010-02-20 22:29:59 +00:00
Daniel Stenberg
a434cb43e8 - I made the SMTP code expect a 250 response back from the server after the
full DATA has been sent, and I modified the test SMTP server to also send
  that response. As usual, the DONE operation that is made after a completed
  transfer is still not doable in a non-blocking way so this waiting for 250
  is unfortunately made blockingly.
2010-02-20 21:56:48 +00:00
Yang Tse
048438345a fix compiler warning 2010-02-19 18:02:38 +00:00
Yang Tse
6e461e45c3 fix compiler warning 2010-02-18 12:31:24 +00:00
Yang Tse
46b112bcd4 replaced tabs with spaces 2010-02-16 13:32:45 +00:00
Yang Tse
f442dd6496 fix Content-Length validation 2010-02-16 11:17:00 +00:00
Yang Tse
d5b2d8e081 fix compiler warning: conversion from "long" to "size_t" may lose sign 2010-02-15 17:40:35 +00:00
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
Daniel Stenberg
975814368a - Jack Zhang reported a problem with SMTP: we wrongly used multiple addresses
in the same RCPT TO line, when they should be sent in separate single
  commands. I updated test case 802 to verify this.

- I also fixed a bad use of my_setopt_str() of CURLOPT_MAIL_RCPT in the curl
  tool which made it try to output it as string for the --libcurl feature
  which could lead to crashes.
2010-02-12 22:23:46 +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
Dan Fandrich
1abff19a5f Removed some erroneous "compressed" key words 2010-02-09 22:50:52 +00:00
Yang Tse
e118cd4ca0 warning fix 2010-02-06 17:31:09 +00:00
Yang Tse
0f4a91afde OOM handling fix 2010-02-06 13:21:45 +00:00
Yang Tse
2c2464a682 fix compiler warning 2010-02-05 20:52:00 +00:00
Yang Tse
880452d2ed fix compiler warning 2010-02-05 19:24:22 +00:00
Yang Tse
e3009f2950 fix compiler warning 2010-02-05 19:19:34 +00:00
Yang Tse
cad9c3f55f Addes OOM handling for curl_easy_setopt() calls in test 2010-02-05 18:07:19 +00:00
Yang Tse
f47b84b57f Validate server port argument 2010-02-04 17:17:19 +00:00
Yang Tse
1a5749424b Fix variable initialization 2010-02-04 14:50:58 +00:00
Yang Tse
a9a5a8e45c Modified test case 557 to additionally verify libcurl's internal curl_m*printf()
functions formatting functionality when handling signed and unsigned shorts.
2010-02-04 14:41:01 +00:00
Yang Tse
429e544556 added an additional second to allow test to pass on heavily loaded servers 2010-02-04 09:55:45 +00:00
Yang Tse
381a4d6efe Fix portability issue related with unaligned memory access 2010-02-03 06:49:27 +00:00
Yang Tse
013ec6a92f cookies with same path length might get sorted in different order when
using different qsort implementations. In order to make this test give
same results on different systems, paths now have different lengths.
2010-02-03 01:53:47 +00:00
Yang Tse
e2fc294470 added an additional second to allow test to pass on heavily loaded servers 2010-02-03 01:41:07 +00:00
Yang Tse
54879d7763 mention run time statistics options 2010-02-02 14:46:55 +00:00
Yang Tse
232d17ec64 avoid possibility of using obsoleted stuff 2010-02-02 12:39:10 +00:00
Yang Tse
bafba6946c remove setup.h inclusion which is already done from test.h inclusion 2010-02-02 12:36:16 +00:00
Yang Tse
9f6c4daa27 include headers 2010-02-02 07:01:21 +00:00
Yang Tse
ea72194650 Conroy added a check to the coded message size since the docs stipulate
that each call will contain a full protocol packet.
2010-02-01 22:14:22 +00:00
Yang Tse
516cf5c8dd update rtsp server header field from SWS to RTSPD 2010-02-01 19:57:11 +00:00
Yang Tse
35fbeda003 Test suite support for RTSP 2010-02-01 12:05:08 +00:00
Yang Tse
5312fdcd73 Chris Conroy fixed test #568 issues with carriage returns 2010-01-29 02:58:39 +00:00
Yang Tse
eff18763a1 portability fix 2010-01-28 10:27:09 +00:00
Yang Tse
6259bcd51f Chris Conroy provided first RTSP tests 2010-01-28 04:58:03 +00:00
Yang Tse
a4031dbd85 RTSP tests disabled until test harness RTSP support is updated 2010-01-28 04:55:19 +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
e59a5cbe4e Julien Chaffraix adjusted "<name> section" line length 2010-01-22 07:32:09 +00:00
Yang Tse
abe3e6b36c fix warning triggered when debugging on cygwin 2010-01-21 14:29:04 +00:00
Yang Tse
105e430641 allow exporting of exe_ext() sub 2010-01-21 14:26:32 +00:00
Yang Tse
4a349f7a54 improve displaylogcontent() sub fixing a warning 2010-01-21 14:25:41 +00:00
Daniel Stenberg
e09718d457 Julien Chaffraix fixed line lengths 2010-01-21 12:28:29 +00:00
Yang Tse
a872ff742c SIGTERM is the signal to trap here, SIGKILL can't be caught. 2010-01-20 21:16:32 +00:00
Yang Tse
58a1557088 Use killsockfilters() to kill sockfilter processes, this ensures that when
killing a sockfilter process the actual PID from the pid file is used and
not the one returned by open2() which might be different.
2010-01-20 20:42:21 +00:00
Yang Tse
422a7869be Allow killsockfilters() to take a 5th optional parameter that when provided
indicates that only one of the two possible sockfilter processes should be
killed.  Valid values for this parameter are 'main' and 'data'.
2010-01-20 20:39:56 +00:00
Yang Tse
471e8eefb6 Use delete() to unset environment variables instead of assigning undef which
generates warning 'Use of uninitialized value in scalar assignment' with perl
versions older than 5.10
2010-01-20 20:08:50 +00:00
Yang Tse
d2e1ec58f2 Adjust valgrind logs file name detection.
Adjust environment vars setting and restoring from test definition.

Avoid using strftime in torture sub.
2010-01-20 18:31:52 +00:00
Daniel Stenberg
48032c0880 modified test case 8 to also make sure that we deal with cookies using
identical names but different paths properly
2010-01-20 09:39:40 +00:00
Daniel Stenberg
877dad1e24 - As was pointed out on the http-state mailing list, the order of cookies in a
HTTP Cookie: header _needs_ to be sorted on the path length in the cases
  where two cookies using the same name are set more than once using
  (overlapping) paths. Realizing this, identically named cookies must be
  sorted correctly. But detecting only identically named cookies and take care
  of them individually is harder than just to blindly and unconditionally sort
  all cookies based on their path lengths. All major browsers also already do
  this, so this makes our behavior one step closer to them in the cookie area.

  Test case 8 was the only one that broke due to this change and I updated it
  accordingly.
2010-01-19 23:19:59 +00:00
Daniel Stenberg
01030e9240 oops, I forgot to cvs add this before my previous commit (Dan Fandrich
pointed it out to me)
2010-01-19 22:22:54 +00:00
Daniel Stenberg
a5ca3f1754 - David McCreedy brought a fix and a new test case (129) to make libcurl work
again when downloading files over FTP using ASCII and it turns out that the
  final size of the file is not the same as the initial size the server
  reported. This is very common since servers don't take the newline
  conversions into account.
2010-01-19 21:39:10 +00:00
Daniel Stenberg
6035a4b044 avoid "Use of uninitialized value $l in concatenation" 2010-01-19 21:20:24 +00:00
Yang Tse
469d3ed591 Fail harder when curl coredumps trying to verify http and ftp servers.
Add some debug messages to see what's going on with valgrind logs.
2010-01-19 17:40:15 +00:00
Yang Tse
3afe2b65b6 prevent %runcert hash growth when clearing items 2010-01-19 02:01:01 +00:00
Dan Fandrich
5b5ff41ef1 Added PEM certificate keyword 2010-01-18 20:20:07 +00:00
Yang Tse
0a713139f6 fix warnings 2010-01-18 17:47:01 +00:00
Yang Tse
0687bc6bd6 Stop ssl running server when cert file currently used by server is
different than the one specified in test definition for same server
2010-01-18 17:03:59 +00:00
Yang Tse
424a8882fb fix warnings 2010-01-18 14:49:31 +00:00
Yang Tse
3fdced357b - Remove QD restarting of https servers. Proper fixing required.
This will make tests 310 311 and 312 fail while fixing.

- Remove some debug messages
2010-01-18 02:53:25 +00:00
Yang Tse
ce2ac665e4 make verifyhttp use different file names depending on server characteristics 2010-01-18 02:36:39 +00:00
Yang Tse
0375f70b5c add serverfactors() sub which returns server characterization factors 2010-01-18 02:32:48 +00:00
Yang Tse
7f8980114b fix warnings 2010-01-17 20:28:07 +00:00
Yang Tse
312494f25f fix warnings 2010-01-17 14:47:30 +00:00
Yang Tse
8d97b33347 fix warnings 2010-01-17 14:31:13 +00:00
Yang Tse
b51b703a5b add some debug messages 2010-01-17 13:33:27 +00:00
Yang Tse
071c38988d use servername_id() from serverhelp.pm 2010-01-17 02:50:48 +00:00
Yang Tse
365e75a270 refactored stopping of test harness servers 2010-01-17 02:45:24 +00:00
Yang Tse
32413a8e34 Declaration of $sshdlog is done in sshhelp.pm 2010-01-15 20:14:37 +00:00
Yang Tse
ada2774ab2 Start using the centralized pidfile and logfile name generation
subroutines for ssh and socks test suite servers.
2010-01-15 18:55:01 +00:00
Yang Tse
7624527591 Squeeze slack time when killing more than one server from
the <killserver> section of test harness definition files.
2010-01-14 17:36:57 +00:00
Yang Tse
8c8df3966b Give the test a bit mote time to run so it passes on slow machines 2010-01-13 01:21:40 +00:00
Yang Tse
0643829444 Added test case #1112 which does an FTPS download with strict timeout
and slow data transfer in a similar way as test case #1086 does for FTP.

This also exercises <killserver> section for the FTPS server.
2010-01-12 22:29:18 +00:00
Yang Tse
7525670610 Make runtests.pl actually support any (valid) server specification
for the <killserver> section of test harness definition files.
2010-01-12 22:22:55 +00:00
Yang Tse
b32a96eda0 Fix tftp and sftp supported protocols in servername_str() 2010-01-12 22:11:13 +00:00
Yang Tse
82f5ffff8f Make sockfilter kill messages look alike server ones 2010-01-12 14:01:44 +00:00
Yang Tse
3fd67b5f36 Adjust vor VPATH builds 2010-01-12 03:01:00 +00:00
Daniel Stenberg
78b7d7f7a8 - The tests/runtests.pl script now checks to see if the test case that runs is
present in the tests/data/Makefile.am and outputs a notice message on the
  screen if not. Each test file has to be included in that Makefile.am to get
  included in release archives and forgetting to add files there is a common
  mistake. This is an attempt to make it harder to forget.
2010-01-11 15:50:30 +00:00
Yang Tse
5bec1b1cf0 secureserver.pl is now the test harness script used for SSL/TLS. 2010-01-11 04:51:14 +00:00
Yang Tse
cd7b12edff secureserver.pl is now the test harness script used for SSL/TLS.
Start using the centralized pidfile and logfile name generation
subroutines for https and ftps test suite servers.
2010-01-11 04:49:13 +00:00
Yang Tse
1103d0c718 Update error message to include port number 2010-01-10 04:24:46 +00:00
Yang Tse
aae97c998a Previous commit adjustments 2010-01-10 02:41:44 +00:00
Yang Tse
017c14cc99 Start using the centralized pidfile and logfile name generation
subroutines for ftp, pop3, imap and smtp test suite servers.
2010-01-09 18:35:59 +00:00
Yang Tse
aa2f447400 Start using the centralized pidfile and logfile name generation
subroutines for http and tftp test suite servers.
2010-01-08 15:54:07 +00:00
Yang Tse
184f92d243 Remove extra line feed 2010-01-08 12:01:35 +00:00
Yang Tse
a1d701d05a Use '_stunnel.log' ending also for https test server log 2010-01-08 01:54:29 +00:00
Yang Tse
a114b7b1c0 sws and tftpd command line option naming adjustments 2010-01-08 01:48:54 +00:00
Claes Jakobsson
31630203b1 List fragment tests in Makefile.am and better provide better names 2010-01-07 14:44:04 +00:00
Yang Tse
bd8096b42b Disable tests 802 and 803 2010-01-06 18:28:15 +00:00
Claes Jakobsson
9bd03483ce Julien Chaffraix fixed so that the fragment part in an URL is not sent to the server anymore 2010-01-06 16:01:48 +00:00
Daniel Stenberg
d79b5a0613 stop at once if the EOB marker shows up, even if something else might get
sent afterwards
2010-01-01 19:49:44 +00:00
Daniel Stenberg
605bbfc4c0 - Ingmar Runge enhanced libcurl's FTP engine to support the PRET command. This
command is a special "hack" used by the drftpd server, but even though it is
  a custom extension I've deemed it fine to add to libcurl since this server
  seems to survive and people keep using it and want libcurl to support
  it. The new libcurl option is named CURLOPT_FTP_USE_PRET, and it is also
  usable from the curl tool with --ftp-pret. Using this option on a server
  that doesn't support this command will make libcurl fail.
2010-01-01 14:44:44 +00:00
Yang Tse
01682cca55 Use '_stunnel.log' file name ending for stunneled server logs 2009-12-31 15:26:16 +00:00
Yang Tse
eb0479575a Subs for refactoring purposes 2009-12-31 02:29:55 +00:00
Daniel Stenberg
6c6dc3f879 modified to get the EHLO domain from the path part of the URL instead of the
user name
2009-12-30 22:50:42 +00:00
Daniel Stenberg
5e6ffe353a (SMTP) support DATA better in the server and make sure to "escape" CRLF.CRLF
sequences in uploaded data. The test server doesn't "decode" escaped dot-lines
but instead test cases must be written to take them into account. Added test
case 803 to verify dot-escaping.
2009-12-30 21:52:27 +00:00
Daniel Stenberg
7cd5ffc1bf test 802 is the first SMTP test, although not strictly SMTP yet... 2009-12-29 21:28:53 +00:00
Yang Tse
c796f2646e Leftover from previous commit 2009-12-28 20:10:00 +00:00
Yang Tse
d0f6bde732 Initial refactoring step for server name strings centralized generation 2009-12-28 20:00:41 +00:00
Yang Tse
4ec17a08bc global variables reordering/refactoring/commenting 2009-12-26 18:32:19 +00:00
Daniel Stenberg
73ad32e125 When verifying the SMTP server I had to add some hackery since SMTP in itself
doesn't really return any body data to check so I made SMTP check "headers"
as well.
2009-12-25 22:21:46 +00:00
Daniel Stenberg
77625f8560 first basic SMTP support 2009-12-25 22:20:37 +00:00
Yang Tse
1af64730e0 Adjust test number mismatch 2009-12-24 12:04:33 +00:00
Yang Tse
eacf62792f Enable warnings 2009-12-24 12:01:53 +00:00
Yang Tse
6ce407305b Fix warnings 2009-12-24 12:00:43 +00:00
Yang Tse
ae3892e8ab Fix warnings 2009-12-23 18:46:55 +00:00
Yang Tse
c74875d94e Back out some pingpong server stopping changes introduced last week in
order to re-use 'classic' stopping and allow taking test-suite run time
references from this state.
2009-12-23 15:20:20 +00:00
Yang Tse
271dc9c582 use Time::HiRes whenever available, independently of perl version 2009-12-22 13:46:06 +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
96395a908a Make 'classic' output end of a test-suite run become again the end
of output, even when run time statistics are shown.
2009-12-21 15:50:24 +00:00
Yang Tse
e9a993b9e9 Move stopping of servers instructed by test definition, after the removal of
server logs advisor read lock and before test results verifications are done.

When stopping a pingpong server, stop server before its slaves.
2009-12-21 14:53:07 +00:00
Daniel Stenberg
982fe33924 test 566 was missing 2009-12-21 14:51:07 +00:00
Yang Tse
fa188eec7b dead_child_handler also takes care of reaping pingpong server dead child processes 2009-12-21 14:43:29 +00:00
Yang Tse
bdd3763980 Reap processes dead children ASAP without blocking 2009-12-21 14:36:01 +00:00
Yang Tse
1cfa52b67d Reinstate hi resolution time logging since this is not what is
now adding 90 extra seconds to the total time some autobuilds
need to make a full test-run.
2009-12-21 14:33:01 +00:00
Daniel Stenberg
83d34a246e first small steps towards smtp 2009-12-21 08:33:47 +00:00
Yang Tse
76b3c9d70f Replaced tabs with spaces 2009-12-21 02:37:23 +00:00
Yang Tse
efd1d9dc04 Improve delay command interruptability 2009-12-20 22:09:53 +00:00
Daniel Stenberg
88a0060b2e revert that, we already had a function named like that! 2009-12-20 22:08:06 +00:00
Daniel Stenberg
4adf7d62d4 rename the verifyftp function to verifyserver since it is used to verify
a wide variety of protocol servers
2009-12-20 22:00:23 +00:00
Daniel Stenberg
2a3dafc0cd introducing the first IMAP FETCH test 2009-12-20 11:07:04 +00:00
Yang Tse
f912f8d5d2 - Attempt to fix script compilation failure on versions older than 5.007003,
corelist -a Time::HiRes lists this as the first version released with it.

- Ensure ftp check delay timer is always an integral number.
2009-12-20 03:48:32 +00:00
Daniel Stenberg
af7a5b297f support IMAP select and LOGOUT 2009-12-19 23:23:26 +00:00
Daniel Stenberg
344bbcf259 fix the ftp check delay timer to never be set below 1 to work correctly
in cases like test 190
2009-12-19 23:10:33 +00:00
Yang Tse
010fe5acd5 Slack time reduction 2009-12-19 13:20:07 +00:00
Yang Tse
aeec8e0b38 Added runtests.pl '-r' option for run time statistics 2009-12-19 04:15:22 +00:00
Yang Tse
2d15ac3d4e server start and verification time as well as test preparation time
data is required in order to closer match total test execution time.
2009-12-18 19:17:14 +00:00
Yang Tse
53deae3781 Added test harness simple time execution stats 2009-12-18 15:23:18 +00:00
Yang Tse
39cc424e81 Comment out hi resolution time logging to verify if this is what might
be contributing 90 additional seconds to the total time some autobuilds
now need to make a full test-run.
2009-12-17 22:28:40 +00:00
Yang Tse
8343cb8910 Test harness process control enhancements 2009-12-17 19:37:01 +00:00
Daniel Stenberg
91d05903b4 Remove pointless storing of the protocol as a string within the connectdata
struct, and instead use the already stored string in the handler struct.
2009-12-17 15:45:04 +00:00
Yang Tse
414180b363 gettimeofday() requires perl version newer than 5.6 2009-12-17 03:50:32 +00:00
Yang Tse
002ed5f298 Test harness process control enhancements 2009-12-16 19:55:35 +00:00
Yang Tse
044ba6dad2 Test #1106 needs an ftp enabled client 2009-12-16 15:24:12 +00:00
Yang Tse
3802d027cd Test harness process control enhancements 2009-12-16 15:16:06 +00:00
Daniel Stenberg
3111701c38 - Jon Nelson found a regression that turned out to be a flaw in how libcurl
detects and uses proxies based on the environment variables. If the proxy
  was given as an explicit option it worked, but due to the setup order
  mistake proxies would not be used fine for a few protocols when picked up
  from '[protocol]_proxy'. Obviously this broke after 7.19.4. I now also added
  test case 1106 that verifies this functionality.

  (http://curl.haxx.se/bug/view.cgi?id=2913886)
2009-12-14 23:16:09 +00:00
Yang Tse
99daca5a48 Prevent perl script dying messages in output, since tearing down the pinpong
server in this way, upon sysread failures, is part of the expected behavior.
2009-12-14 15:39:15 +00:00
Yang Tse
a6abbb120e Adjust uppercase protocol string usage 2009-12-14 14:42:48 +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
303f74c740 reapply diff between revisions 1.103 and 1.102 2009-12-13 03:44:45 +00:00
Daniel Stenberg
4ea8ad584b updated with the new protocols 2009-12-12 22:48:11 +00:00
Daniel Stenberg
ec3bb8f727 introducing IMAP, POP3 and SMTP support (still lots of polish left to do) 2009-12-12 21:54:01 +00:00
Daniel Stenberg
296ebf382c - Siegfried Gyuricsko found out that the curl manual said --retry would retry
on FTP errors in the transient 5xx range. Transient FTP errors are in the
  4xx range. The code itself only tried on 5xx errors that occured _at login_.
  Now the retry code retries on all FTP transfer failures that ended with a
  4xx response.

  (http://curl.haxx.se/bug/view.cgi?id=2911279)
2009-12-10 21:02:11 +00:00
Yang Tse
0653fa107f signal handling to cleanup on SIGINT and SIGTERM, followup 2009-12-09 18:41:43 +00:00
Daniel Stenberg
ebe5339003 - Martin Storsjo made libcurl use the Expect: 100-continue header for posts
with unknown size. Previously it was only used for posts with a known size
  larger than 1024 bytes.
2009-12-07 20:25:17 +00:00
Yang Tse
d14bf09ab8 Fix 'uploaded' file descriptor leak 2009-12-03 20:37:49 +00:00
Yang Tse
636d2fe00a signal handling to cleanup on SIGINT and SIGTERM 2009-12-03 13:12:04 +00:00
Yang Tse
2286f566d0 signal handling to cleanup on SIGINT and SIGTERM 2009-12-02 15:02:30 +00:00
Yang Tse
ed2aa87e63 Set socket option SO_REUSEADDR=true on stunnel accept'ing port 2009-12-01 15:36:34 +00:00
Yang Tse
a72ce23f16 - In order to better reflect that the returned pid is extracted from the
given file, serverpid sub is renamed to pidfromfile. In addition it is
  enhanced to make sure that it always returns zero unless a numerical
  positive value is returned.

- To better reflect that only process existance is actually checked,
  checkserver sub is renamed to processexists. In addition it is enhanced
  making it remove the given pid file when the extracted pid is no longer
  alive.
2009-11-30 13:48:51 +00:00
Yang Tse
4d922545d5 - Added Diffie-Hellman parameters to several test harness certificate files in
PEM format. Required by several stunnel versions used by our test harness.
2009-11-28 10:01:21 +00:00
Yang Tse
1fc32d866a Use different log files for each protocol 2009-11-28 05:06:19 +00:00
Yang Tse
a240f4d1df Attempt to enhance stunnel 3.X logging 2009-11-27 19:52:56 +00:00
Yang Tse
6f273b1a5f Prevent running stunnel unless its version can be determined. 2009-11-27 13:01:10 +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
c713627412 To allow remote log inspection avoid redirecting messages to stderr.
Set 0600 file permissions on certificate pem files.
2009-11-27 12:00:53 +00:00
Yang Tse
9cbf69ca0b Log info for start up failures. 2009-11-26 22:07:47 +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
Daniel Stenberg
223d848104 - Gabriel Kuri reported a problem with CURLINFO_CONTENT_LENGTH_DOWNLOAD if the
download was 0 bytes, as libcurl would then return the size as unknown (-1)
  and not 0. I wrote a fix and test case 566 to verify it.
2009-10-31 18:51:50 +00:00
Daniel Stenberg
2c0b65d37b Added test case 566 in an attempt to repeat bug 2884561
(http://curl.haxx.se/bug/view.cgi?id=2884561) but it seems to work for me...
2009-10-30 22:38:21 +00:00
Daniel Stenberg
d68f215f03 - "Tom" posted a bug report that mentioned how libcurl did wrong when doing a
POST using a read callback, with Digest authentication and
  "Transfer-Encoding: chunked" enforced.  I would then cause the first request
  to be wrongly sent and then basically hang until the server closed the
  connection. I fixed the problem and added test case 565 to verify it.
2009-10-30 22:24:48 +00:00
Daniel Stenberg
448d2b5f49 - Dima Barsky made the curl cookie parser accept cookies even with blank or
unparsable expiry dates and then treat them as session cookies - previously
  libcurl would reject cookies with a date format it couldn't parse. Research
  shows that the major browser treat such cookies as session cookies. I
  modified test 8 and 31 to verify this.
2009-10-25 18:15:14 +00:00
Yang Tse
640e49976f Fix compiler warning: loop without body 2009-10-10 12:29:32 +00:00
Daniel Stenberg
4f47fc4e14 - John P. McCaskey posted a bug report that showed how libcurl did wrong when
saving received cookies with no given path, if the path in the request had a
  query part. That is means a question mark (?) and characters on the right
  side of that. I wrote test case 1105 and fixed this problem.
2009-09-26 20:51:51 +00:00
Daniel Stenberg
8d39a31e89 added test 1105 (disabled) - it repeats a cookie path bug we need to fix 2009-09-26 11:46:41 +00:00
Daniel Stenberg
0fdb77d643 added three missing files to the dist archive 2009-09-17 17:38:25 +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
Dan Fandrich
c67c4e7095 Added HTTP proxy keyword 2009-09-14 18:43:53 +00:00
Dan Fandrich
beb0a345ac Renumbered test565 to test1104 to move it out of the range reserved for
libcurl tests.
2009-09-11 20:19:43 +00:00
Daniel Stenberg
7ff4b4f2b5 - Claes Jakobsson fixed a problem with cookie expiry dates at exctly the epoch
start second "Thu Jan 1 00:00:00 GMT 1970" as the date parser then returns 0
  which internally then is treated as a session cookie. That particular date
  is now made to get the value of 1.
2009-09-10 21:06:50 +00:00
Daniel Stenberg
b96f11f7ec comment the "stunnel exited with [num]" stuff since this is now happen
in normal tests and is annoying
2009-09-01 17:05:24 +00:00
Gunter Knauf
f1320d6733 add cast to silent compiler warning with 64bit systems. 2009-08-29 15:44:31 +00:00
Daniel Stenberg
1d92cf1dab disable the tests that differ between 32 and 64 bit 2009-08-27 18:15:38 +00:00
Patrick Monnerat
b0b2824b58 - Introduced a SYST-based test to properly set-up name format when dealing with the OS/400 FTP server.
- Fixed an ftp_readresp() bug preventing detection of failing control socket  and causing FTP client to loop forever.
2009-08-24 12:57:25 +00:00
Dan Fandrich
5c59ee9488 Pull the certificate files from the source directory. Ensure that the
certificate tests only run on a localhost-hosted test server since the
host name is explicitly checked.
2009-08-18 00:18:54 +00:00
Daniel Stenberg
be2fcbcbf1 Added a range of new fun date strings to try. This set of dates come from a
mail posted to the http-state mailing list, from Adam Barth, and is said to be
the set of date formats the Chrome browser code is tested against:
http://www.ietf.org/mail-archive/web/http-state/current/msg00129.html

libcurl parses most of them identically, but not all of them.
2009-08-12 11:18:55 +00:00
Daniel Stenberg
4b44638f4d use --insecure to allow non-matching known hosts for SSH-based protocols 2009-08-12 08:14:53 +00:00
Daniel Stenberg
e73fe837a8 - Peter Sylvester made the HTTPS test server use specific certificates for
each test, so that the test suite can now be used to actually test the
  verification of cert names etc. This made an error show up in the OpenSSL-
  specific code where it would attempt to match the CN field even if a
  subjectAltName exists that doesn't match. This is now fixed and verified
  in test 311.
2009-08-11 21:48:58 +00:00
Daniel Stenberg
0179dbe1c2 use --insecure for the SFTP and SCP tests 2009-07-28 17:55:00 +00:00
Daniel Stenberg
9cff716925 don't set READDATA since it isn't used and only confuses readers 2009-07-22 22:08:01 +00:00
Bill Hoffman
a8ea1e9ef4 ENH: add optional support for c-ares 2009-07-14 19:03:31 +00:00
Gunter Knauf
6dade671ad 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 (missing bits) 2009-07-14 15:36:12 +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
Gunter Knauf
100f6b7703 added PKG_CONFIG_PATH to output to better verify if it gets properly set with cross compiles. 2009-07-13 23:33:57 +00:00
Michal Marek
0b317b72ae - When doing non-anonymous ftp via http proxies and the password is not
provided in the url, add it there (squid needs this).
2009-06-16 13:16:28 +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
Yang Tse
7edcc22136 changed testcurl script to allow building test harness
programs when cross-compiling for a *-*-mingw* host.
2009-06-11 01:22:35 +00:00
Yang Tse
1d97f13462 TrackMemory is another feature not supported by curl-config 2009-06-10 04:06:06 +00:00
Yang Tse
2c16681225 Adjusted to take in account that...
With the curl memory tracking feature decoupled from the debug build feature,
CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows:

CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug)

DEBUGBUILD used for debug enabled specific code (--enable-debug)
2009-06-10 02:49:42 +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
8d581f7fe4 Revert delegating c-ares linking magic on libtool and auto-makefiles when using
the uninstalled c-ares libtool archive built from the CVS embedded tree.

This embedded c-ares linking is again handled from the configure script.
2009-06-06 13:20:39 +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
7bf82a814b Die when instructed to build c-ares and this fails 2009-06-03 00:07:46 +00:00
Yang Tse
cd5e6743f7 Delegate c-ares linking magic on libtool and auto-makefiles when using
the uninstalled c-ares libtool archive built from the CVS embedded tree.
2009-05-30 15:56:42 +00:00
Dan Fandrich
2091fe530f Added missing NTLM feature for test 1097 2009-05-30 04:34:11 +00:00
Daniel Stenberg
1cf6c15ab4 - bug report #2796358 (http://curl.haxx.se/bug/view.cgi?id=2796358) pointed
out that the cookie parser would leak memory when it parses cookies that are
  received with domain, path etc set multiple times in the same header. While
  such a cookie is questionable, they occur in the wild and libcurl no longer
  leaks memory for them. I added such a header to test case 8.
2009-05-25 12:23:22 +00:00
Dan Fandrich
26028068e8 Added some missing test keywords 2009-05-22 21:34:32 +00:00
Gunter Knauf
274dc3ecac forced to use nmake for VC builds early so that its also used for ares even if we find a GNU make first in path; simplified curl make call. 2009-05-21 15:18:26 +00:00
Gunter Knauf
5e2b5edde5 strip \r only on non-win32 platforms (wine on Linux). 2009-05-21 14:14:57 +00:00
Gunter Knauf
b8b6521659 removed an attempt to write to non-opened LOG introduced with r1.30. 2009-05-21 14:08:53 +00:00
Gunter Knauf
e37b1b0623 reduced duplicate code. 2009-05-21 13:23:49 +00:00
Gunter Knauf
4a79462c3e stripped \r from win32 curl --version output. 2009-05-21 13:02:34 +00:00
Gunter Knauf
c328cc9608 enable mingw64 target. 2009-05-21 12:59:49 +00:00
Dan Fandrich
7071dd0162 Added "non-existing host" test keywords to make it easy to skip those
tests on machines that have broken DNS configurations (such as
those configured to use OpenDNS).
2009-05-20 19:30:06 +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
Daniel Stenberg
3cb06eb2b2 - James Bursa posted a patch to the mailing list that fixed a problem with
no_proxy which made it not skip the proxy if the URL entered contained a
  user name. I added test case 1101 to verify.
2009-05-17 14:47:50 +00:00
Yang Tse
b8e73495a5 Extend displaying of logfiles upon first server start-up failure for http, https, ftp, ftps and tftp test harness servers. 2009-05-15 11:59:24 +00:00
Yang Tse
187cfc1594 Displaying of logfiles on ftp server satrtup failure for test case #100 becomes standard. 2009-05-15 11:14:03 +00:00
Yang Tse
90cd2a4753 fix compiler warning: unused variable 2009-05-15 10:16:33 +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
86f043a66c temporary debug trace for ftp server satrtup failure on testcase #100 2009-05-12 19:18:54 +00:00
Yang Tse
f882a63cba fix LC_ALL and LC_CTYPE when set with conflicting values 2009-05-12 11:24:29 +00:00
Yang Tse
e25cff9328 Adjust test definition for TPF. 2009-05-11 17:21:26 +00:00
Yang Tse
36b397be9f Fetch curl's 'CharConv' feature information, used by TPF. 2009-05-11 17:20:41 +00:00
Daniel Stenberg
e6e6c6e635 Added test 564 as DISABLED. It is for testing FTP over a SOCK4 proxy using
the multi interface, which currently doesn't work because of how the data
connection is not waiting for connect before it tries to do proxy magic.
2009-05-11 11:43:55 +00:00
Daniel Stenberg
1f340a262f support --help to do the same as -h 2009-05-11 11:39:42 +00:00
Daniel Stenberg
56dab605f1 - I fixed the problem with doing NTLM, POST and then following a 302 redirect,
as reported by Ebenezer Ikonne (on curl-users) and Laurent Rabret (on
  curl-library). The transfer was mistakenly marked to get more data to send
  but since it didn't actually have that, it just hung there...
2009-05-11 08:55:58 +00:00
Yang Tse
75585f771a Fix name of tool shown upon error. 2009-05-11 01:16:28 +00:00
Daniel Stenberg
e6f84b8cc8 Added test 1100 - "HTTP POST with NTLM authorization and following a 302
redirect" doesn't work, seems to repeat what Ebenezer Ikonne (on curl-users)
and Laurent Rabret (on curl-library) have reported. Disabled for now.
2009-05-10 22:10:13 +00:00
Daniel Stenberg
d1ba4324de introduce VCURL for verify calls, so that it can be changed to use a different
binary than the one that gets tested, if need be
2009-05-10 21:20:15 +00:00
Daniel Stenberg
c0b5d378dc made the cookie tests 61 and 62 test httponly cookies, both receiving in
headers and reading from cookie-jar
2009-05-10 18:02:37 +00:00
Yang Tse
31baaf72b4 Changed host name to be under the haxx.se domain 2009-05-08 15:49:19 +00:00
Yang Tse
9ef7b6afe2 Remove temporary and HP-UX autobuild specific change to debug SSH server start-up failures 2009-05-08 02:18:49 +00:00
Yang Tse
c5c03ac556 Fixes for non-ASCII platforms by David McCreedy 2009-05-08 02:14:50 +00:00
Yang Tse
7c6e0d5981 Temporary and HP-UX autobuild specific change to debug SSH server start-up failures 2009-05-06 10:32:06 +00:00
Yang Tse
a840cc700a Revert change committed on Mon May 4 09:30:23 2009 UTC.
The origin of the problem with test case #251 was the --ftp-port not being the CLIENTIP address.
2009-05-05 08:46:31 +00:00
Yang Tse
5eba93c4e7 Fixed the --ftp-port address to the CLIENTIP address. 2009-05-05 08:19:55 +00:00
Yang Tse
ff3e574187 David McCreedy's patch to fix test suite harness to allow test FTP server and client on different machines, providing FTP client address when running the FTP test server. 2009-05-04 10:30:23 +00:00
Dan Fandrich
8119379d4f Added and disabled test case 563 which shows KNOWN_BUGS #59. The bug
report failed to mention that a proxy must be used to reproduce it.
2009-05-03 19:25:17 +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
5a91746b80 David McCreedy's "TPF-platform specific changes to various files" patch 2009-05-01 12:39:40 +00:00
Yang Tse
96ea49870c When generated, display libcurl.pc and libcares.pc 2009-04-30 17:06:58 +00:00
Daniel Stenberg
6b95c4e358 - I was going to fix issue #59 in KNOWN_BUGS
If the CURLOPT_PORT option is used on an FTP URL like
  "ftp://example.com/file;type=A" the ";type=A" is stripped off.

  I added test case 562 to verify, only to find out that I couldn't repeat
  this bug so I hereby consider it not a bug anymore!
2009-04-30 09:02:39 +00:00
Yang Tse
7d1bb21c19 Display only CURL_* and CARES_* symbol/macro definitions from curlbuild.h and ares_build.h 2009-04-29 19:02:22 +00:00
Yang Tse
296baeb096 Trigger c-ares prebuild stage for fake-config setup's 2009-04-29 17:57:49 +00:00
Daniel Stenberg
e2c6e00570 - Based on bug report #2723219 (http://curl.haxx.se/bug/view.cgi?id=2723219)
I've now made TFTP "connections" not being kept for re-use within libcurl.
  TFTP is UDP-based so the benefit was really low (if even existing) to begin
  with so instead of tracking down to fix this problem we instead removed the
  re-use. I also enabled test case 1099 that I wrote a few days ago to verify
  that this change fixes the reported problem.
2009-04-29 11:30:03 +00:00
Yang Tse
5957498c6f When running testcurl.pl display definitions from ares_build.h 2009-04-29 01:31:37 +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
Yang Tse
535b7c5e0f Log MAKEFLAGS environment variable along with the others. 2009-04-27 19:21:45 +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
Daniel Stenberg
30f7a2ff20 - Pramod Sharma reported and tracked down a bug when doing FTP over a HTTP
proxy. libcurl would then wrongly close the connection after each
  request. In his case it had the weird side-effect that it killed NTLM auth
  for the proxy causing an inifinite loop!

  I added test case 1098 to verify this fix. The test case does however not
  properly verify that the transfers are done persistently - as I couldn't
  think of a clever way to achieve it right now - but you need to read the
  stderr output after a test run to see that it truly did the right thing.
2009-04-17 12:48:24 +00:00
Yang Tse
8aa88f4d36 re-enable all tests for all icc autobuilds 2009-04-17 07:30:56 +00:00
Daniel Stenberg
dd0b38b32f first take at bundling cmake-related files in the tarball 2009-04-14 22:00:37 +00:00
Yang Tse
c382c550e7 fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value 2009-04-14 12:53:53 +00:00
Yang Tse
c621546bd6 fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value 2009-04-13 07:18:39 +00:00
Yang Tse
aa330b8240 improve stunnel version detection 2009-04-13 03:47: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
Yang Tse
63fad159e8 Skip test #558 and #559 also when using a Win32 DLL 2009-04-09 01:24:41 +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
Daniel Stenberg
49c6d7e32d Added test 1097 to verify the bug Axel Kuhn epidox posted on March 3 2009
on curl-users, it is also added to DISABLED since I don't have time to work
on it further right now.
2009-03-03 13:25:19 +00:00
Daniel Stenberg
7f22da5230 verify that a 550-response for a RETR returns 78 but also that the control
connection is kept alive afterwards
2009-02-19 13:47:06 +00:00
Daniel Stenberg
bdd4294e79 - Craig A West brought us: libcurl now defaults to do CONNECT with HTTP
version 1.1 instead of 1.0 like before. This change also introduces the new
  proxy type for libcurl called 'CURLPROXY_HTTP_1_0' that then allows apps to
  switch (back) to CONNECT 1.0 requests. The curl tool also got a --proxy1.0
  option that works exactly like --proxy but sets CURLPROXY_HTTP_1_0.

  I updated all test cases cases that use CONNECT and I tried to do some using
  --proxy1.0 and some updated to do CONNECT 1.1 to get both versions run.
2009-02-02 16:19:23 +00:00
Daniel Stenberg
82ca52713b - Alexey Borzov filed bug report #2535504
(http://curl.haxx.se/bug/view.cgi?id=2535504) pointing out that realms with
  quoted quotation marks in HTTP Digest headers didn't work. I've now added
  test case 1095 that verifies my fix.
2009-01-26 13:19:03 +00:00
Dan Fandrich
ddd3fe5948 Improved the title and keywords 2009-01-21 04:46:13 +00:00
Dan Fandrich
5591550167 Fixed a couple more locale-dependent toupper conversions, mainly for
clarity.  This does fix one problem that causes ;type=i FTP URLs
to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is
used (test case 561)

Added tests 561 and 1092 through 1094 to test various combinations
of ;type= and ;mode= URLs that could potentially fail in the Turkish
locale.
2009-01-21 04:42:47 +00:00
Dan Fandrich
6bb9ef8de4 Call setlocale() for libtest tests to test the effects of locale-induced
libc changes on libcurl.
2009-01-21 04:30:05 +00:00
Dan Fandrich
14b6cc4e22 Always use nocheck="yes" for consistency 2009-01-07 21:57:26 +00:00
Gunter Knauf
aa32f61ce7 sync'd address with other tests. 2008-12-30 15:33:09 +00:00
Gunter Knauf
8266727062 trial with an address which has a valid domain part but invalid host to avoid dns redirections. 2008-12-30 09:16:38 +00:00
Dan Fandrich
4607dfe257 Mention what makes this test special 2008-12-11 03:01:38 +00:00
Dan Fandrich
01d6133bd7 Added test cases 1089 and 1090 to test --write-out after a redirect to
test a report that the size didn't work, but these test cases pass.
2008-12-09 21:59:57 +00:00
Daniel Stenberg
18371aaff9 - Fred Machado posted about a weird FTP problem on the curl-users list and when
researching it, it turned out he got a 550 response back from a SIZE command
  and then I fell over the text in RFC3659 that says:

   The presence of the 550 error response to a SIZE command MUST NOT be taken
   by the client as an indication that the file cannot be transferred in the
   current MODE and TYPE.

  In other words: the change I did on September 30th 2008 and that has been
  included in the last two releases were a regression and a bad idea. We MUST
  NOT take a 550 response from SIZE as a hint that the file doesn't exist.
2008-12-08 20:20:51 +00:00
Dan Fandrich
ecc6f550eb Added tests 1087 and 1088 to test Basic authentication on a redirect
with and without --location-trusted
2008-11-25 23:30:53 +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
0fa14c8662 Fully clean up after test 608 so that it can be run twice in succession. 2008-11-24 22:06:43 +00:00
Daniel Stenberg
ba9f8c674c restored from my messy previous commit mistake 2008-11-21 07:47:31 +00:00
Daniel Stenberg
40e8b4e527 - I removed the default use of "Pragma: no-cache" from libcurl when a proxy is
used. It has been used since forever but it was never a good idea to use
  unless explicitly asked for.
2008-11-19 22:00:14 +00:00
Daniel Stenberg
4741e64c89 Josef Wolf's extension that allows a $TESTDIR/gdbinit$testnum file that when
you use runtests.pl -g, will be sourced by gdb to allow additional fancy
or whatever you see fit
2008-11-19 21:56:11 +00:00
Dan Fandrich
cdd6054e08 Display the time in verbose mode during the torture tests to help determine
when the tests stall.
2008-11-17 20:24:13 +00:00
Dan Fandrich
d1f063c62d Shortened some FTP responses to allow the timeout to be reduced by a second
while still causing a timeout during the data phase.
2008-11-13 01:45:59 +00:00
Dan Fandrich
b2ed1e2607 Fixed an OOM problem with test 560 2008-11-12 22:26:06 +00:00
Dan Fandrich
fb8870297d Give the test an extra second to run so it passes on slow machines 2008-11-12 01:04:27 +00:00
Daniel Stenberg
d07d1a6ef8 Added test case 560:
This test was added after the HTTPS-using-multi-interface with OpenSSL
regression of 7.19.1 to hopefully prevent this embarassing mistake from
appearing again... Unfortunately the bug wasn't triggered by this test, which
presumably is because the connect to a local server is too fast/different
compared to the real/distant servers we saw the bug happen with.
2008-11-11 21:59:25 +00:00
Daniel Stenberg
8bdd60fa71 Added missing <keywords> 2008-11-11 21:58:41 +00:00
Yang Tse
95a849efc2 terminate with appropriate exit code 2008-11-07 12:22:43 +00:00
Dan Fandrich
2903a5c050 Added test 1086 to test a timeout the occurs during an FTP data transfer. 2008-11-06 00:13:18 +00:00
Dan Fandrich
4d50b9f1f1 Make the SLOWDOWN option slow the FTP data connection, not just the
control connection.
2008-11-06 00:10:58 +00:00
Yang Tse
02fc7bb5f6 fix OOM handling 2008-10-31 14:46:48 +00:00
Yang Tse
0ce97f77e0 Use our Curl_addrinfo definition even when an addrinfo struct is available.
Use a wrapper function to call system's getaddrinfo().
2008-10-30 13:45:25 +00:00
Dan Fandrich
dc31387c6f SLOWDOWN actually causes a 0.01 second delay between bytes 2008-10-30 01:44:18 +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
b17ca44f0b fix test # 558 and 559 CFLAGS 2008-10-28 00:35:08 +00:00
Yang Tse
9230708e47 don't skip tests 558 and 559 on i686 icc autobuilds 2008-10-27 20:09:35 +00:00
Yang Tse
92f3b3895e test #558 tests internal hash create/destroy
test #559 tests internal hash create/add/destroy
2008-10-27 20:01:58 +00:00
Yang Tse
310d842b70 Skip test #558 when libcurl is built with hidden symbols 2008-10-27 14:02:50 +00:00
Yang Tse
1498de83d6 For tracing purposes log a fake call to getaddrinfo
when allocating/building the fake Curl_addrinfo.
2008-10-27 08:20:36 +00:00
Yang Tse
39e5fa6ae8 avoid using Curl_ip2addr(), simply build up a fake Curl_addrinfo 2008-10-27 03:00:47 +00:00
Yang Tse
dc289aa4fa convert test #558 into something more interesting, attempting
now to minimally exercise some internal hash routines.
2008-10-26 21:40:20 +00:00
Yang Tse
6db8f53445 test #558 verifies loop operation using malloc() and free() 2008-10-26 03:03:29 +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
Dan Fandrich
9391d980c3 Tweaked a few tests to test proper Turkish locale handling 2008-10-23 01:53:27 +00:00
Yang Tse
81e48ada47 For i686 icc autobuilds:
Re-enable all tests for debug-enabled builds.

  For debug-disabled builds only 8 tests are enabled.
2008-10-22 15:03:15 +00:00
Dan Fandrich
7ff38c14a9 Fixed some problems with SFTP range support to fix test cases 634 through 637. 2008-10-21 07:10:25 +00:00
Dan Fandrich
7ded272b94 Added missing HTTP proxy and other keywords 2008-10-16 21:34:34 +00:00
Dan Fandrich
357383159e A <precheck> command is considered to have failed if it returns a non-zero
return code.  This way, if the precheck command can't be run at all for
whatever reason, it's treated as a precheck failure which causes the
test to be skipped.
2008-10-15 17:41:02 +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
Dan Fandrich
a102c2c22b Don't rely on shell support to run multiple precheck tests 2008-10-13 20:41:02 +00:00
Dan Fandrich
d74d3fe851 Ensure the IPv6 stack is operational before running this test (other tests
use the startup of the IPv6 test server as a substitute check for this).
2008-10-12 05:27:26 +00:00
Dan Fandrich
5ecff1e4c3 Added HTTP as a required feature 2008-10-09 18:53:17 +00:00
Dan Fandrich
f6d80d66a2 Added tests 633 through 637 to test the new file range support for SFTP.
All but the first test cause an infinite loop or other failure and so
are added to DISABLED.
2008-10-09 05:16:06 +00:00
Daniel Stenberg
830018aa38 - Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified and
fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing:

  Any subsequent transfer with a redirect leaks memory, eventually crashing
  the process potentially.

  Any subsequent transfer WITHOUT a redirect causes the most recent redirect
  that DID occur on some previous transfer to still be reported.
2008-10-08 22:01:23 +00:00
Dan Fandrich
8dfddd279b Added tests 1082 through 1085 to test symbolic --interface parameters 2008-10-08 21:46:55 +00:00
Dan Fandrich
11a8a25528 Created test cases 1080 and 1081 to reproduce a problem of
CURLINFO_REDIRECT_URL leaking memory and returning incorrect results when
two URLs are requested. Reported by vmpdemo in bug #2152270
2008-10-08 03:32:10 +00:00
Dan Fandrich
95456b8e78 Added const to some pointer variables 2008-10-08 01:17:51 +00:00
Dan Fandrich
b9ce871463 Changed the handling of read/write errors in Curl_perform() to allow a
a fresh connection to be made in such cases and the request retransmitted.
This should fix test case 160.  Added test case 1079 in an attempt to
test a similar connection dropping scenario, but as a race condition, it's
hard to test reliably.
2008-10-07 23:15:02 +00:00
Dan Fandrich
feeabd08ab Document how to disable tests when certain --disable-* flags are used. 2008-10-07 20:28: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
Yang Tse
ac0e0351a0 runtests.pl enables picky compiler warnings unless explicitly disabled 2008-10-02 03:59:25 +00:00
Dan Fandrich
88513d2d1a Fixed some compiler warnings with gcc 2008-10-01 17:34:24 +00:00
Dan Fandrich
d3fdbe48ae Added "HTTP proxy" keyword 2008-09-30 17:18:27 +00:00
Daniel Stenberg
038542ea3e - The libcurl FTP code now returns CURLE_REMOTE_FILE_NOT_FOUND error when SIZE
gets a 550 response back for the cases where a download (or NOBODY) is
  wanted. It still allows a 550 as response if the SIZE is used as part of an
  upload process (like if resuming an upload is requested and the file isn't
  there before the upload). I also modified the FTP test server and a few test
  cases accordingly to match this modified behavior.
2008-09-30 09:51:58 +00:00
Dan Fandrich
372203f1fa Added "HTTP proxy" and "proxytunnel" keywords where applicable 2008-09-29 22:44:04 +00:00
Yang Tse
a632f6d5b1 if a test execution is aborted due to a signal, and the process
returns no other exitcode, use 2000 + signal number as return code
2008-09-26 18:56:56 +00:00
Yang Tse
42271ad463 use shift right. Division result is not integral. 2008-09-26 14:08:33 +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
82107a02f5 Re-enable test #100 on i686 icc autobuilds 2008-09-24 01:29:23 +00:00
Daniel Stenberg
42224594b6 remove the entire comment now when we no longer set TZ 2008-09-23 11:02:56 +00:00
Daniel Stenberg
d369a2b775 - Introducing Jamie Lokier's function for date to epoch conversion used in the
date parser function. This makes our function less dependent on system-
  provided functions and instead we do all the magic ourselves. We also no
  longer depend on the TZ environment variable.
2008-09-23 11:00:01 +00:00
Daniel Stenberg
391e8afd1f - Made the SOCKS code use the new Curl_read_plain() function to fix the bug
Markus Moeller reported: http://curl.haxx.se/mail/archive-2008-09/0016.html

- recv() errors other than those equal to EAGAIN now cause proper
  CURLE_RECV_ERROR to get returned. This made test case 160 fail so I've now
  disabled it until we can figure out another way to exercise that logic.
2008-09-22 23:12:00 +00:00
Daniel Stenberg
de48e4e4df better description 2008-09-22 21:33:18 +00:00
Yang Tse
1e076a4ae0 Re-enable tests #1 on i686 icc autobuilds 2008-09-22 18:55:42 +00:00
Dan Fandrich
abe61b9926 Fixed test 539 to handle an out of memory condition that shows up now
that memdebug.h is included in the test programs.
2008-09-22 17:20:29 +00:00
Yang Tse
2b767161da fix compiler warning: defined but not used 2008-09-21 04:02:13 +00:00
Yang Tse
7c9631081d fix compiler warning: external declaration in primary source file 2008-09-21 03:48:25 +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
7beb473a3d include "memdebug.h" 2008-09-20 04:26:55 +00:00
Yang Tse
f7ef60c13f fix compiler warning: external definition with no prior declaration 2008-09-18 19:17:28 +00:00
Yang Tse
8b2bfa4212 fix compiler warning: external definition with no prior declaration 2008-09-18 19:02:40 +00:00
Yang Tse
a6c915aab9 fix compiler warning: external declaration in primary source file 2008-09-18 16:21:09 +00:00
Dan Fandrich
974145f61c Changed the test data file so it passes an XML syntax check 2008-09-15 22:35:09 +00:00
Yang Tse
eae27d1788 Disable all tests on i686 icc autobuilds to inspect build messages 2008-09-08 16:50:04 +00:00
Dan Fandrich
c3d871aef4 Added HTTP 1.0 downgrade tests with proxies 2008-09-06 18:24:04 +00:00
Yang Tse
59e378f48f remove unnecessary typecasting of malloc() 2008-09-06 05:29:05 +00:00
Dan Fandrich
91ff938035 Improved the logic the decides whether to use HTTP 1.1 features or not in a
request.

Detect cases where an upload must be sent chunked and the server supports
only HTTP 1.0 and return CURLE_UPLOAD_FAILED.
2008-09-05 17:58:53 +00:00
Daniel Stenberg
18110b519c - Martin Drasar provided the CURLOPT_POSTREDIR patch. It renames
CURLOPT_POST301 (but adds a define for backwards compatibility for you who
  don't define CURL_NO_OLDIES). This option allows you to now also change the
  libcurl behavior for a HTTP response 302 after a POST to not use GET in the
  subsequent request (when CURLOPT_FOLLOWLOCATION is enabled). I edited the
  patch somewhat before commit. The curl tool got a matching --post302
  option. Test case 1076 was added to verify this.
2008-09-05 16:13:20 +00:00
Daniel Stenberg
780f13db30 Stefan Krause's mail to curl-library at 03 Sep 2008 made me add these two
new date strings to get tested too.
2008-09-05 08:15:21 +00:00
Yang Tse
8733e087d7 fix print formatting string directives 2008-09-04 05:29:10 +00:00
Dan Fandrich
85a79f9d67 Added tests 1071 through 1074 to test automatic downgrading from HTTP 1.1
to HTTP 1.0 upon receiving a response from the HTTP server.  Tests 1072
and 1073 are similar to test 1069 in that they involve the impossible
scenario of sending chunked data to a HTTP 1.0 server.  All these currently
fail and are added to DISABLED.

Added test 1075 to test --anyauth with Basic authentication.
2008-08-29 23:42:39 +00:00
Daniel Stenberg
d24465b79a test 1070 added 2008-08-29 10:48:27 +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
Daniel Stenberg
e138ae5ec9 - I'm abandoning the system with the web site mirrors (but keeping download
files bing mirrored) and thus I've changed the URL in the cookiejar header
  to no longer use curlm.haxx.se but instead use the main site curl.haxx.se
2008-08-28 11:35:54 +00:00
Dan Fandrich
8ce78ca488 Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to set
the HTTP method to GET (or HEAD) when given a value of 0.
2008-08-28 06:28:07 +00:00
Dan Fandrich
370c3afc71 Added test 1069 to test PUT from stdin without content length. It fails
in a similar manner to test 1065 so is added to DISABLED.
2008-08-28 02:24:46 +00:00
Dan Fandrich
93357ef017 Added test 1069 to test PUT from stdin without content length. It fails
in a similar manner to test 1065 so is added to DISABLED.
2008-08-28 02:18:44 +00:00
Dan Fandrich
753592cc70 Added test case 1068 to do a simple HTTP PUT from stdin 2008-08-28 02:03:54 +00:00
Dan Fandrich
fc09d10560 Added multi keyword 2008-08-26 20:21:59 +00:00
Dan Fandrich
59b2e3ea4a Added multi keyword 2008-08-26 20:11:12 +00:00
Yang Tse
d744c85310 Re-enable all tests on x86_64 and ia64. 2008-08-24 23:26:07 +00:00
Yang Tse
62d94ff342 Fix wrong signed int formatting string directive in test case #557.
This error did not cause test failures on systems where sizeof(int) == sizeof(long).
2008-08-24 17:10:24 +00:00
Yang Tse
71d3c5bf41 Disable all tests except #557 on x86_64 and ia64 to debug trace curl_mprintf() on these systems. 2008-08-24 15:57:52 +00:00
Daniel Stenberg
b34390017b added test case 1067 to verify --referer "firstone.html;auto" 2008-08-23 21:27:58 +00:00
Daniel Stenberg
a604682805 Andy Tsouladze's fix to kill the knowledge of servers properly after they have
been killed.
2008-08-23 11:25:14 +00:00
Dan Fandrich
e3ad6d2bd1 Fixed a problem when --dump-header - was given with more than one URL,
which caused an error when the second header was dumped due to stdout
being closed.  Added test case 1066 to verify.  Also fixed a potential
problem where a closed file descriptor might be used for an upload
when more than one URL is given.
2008-08-22 22:57:25 +00:00
Yang Tse
e5b713ee63 Increase to 20 the number of CVS update retries. 2008-08-22 18:18:20 +00:00
Yang Tse
95cef39def Test case 557 now also verifies signed and unsigned int formatting. 2008-08-21 05:19:40 +00:00
Yang Tse
1c68e79091 Simplify condition check 2008-08-20 23:29:07 +00:00
Yang Tse
3e0b6a7d1f Update test case 557 2008-08-18 18:52:13 +00:00
Yang Tse
2f71461b29 Added test case 557 to verify libcurl's internal curl_m*printf() functions
formatting functionality when handling signed and unsigned longs, as well as
our curl_off_t data type.
2008-08-18 09:58:08 +00:00
Yang Tse
ac18b471d2 libcurl internal base64.h header file renamed to curl_base64.h 2008-08-17 00:25:38 +00:00
Dan Fandrich
a923d8541c Added test case 1065 to test a PUT with a single file but two URLs. This
was discovered to be problematic while investigating an incident reported by
Von back in May.  curl in this case doesn't include a Content-Length: or
Transfer-Encoding: chunked header which is illegal. This test case is
added to DISABLED until a solution is found.
2008-08-15 19:18:46 +00:00
Dan Fandrich
527a5f0980 Added Range keyword 2008-08-14 19:18:18 +00:00
Dan Fandrich
6e878d2ca4 Added test 1063 to test an invalid large range on a file: 2008-08-14 19:18:01 +00:00
Dan Fandrich
7eab7fa353 Fixed a buffer overflow problem in Curl_proxyCONNECT that could occur
when a server responded with long headers and data.  Luckily, the buffer
overflowed into another unused buffer, so no actual harm was done.
Added test cases 1060 and 1061 to verify.
2008-08-12 20:07:52 +00:00
Dan Fandrich
9ee7a014c9 Handle short reads 2008-08-12 18:32:55 +00:00
Daniel Stenberg
14a5596346 - Andy Tsouladze fixed runtests.pl to not attempt to execute the stunnel
_directory_ if that happened to appear in the path!
2008-08-12 07:21:39 +00:00
Dan Fandrich
e8e8177e9d Added HTTP CONNECT keywords 2008-08-11 23:16:48 +00:00
Dan Fandrich
f1fe04245a Fixed a boundary condition error in ftp_readresp() whereby a non-terminal
line of a multiline FTP response whose last byte landed exactly at the end
of the BUFSIZE-length buffer would be treated as the terminal response
line.  The following response code read in would then actually be the
end of the previous response line, and all responses from then on would
correspond to the wrong command. Test case 1062 verifies this.

Stop closing a never-opened ftp socket.
2008-08-11 23:16:08 +00:00
Yang Tse
3a1d28379a Die when curlbuild.h is not created or available 2008-08-11 00:15:20 +00:00
Yang Tse
68cfe929c4 Fix NetWare curlbuild.h
NetWare curlbuild.h settings depend on whether LIBC or CLIB is used.

The NetWare specific Makefile is capable of knowing which target is being built.
So, finally, the NetWare Makefile will take care of generating curlbuild.h
2008-08-10 18:33:41 +00:00
Yang Tse
b023f9bd2a When running testcurl.pl display definitions from curlbuild.h 2008-08-09 23:14:40 +00:00
Yang Tse
f01d18e4b9 Reintroduce the adjustment previously done in testcurl.pl so that it copies the
CVS checked out curlbuild.h.dist as curlbuild.h for any non-configure target
when host system is not running buildconf.bat.

All the curlbuild.h stuff was done taking in consideration that no adjustment
would be needed in non-configure makefiles.

As it is documented, when trying to build on non-configure capable systems or on
systems which for any reason don't run the true configure script, it is required
to have the proper curlbuild.h in place before calling any makefile.

Due to the hardcore memory debugging stuff c-ares enabled debug builds also need
the file in the proper place before attempting to build c-ares.
2008-08-08 12:34:01 +00:00
Dan Fandrich
fa001f27a5 Made ftp a required feature 2008-08-08 07:51:50 +00:00
Dan Fandrich
40b2e06a7f Added test1059 to test the FTP proxy tunnel problem fixed July 11. 2008-08-08 07:26:30 +00:00
Yang Tse
8008499028 Peek at predefined symbols done. and now removed.
Netware's autobuilds gcc can not been told apart from a standard built gcc.
2008-08-08 05:58:08 +00:00
Yang Tse
8d36acd29b Take a peek at netware's gcc predefined symbols. 2008-08-08 03:09:16 +00:00
Yang Tse
f6a958dc3a Remove last adjustment done to testcurl.pl to verify if change introduced by
Guenter Knauf in lib/Makefile.netware is enough to get the netware autobuilds
going again.
2008-08-07 22:40:06 +00:00
Yang Tse
a7d52c414f Adjust testcurl.pl to copy checked out curlbuild.h.dist as curlbuild.h
for non-configure targets when host system doesn't run buildconf.bat.
2008-08-07 20:41:12 +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
Daniel Stenberg
3a499099af - Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and
proved how PUT and POST with a redirect could lead to a "hang" due to the
  data stream not being rewound properly when it had to in order to get sent
  properly (again) to the subsequent URL. This is now fixed and these test
  cases are no longer disabled.
2008-08-04 22:00:22 +00:00
Daniel Stenberg
8d012181b0 - Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
with -C - sent garbage in the Content-Range: header. I fixed this problem by
  making sure libcurl always sets the size of the _entire_ upload if an app
  attemps to do resumed uploads since libcurl simply cannot know the size of
  what is currently at the server end. Test 1041 is no longer disabled.
2008-08-03 22:20:58 +00:00
Dan Fandrich
6838fb32af Improved title 2008-08-03 05:13:05 +00:00
Dan Fandrich
f27299dc3b Added tests 1057 and 1058 to test FTP and HTTPS transfers with ranges
relative to end of file.
2008-08-01 22:12:34 +00:00
Dan Fandrich
9251dd7b24 User names embedded in proxy URLs without a password were parsed
incorrectly--the host name is treated as part of the user name and the
port number becomes the password.  This can be observed in test 279
(was KNOWN_ISSUE #54).
2008-08-01 02:09:08 +00:00
Dan Fandrich
b13b9f3331 Fixed keyword 2008-07-31 05:00:02 +00:00
Dan Fandrich
108e584983 Added keywords 2008-07-31 02:51:44 +00:00
Dan Fandrich
f3b4071209 Added test of IPv6 scope handling 2008-07-31 02:38:51 +00:00
Yang Tse
0de08d418f s/silly/underquoted definition/ 2008-07-31 01:41:20 +00:00
Dan Fandrich
bc649593e4 Added test cases 1052 through 1055 to test uploading data from files
during redirects.  Test cases 1052 and 1055 show problems (maybe the same
root cause as 1051) and are disabled.
2008-07-30 21:04:44 +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
7a588144b7 Reinstate hiding aclocal 'underquoted definition' warnings. 2008-07-30 04:42:16 +00:00
Dan Fandrich
adc032e7d8 Return an error code when extra files are found in filecheck: 2008-07-29 18:57:01 +00:00
Dan Fandrich
4ff37a4ed1 Added test case 1050 to test --ftp-port with an IPv6 address.
Made --interface tests less restrictive on host address.
2008-07-29 01:05:28 +00:00
Dan Fandrich
f042a7419d Added test cases 1045 through 1049 as simple tests of --interface using the
localhost interface.
2008-07-28 18:39:32 +00:00
Dan Fandrich
b6b03c8ab9 Added feature in runtests.pl to select tests based on key word. 2008-07-27 02:34:27 +00:00
Dan Fandrich
e06944438a Added test 1044 to test large file support in ftp with -I. 2008-07-26 20:09:36 +00:00
Yang Tse
b217e6eed7 No longer hide aclocal 'underquoted definition' warnings.
http://sources.redhat.com/automake/automake.html#Extending-aclocal documents
that starting with Automake 1.8, aclocal will warn about all underquoted calls
to AC_DEFUN due to the fact that in a single aclocal run it might include more
than once all .m4 files which it finds available, this includes .m4 files from
other software packages.

If the first argument to AC_DEFUN is underquoted and the same macro is included
more than once, successive inclusions after the first one will expand the macro
instead of assuming it is the same as the first one included.
2008-07-26 00:19:03 +00:00
Dan Fandrich
932b589780 Changed the long logfile elision code in runtests.pl to properly handle
lines ending in \r.
2008-07-24 02:16:48 +00:00
Dan Fandrich
27c282a6ee Mention that the test harness can't check every possible feature. 2008-07-23 23:03:52 +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
Dan Fandrich
ed2dbefa73 Fixed the XML syntax of a few test files. 2008-07-17 22:39:23 +00:00
Yang Tse
1e7125ae7b add comment for include paths 2008-07-15 05:46:49 +00:00
Dan Fandrich
aa4a7471dd Added test1042 and test1043 to test -C - on HTTP. 2008-07-15 04:12:15 +00:00
Dan Fandrich
69a03ce23c Added test1040 and test1041 to test -C - on HTTP. Test 1041 failed so it's
added to DISABLED.
2008-07-15 03:36:38 +00:00
Dan Fandrich
336992cc54 Fixed test 553 to pass the torture test. 2008-07-11 18:23:06 +00:00
Dan Fandrich
13afcbd1eb Avoid a potential zombie process when killing an old ftpserver 2008-07-11 17:18:37 +00:00
Dan Fandrich
8d49a8f278 Added test cases 1038 and 1039 to test Adrian Kreher's report that ftp
uploads with -C - didn't resume properly, but the tests pass.
2008-07-11 05:08:06 +00:00
Yang Tse
d8f109176c fallback to gettimeofday when monotonic clock is unavailable at run-time 2008-07-10 07:16:45 +00:00
Dan Fandrich
bbb1b99ce1 Added tests 1036 and 1037 to verify resumed ftp downloads with -C - 2008-07-10 06:09:03 +00:00
Dan Fandrich
60f0b4fffe Fixed test 554 to pass the torture test. 2008-07-08 21:16:18 +00:00
Dan Fandrich
a25959184e Added test cases 1034 & 1035 to test IDN name conversion failures. 2008-07-07 23:52:52 +00:00
Daniel Stenberg
0e5da5b8bc - Scott Barrett provided a test case for a segfault in the FTP code and the
fix for it. It occured when you did a FTP transfer using
  CURLFTPMETHOD_SINGLECWD and then did another one on the same easy handle but
  switched to CURLFTPMETHOD_NOCWD. Due to the "dir depth" variable not being
  cleared properly.  Scott's test case is now known as test 539 and it
  verifies the fix.
2008-07-07 20:37:07 +00:00
Daniel Stenberg
82412f218f Phil Blundell provided a fix for libcurl's treatment of unexpected 1xx
response codes. Previously libcurl would hang on such occurances. I added
test case 1033 to verify.
2008-07-03 08:47:53 +00:00
Daniel Stenberg
d92945bb8a - Eduard Bloch filed the debian bug report #487567
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that
  libcurl used Content-Range: instead of Range when doing a range request with
  --head (CURLOPT_NOBODY). This is now fixed and test case 1032 was added to
  verify.
2008-06-22 20:38:16 +00:00
Dan Fandrich
a837bd08b0 Edited some test keywords for consistency 2008-06-21 17:56:48 +00:00
Dan Fandrich
70d834c512 Always use $LOGDIR when referring to the log directory. 2008-06-19 01:12:02 +00:00
Dan Fandrich
5304b13365 Added SSH failure test cases 628-632 2008-06-19 00:18:58 +00:00
Daniel Stenberg
2d0fea2650 fixed the language somewhat 2008-06-13 20:45:34 +00:00
Dan Fandrich
024c7641a9 Added IPv6 keywords for some more tests that require IPv6 networking support 2008-06-12 23:50:57 +00:00
Daniel Stenberg
5abfdc0140 - curl the tool now deals with its command line options somewhat differently!
All boolean options (such as -O, -I, -v etc), both short and long versions,
  now always switch on/enable the option named. Using the same option multiple
  times thus make no difference. To switch off one of those options, you need
  to use the long version of the option and type --no-OPTION. Like to disable
  verbose mode you use --no-verbose!

- Added --remote-name-all to curl, which if used changes the default for all
  given URLs to be dealt with as if -O is used. So if you want to disable that
  for a specific URL after --remote-name-all has been used, you muse use -o -
  or --no-remote-name.
2008-06-08 20:53:49 +00:00
Daniel Stenberg
930a45e7a9 - Added CURLINFO_PRIMARY_IP as a new information retrievable with
curl_easy_getinfo. It returns a pointer to a string with the most recently
  used IP address. Modified test case 500 to also verify this feature. The
  implementing of this feature was sponsored by Lenny Rachitsky at NeuStar.
2008-06-06 17:33:35 +00:00
Daniel Stenberg
e7b5a8e6cb curl returns 0 for these options now 2008-06-01 22:10:21 +00:00
Daniel Stenberg
27eaf0cf02 now returns 0 2008-06-01 22:04:09 +00:00
Daniel Stenberg
f7815fa93c - Bug report #1973352 (http://curl.haxx.se/bug/view.cgi?id=1973352) identified
how the HTTP redirect following code didn't properly follow to a new URL if
  the new url was but a query string such as "Location: ?moo=foo". Test case
  1031 was added to verify this fix.
2008-05-26 20:39:41 +00:00
Dan Fandrich
d31da176eb Made sure to pass longs in to curl_easy_setopt where necessary in the
libtest code.
2008-05-22 21:49:52 +00:00
Daniel Stenberg
c1dfe2c529 wait for all 129 bytes 2008-05-13 21:43:37 +00:00
Daniel Stenberg
7f88e8badb Added test case 556 that uses curl_easy_send() and curl_easy_recv() 2008-05-13 21:42:07 +00:00
Yang Tse
ed80eb5b0f configure script will now define HAVE_CLOCK_GETTIME_MONOTONIC symbol only
when function clock_gettime() is available and the monotonic timer is
also available. Otherwise, in some cases, librt or libposix4 could be used
for linking even when finally not using the clock_gettime() function due
to lack of the monotonic clock.
2008-05-12 02:04:21 +00:00
Yang Tse
60dd765b3d fix syntax error: missing semicolon 2008-05-10 23:50:55 +00:00
Yang Tse
19479ea021 Internal time differences now use monotonic time source if available.
This also implies the removal of the winmm.lib dependency for WIN32.
2008-05-09 16:31:51 +00:00
Daniel Stenberg
fc9e0d2249 - Ben Van Hof filed bug report #1945240: "libcurl sometimes sends body twice
when using CURL_AUTH_ANY" (http://curl.haxx.se/bug/view.cgi?id=1945240).
  The problem was that when libcurl rewound a stream meant for upload when it
  would prepare for a second request, it could accidentally continue the
  sending of the rewound data on the first request instead of on the second.
  Ben also provided test case 1030 that verifies this fix.
2008-05-03 21:45:12 +00:00
Dan Fandrich
45edad84cb Document that variable replacement now takes place in the test file <stdout> section. 2008-05-01 17:48:00 +00:00
Daniel Stenberg
fd31f7e7e5 use variables to support other IPs and port numbers 2008-05-01 10:52:12 +00:00
Daniel Stenberg
7b2531da24 do variable replacement in the stdout data read from the test case 2008-05-01 10:51:16 +00:00
Dan Fandrich
848a13654d Added precheck for hard-coded test server address and port 2008-05-01 00:20:01 +00:00
Dan Fandrich
1cca8f5a30 Made file XML compatible 2008-05-01 00:18:16 +00:00
Daniel Stenberg
852989856d - To make it easier for applications that want lots of magic stuff done on
redirections and thus cannot use CURLOPT_FOLLOWLOCATION easily, we now
  introduce the new CURLINFO_REDIRECT_URL option that lets applications
  extract the URL libcurl would've redirected to if it had been told to. This
  then enables the application to continue to that URL as it thinks is
  suitable, without having to re-implement the magic of creating the new URL
  from the Location: header etc. Test 1029 verifies it.
2008-04-30 21:20:08 +00:00
Dan Fandrich
ab71654078 Added test 1028 to test an HTTP redirect to a FTP URL. 2008-04-29 02:30:09 +00:00
Yang Tse
b8193b6321 tests/libtest/delay.pl no longer used. The 'delay' attribute of the
test harness <command> subsection now provides this functionality.
2008-04-25 11:01:26 +00:00
Yang Tse
113d0937de Add 'timeout' and 'delay' attributes support for the test harness <command> subsection 2008-04-25 04:19:50 +00:00
Yang Tse
e0f0a2ccee <postcheck> delay no longer needed for this test.
http://curl.haxx.se/mail/lib-2008-04/0392.html
2008-04-23 23:58:00 +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
ed1ad28e29 Remove previously introduced small delay to verify if it can be avoided
with the accelerated writing of server input and response request files
in test harness sws server.
2008-04-22 00:23:18 +00:00
Dan Fandrich
768e3e796e Ignore the result of the postcheck command in torture mode 2008-04-21 17:19:44 +00:00
Dan Fandrich
3869d4a3a7 Make the test work with nroffs that use special escaping for bold output. 2008-04-21 16:57:27 +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
Dan Fandrich
7abf50a5c0 Added test cases 1026 and 1027 to do some rudimentary tests on the --manual
and --help options.
2008-04-18 22:31:52 +00:00
Yang Tse
d3f46eb61b test 1001 needs a small delay between client part execution and test
result file verifications to allow the test server to completely write
out all files
2008-04-18 17:25:54 +00:00
Yang Tse
72c58b0d1d test 1001 needs a small delay between client part execution and test
result file verifications to allow the test server to completely write
out all files
2008-04-18 17:17:14 +00:00
Yang Tse
6c89e1b311 fix compiler warning: enumerated type mixed with another type 2008-04-17 11:59:46 +00:00
Daniel Stenberg
0331071346 Added test case 555, a variation of 547 but using multi interface instead of
easy. This was reported not working by Penugonda Chenna Reddy in
http://curl.haxx.se/mail/lib-2008-04/0046.html but I fail to repeat that
problem.
2008-04-16 21:11:46 +00:00
Dan Fandrich
a9591ad1b7 Added test case 1025 to test a command-line cookie with Location: following 2008-04-10 18:18:55 +00:00
Dan Fandrich
c97d112b30 Added test case 1024 to test a scenario similar to the one reported
by Ben Combee where libcurl would send the wrong cookie to a redirected
server.  libcurl was doing the right thing in this test case.
2008-04-10 04:21:08 +00:00
Yang Tse
6fd3ff4032 fix compiler warning: argument is incompatible with corresponding format string conversion 2008-04-07 15:40:49 +00:00
Yang Tse
532d4b5106 SunSSH sshd ignores UsePrivilegeSeparation option 2008-04-04 14:47:32 +00:00
Yang Tse
5788719988 SunSSH 1.2 options sync 2008-04-04 14:08:36 +00:00
Daniel Stenberg
ac0b911eda oops, forgot to add test554 2008-04-04 11:39:32 +00:00
Dan Fandrich
10232bfe9e Added test627 to test SFTP with CURLOPT_NOBODY 2008-04-04 02:06:35 +00:00
Daniel Stenberg
a2314225e0 - Added CURLFORM_STREAM as a supported option to curl_formadd() to allow an
application to provide data for a multipart with the read callback. Note
  that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the
  stream option is used. This feature is verified by the new test case
  554. This feature was sponsored by Xponaut.
2008-03-31 10:02:23 +00:00
Dan Fandrich
7f7b643c0d Made the test work on perl 5.00 2008-03-28 18:19:11 +00:00
Daniel Stenberg
95bd901efe - Fixed the problem with doing a zero byte SCP transfer, verified with test
case 617 (which was added by Daniel Fandrich 5 Mar 2008).
2008-03-22 22:00:21 +00:00
Gunter Knauf
c0a30b04c2 added --extvercmd parameter which can be used to specify an external command to display 'curl --version', f.e. with MinW32 crosscompile --extvercmd=/usr/bin/wine can be used. 2008-03-20 16:10:54 +00:00
Dan Fandrich
e9a460411f Fixed an infinite loop when given an invalid SFTP quote command. 2008-03-18 22:59:04 +00:00
Dan Fandrich
a57098ea9b Added test 626 to reproduce an infinite loop when given an invalid
SFTP quote command reported by Vincent Le Normand, but left it disabled.
2008-03-18 17:05:29 +00:00
Dan Fandrich
942daece00 Spell the commands right 2008-03-15 01:03:23 +00:00
Dan Fandrich
040a4443a1 Added tests 622-625 to test SFTP/SCP uploads. Test 625 was an attempt to
reproduce the --ftp-create-dirs problem reported by Brian Ulm, but that
seems to need a call curl_easy_reset() which this test case doesn't do.
2008-03-13 22:51:39 +00:00
Daniel Stenberg
fc9ad03e66 updated according to the name resolve race condition fix just committed 2008-03-11 22:58:52 +00:00
Dan Fandrich
458925ae0b Added tests 618-621 to test SFTP/SCP transfers of more than one file
(test 620 tests the just-fixed problem reported by Brian Ulm).
2008-03-10 19:40:27 +00:00
Michal Marek
e44dc92197 fixed typo 2008-03-10 14:32:19 +00:00
Dan Fandrich
b16ea66cec Added tests 616 and 617 to see how SFTP and SCP cope with zero-length
files, as questioned by Mike Protts. SFTP does for me but SCP doesn't
so test 617 is disabled for now.
2008-03-06 01:15:28 +00:00
Dan Fandrich
80cec5a62a Fixed the test harness so it will write out zero-length data files. 2008-03-06 01:11:43 +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
Daniel Stenberg
b12fef3f31 Michal Marek's cleanup of how curl_easy_setopt() is used in examples and
test code. Thanks to his curl_easy_setopt() typechecker work...
2008-02-27 09:06:15 +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
Daniel Stenberg
e6170eb20d - Fixed test case 405 to not fail when libcurl is built with GnuTLS 2008-02-20 12:18:08 +00:00
Daniel Stenberg
2c80bcbc81 made the non-matching error code output nicer since we know it is a number
and the string contains a newline...
2008-02-20 12:14:31 +00:00
Daniel Stenberg
55700cb01f - We no longer support setting the CURLOPT_URL option from inside a callback
such as the CURLOPT_SSL_CTX_FUNCTION one treat that as if it was a Location:
  following. The patch that introduced this feature was done for 7.11.0, but
  this code and functionality has been broken since about 7.15.4 (March 2006)
  with the introduction of non-blocking OpenSSL "connects".

  It was a hack to begin with and since it doesn't work and hasn't worked
  correctly for a long time and nobody has even noticed, I consider it a very
  suitable subject for plain removal. And so it was done.
2008-02-20 08:28:02 +00:00
Dan Fandrich
0cae201044 Added test309 to test HTTP redirect to HTTPS URL 2008-02-19 21:57:41 +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
Daniel Stenberg
11fae450fa make this test disabled properly when built with yassl 2008-02-13 21:36:24 +00:00
Yang Tse
cf9259dd92 verifyserver() actually returns the pid of the unsecure http and ftp servers
when verifying the https and ftps servers
2008-02-13 06:06:57 +00:00
Yang Tse
6634e3c3a3 On heavily loaded systems any test server start up can take longer than the
timeout passed to startnew, when this happens startnew completes without being
able to read the pidfile and consequently returns a zero pid2.

To fix the above posibility the server pid is recovered from the verification
stage which will actually return the server pid when verification is valid.
2008-02-12 13:47:56 +00:00
Yang Tse
533ae704a1 fix grammatical issues 2008-02-12 01:11:55 +00:00
Yang Tse
dc9fe9c361 shell startup scripts and possible influence in scp/sftp/socks tests 2008-02-11 20:21:06 +00:00
Dan Fandrich
75c369dcca Disable test due to keyword before disabling due to bad server. 2008-02-11 20:10:36 +00:00
Yang Tse
8f9e0357dd Additional SunSSH 1.1 ssh server options 2008-02-11 14:28:48 +00:00
Yang Tse
6942d313ff Verify only once test harness sftp server connectivity and functionality.
Make sure that the sftp client tool uses the ssh client binary that we have
used to generate the configuration files, otherwise sftp might be using one
located in the preferred path compiled into sftp.
2008-02-10 02:52:17 +00:00
Dan Fandrich
15e56c3284 Fixed some XML parsing problems. 2008-02-09 02:37:31 +00:00
Dan Fandrich
fc1443dcfc Added key words to all SSL-using tests so they can be skipped if necessary.
Removed a few unnecessary requires SSL statements.
2008-02-09 02:08:34 +00:00
Dan Fandrich
59e3651af3 Fixed test to use HTTPS as documented. 2008-02-09 02:01:36 +00:00
Dan Fandrich
f01d324c83 Missed checking in these test data files. 2008-02-08 18:42:12 +00:00
Yang Tse
405e192b8c Get rid of sftp subsystem additional parameters, they aren't widely supported 2008-02-08 17:32:58 +00:00
Yang Tse
1a340de0e5 To verify that the sftp server is actually running, responsive and that
all curl's tests generated configuration and key files are fine, a real
connection is established to the test harness sftp server authenticating
and running a simple sftp remote pwd command.

The verification is done using OpenSSH's or SunSSH's sftp client tool with
a configuration file with the same options as the test harness socks server
with the exception that dynamic forwarding is not used for sftp.
2008-02-08 13:54:02 +00:00
Dan Fandrich
ce1649564c Added tests 1022 and 1023 to validate output of curl-config --version and
--vernum
2008-02-08 01:21:03 +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
03bbf4de48 When possible, use additional config options for test harness ssh server,
which are deprecated in recent OpenSSH versions but are current for SunSSH.
2008-01-31 16:37:16 +00:00
Daniel Stenberg
a62e155ca4 - Niklas Angebrand made the cookie support in libcurl properly deal with the
"HttpOnly" feature introduced by Microsoft and apparently also supported by
  Firefox: http://msdn2.microsoft.com/en-us/library/ms533046.aspx . HttpOnly
  is now supported when received from servers in HTTP headers, when written to
  cookie jars and when read from existing cookie jars.
2008-01-31 12:21:57 +00:00
Daniel Stenberg
7b9435890d add verbose output to test 509 for easier debugging 2008-01-29 23:10:25 +00:00
Daniel Stenberg
ceb5a8ca7b - Michal Marek fixed minor mistake in test case 553 that prevented it from
working on other IP-addresses or port numbers.
2008-01-29 12:31:11 +00:00
Yang Tse
8fca5c2e69 Dont rely on PAMAuthenticationViaKbdInt default being 'no' 2008-01-27 02:35:20 +00:00
Daniel Stenberg
5f2055729e added test 1021 to verify my fix for bug report #1879375 2008-01-26 00:13: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
3caeb0a91f undo using internal *printf() clones for test #530 2008-01-21 05:35:08 +00:00
Yang Tse
a4eddf0d0d use internal *printf() clones since snprintf() not available on all platforms 2008-01-20 22:53:56 +00:00
Yang Tse
e9490fdbd9 Also disable GSSAPIAuthentication for the test harness ssh client 2008-01-20 04:05:25 +00:00
Daniel Stenberg
daadcfd1de Dmitry Kurochkin fixed test case 530 (pipelining) 2008-01-19 10:14:45 +00:00
Yang Tse
01d95b56a0 fix failure to properly detect SSH and SOCKS servers start up on loaded systems 2008-01-18 09:18:59 +00:00
Yang Tse
0530b0a5ca Don't abort tests 518 and 537 when unable to raise the open-file soft limit 2008-01-17 18:57:50 +00:00
Dan Fandrich
bcfc7d90d1 Put the comments in an XML-valid location. 2008-01-17 04:10:28 +00:00
Daniel Stenberg
c522f349fe Added test 553. This test case and code is based on the bug recipe Joe Malicki
provided for bug report #1871269, fixed on Jan 14 2008 before the 7.18.0
release.
2008-01-16 22:54:54 +00:00
Daniel Stenberg
6893fcaa9b remove trailing comma too, even though I don't think it does any harm 2008-01-16 22:09:51 +00:00
Daniel Stenberg
301ae1ae1b Nathan Coulter's patch that makes runtests.pl respect the PATH when figuring
out what valgrind to run.
2008-01-16 22:08:37 +00:00
Daniel Stenberg
b3de497d83 Dmitry Kurochkin worked a lot on improving the HTTP Pipelining support that
previously had a number of flaws, perhaps most notably when an application
fired up N transfers at once as then they wouldn't pipeline at all that
nicely as anyone would think... Test case 530 was also updated to take the
improved functionality into account.
2008-01-16 12:24:00 +00:00
Yang Tse
69f685056d startnew() shouldn't return a positive pid as reported in the pidfile
by the spawned server itself unless it is actually alive
2008-01-14 19:28:54 +00:00
Yang Tse
502da27d65 add client features part 2008-01-13 03:27:14 +00:00
Yang Tse
5004529685 Remove hardcoded verbosity 2008-01-12 04:32:03 +00:00
Yang Tse
2b63eb8511 Ooops 2008-01-12 00:12:16 +00:00
Yang Tse
f09fe4b49f Ooops 2008-01-11 21:59:05 +00:00
Yang Tse
35be09cf58 When verifying that test harness's SSH and SOCKS servers have been
started check also that the process is actually alive, since they
could have died once the pidfile was written out
2008-01-11 20:17:33 +00:00
Daniel Stenberg
08adf67969 Daniel Egger made CURLOPT_RANGE work on file:// URLs the very same way it
already worked for FTP:// URLs
2008-01-11 14:20:41 +00:00
Yang Tse
14ff7e75e0 Temporary change to help debugging SSH server verification failures 2008-01-10 16:19:14 +00:00
Yang Tse
c249a8aa1b Fix file Id 2008-01-09 01:11:59 +00:00
Yang Tse
fc794ae012 Add /usr/freeware/sbin and /usr/freeware/libexec to the ssh binaries
locations search list.
2008-01-09 00:58:48 +00:00
Yang Tse
32cc75d6cb Partially cleanup debugging messages in test harness, introduced for
new minimum SSH version support for SCP, SFTP and SOCKS tests.

Some verbosity which still remains, will go out before next release.
2008-01-08 20:12:43 +00:00
Yang Tse
1c0a19ad53 Remove increased loglevel intended to debug autobuild's publickey
authentication failures when using OpenSSH 2.9.9 or SunSSH.

Verified fact: Even when only using publickey authentication,
OpenSSH and SunSSH first validate the user, this implies that
if the user validation fails, 'invalid user', the publickey
authentication will not be allowed to complete.
2008-01-08 19:18:25 +00:00
Yang Tse
34d02d1969 Increase loglevel to debug autobuild's publickey authentication
failures when using OpenSSH 2.9.9 or SunSSH
2008-01-08 00:40:02 +00:00
Yang Tse
2408b236ca Display ssh server log and configuration upon socks server failure 2008-01-08 00:39:31 +00:00
Dan Fandrich
4acd437952 Fixed test description 2008-01-07 19:54:40 +00:00
Yang Tse
9c6533d287 Increase MaxAuthTries from 0 to 10. Using a value of 0 is too restrictive 2008-01-06 02:02:55 +00:00
Daniel Stenberg
3df484088f added keyword 2008-01-05 12:15:41 +00:00
Dan Fandrich
fcb2595ed6 "yes" must be in quotes to be XML compatible 2008-01-04 23:57:39 +00:00
Daniel Stenberg
fe0d7aee49 Daniel Egger provided 'nonewline=yes' support for the <stdout> section 2008-01-04 23:31:04 +00:00
Yang Tse
a4945fe687 Missing newline at end of message 2008-01-04 19:56:56 +00:00
Yang Tse
88d89b2177 Fix 'format string' compiler warning 2008-01-04 15:39:06 +00:00
Yang Tse
61a2d5ea75 'ControlPath' ssh client configuration file option requires OpenSSH 4.2 or
later to accept 'none' as an indication to disable connection multiplexing
2008-01-04 14:12:10 +00:00
Yang Tse
c479c64333 SunSSH 1.1 ssh client does not support config file options:
ConnectTimeout
 ForwardX11Trusted
 HashKnownHosts
 RekeyLimit
 ServerAliveCountMax
 ServerAliveInterval
2008-01-04 13:24:17 +00:00
Yang Tse
7a2177dc42 - Display curl_ssh_config when socks server fails to start.
- Capability of running socks5 tests must be based on ssh daemon version
  and not on ssh client version.
2008-01-04 13:00:40 +00:00
Yang Tse
bf6e2f28ba Make sure @INC is modified before 'using' the sshhelp module. 2008-01-04 03:05:33 +00:00
Yang Tse
f5da1e5484 'LocalCommand' no longer used for ssh client config file. When used it
requires a non blank argument.
2008-01-04 03:04:30 +00:00
Yang Tse
fd8d862c37 Modify test harness so that the minimum SSH version required to run
SCP, SFTP and SOCKS4 tests is now OpenSSH 2.9.9 or SunSSH 1.0

For SOCKS5 tests minimum versions are OpenSSH 3.7 or SunSSH 1.0
2008-01-03 20:48:22 +00:00
Daniel Stenberg
f277124a0f In an attempt to repeat the problem in bug report #1850730
(http://curl.haxx.se/bug/view.cgi?id=1850730) I wrote up test case 552. The
test is doing a 70K POST with a read callback and an ioctl callback over a
proxy requiring Digest auth. The test case code is more or less identical to
the test recipe code provided by Spacen Jasset (who submitted the bug report).
2007-12-26 21:48:52 +00:00
Dan Fandrich
9cd30c2012 Use getcwd() to get the directory, which works even if one of the directory
components doesn't have read permission set.
2007-12-22 18:25:43 +00:00
Dan Fandrich
d639ed1aaf Use getcwd() to get the directory, which works even if one of the
directory components doesn't have read permission set.
2007-12-20 21:21:43 +00:00
Daniel Stenberg
82c9379b6c spell! 2007-12-15 22:19:08 +00:00
Daniel Stenberg
c1730dc50a Add test 551 that tests callback-post over a proxy that requires Digest auth.
A failed attempt to repeat bug report #1850730 (ie the test works fine).
2007-12-15 22:13:07 +00:00
Dan Fandrich
26115aac5d Added missing <features> 2007-12-14 01:09:45 +00:00
Dan Fandrich
ca6b27aed2 Fixed typo in test title 2007-12-14 01:05:30 +00:00
Daniel Stenberg
963ef5414c add keywords 2007-12-08 22:56:17 +00:00
Daniel Stenberg
975812d246 add missing files 2007-12-08 22:56:05 +00:00
Daniel Stenberg
089668ec73 correct the comment about size 2007-12-08 22:53:49 +00:00
Daniel Stenberg
cc0ce38acc add test 549 and 550 2007-12-08 22:53:28 +00:00
Daniel Stenberg
7d3ea12b62 Spacen Jasset reported a problem with doing POST (with data read with a
callback) over a proxy when NTLM is used as auth with the proxy. The bug
also concerned Digest and was limited to using callback only. Spacen worked
with us to provide a useful patch. I added the test case 547 and 548 to
verify two variations of POST over proxy with NTLM.
2007-12-05 21:20:14 +00:00
Daniel Stenberg
59dc9085d1 fix compiler warning 2007-12-05 11:10:24 +00:00
Daniel Stenberg
4e4f33a297 added test548 which uses the lib547 source file, preparing for test547 which
is supposed to repeat the bug report "NTLM proxy authentication with
CURLOPT_READDATA seems broken." posted on the curl-library mailing list on dec
3 2007.
2007-12-05 11:08:56 +00:00
Daniel Stenberg
1f058f1014 removed the ;type= thing for FTP urls through proxy, since that's now only
present when enabled by on option which isn't done by default (and isn't even
available for the curl app atm)
2007-12-03 09:50:32 +00:00
Yang Tse
cf806748ec To allow remote log inspection avoid redirecting messages to stderr.
Cleanup some debugging messages. Unlink log file on exit.
2007-11-28 01:46:28 +00:00
Yang Tse
0c367fef94 ConnectTimeout requires OpenSSH 3.7 or later 2007-11-27 20:57:22 +00:00
Yang Tse
a418d290f1 Explicitly disallow remote hosts to connect to local forwarded ports,
the socks server port in the test suite. This is the default setting
unless a tinkered built ssh is being used.
2007-11-27 00:52:30 +00:00
Yang Tse
08cb30801c Stop ssh and socks servers when verification fails 2007-11-26 14:26:40 +00:00
Yang Tse
788de4f7ba Providing an explicit bind address besides the port for dynamic application-level
port forwarding, our socks port, prevents ssh from running on some systems.

By default, ssh binds local port forwardings to the loopback address, since this
was the address being given as the explicit bind address, now it isn't given.
2007-11-26 14:07:09 +00:00
Daniel Stenberg
05221e9056 test1015 --data-urlencode 2007-11-26 11:04:21 +00:00
Yang Tse
d59841618d Temporary change to better debug startup failures
of test suite ssh and socks servers.
2007-11-26 02:45:24 +00:00
Yang Tse
8d3964782a Allow different start timeout specification for each server 2007-11-25 03:55:53 +00:00
Yang Tse
5b809a3104 make 'checkdied' in runtests.pl more robust 2007-11-23 12:18:45 +00:00
Yang Tse
3daa54d636 Revert last change since it breaks running the test suite
when builddir is different from srcdir.
2007-11-23 09:50:44 +00:00
Yang Tse
8f1829d1d2 Improve chance of running runtests.pl from outside the
source tree 'tests' directory
2007-11-23 04:03:46 +00:00
Yang Tse
6efb6addf2 Debugging messages to trace startnew failures 2007-11-22 19:56:38 +00:00
Yang Tse
61e2e86aef Temporary change adding additional debugging messages to better pinpoint
startup failures of test suite ssh and socks servers.
2007-11-21 19:33:09 +00:00
Yang Tse
9b86eecb94 Fix trying to return outside of a subroutine 2007-11-21 17:50:30 +00:00
Yang Tse
6dfb5b4e1f Don't gather additional debug info unless sshd actually fails 2007-11-20 16:47:56 +00:00
Yang Tse
258c4686b2 Improve detection of sshd un/supported options.
Gather additional debug info when the test suite ssh server fails to start.
2007-11-20 14:10:09 +00:00
Yang Tse
5376d1047c This is a temporary change to test if OpenSSH 3.6 and SunSSH 1.1
are good/compatible enough to run the test suite ssh server and
socks tests
2007-11-19 17:20:32 +00:00
Yang Tse
968e943eac Temporary change to help debugging string(s) returned by sshd -V
when sshd is not being identified as an OpenSSH daemon
2007-11-19 01:49:28 +00:00
Yang Tse
536f98a766 Add /opt/ssh/sbin and /opt/ssh/libexec to the sshd locations search list.
Improve wording of a couple of debug messages.
2007-11-18 01:16:44 +00:00
Yang Tse
c4e5613a7d When unable to start test suite sshserver, log if OpenSSH has not been
found or the OpenSSH version found
2007-11-17 17:43:33 +00:00
Yang Tse
2b15823dab Add /usr/local/sbin and /usr/freeware/bin to the sshd locations search list 2007-11-17 02:28:54 +00:00
Daniel Stenberg
59dcc7e191 Michal Marek made the test suite remember what test servers that fail to
start so that subsequent tries are simply skipped.
2007-11-16 23:06:53 +00:00
Daniel Stenberg
44d408204a Michal Marek fixed the test suite to better deal with the case when the HTTP
ipv6 server can't run.
2007-11-15 22:41:31 +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
Dan Fandrich
c8355c27e9 Sort the directory listing because the server doesn't always do it. 2007-11-05 20:54:35 +00:00
Dan Fandrich
c2d7e2ae17 Added some keywords 2007-11-05 20:53:15 +00:00
Dan Fandrich
2f3d520571 Ignore more features that curl-config is not expected to know about 2007-11-01 21:20:24 +00:00
Dan Fandrich
8be493296d Make postcheck failure message more like the others 2007-11-01 17:42:39 +00:00
Dan Fandrich
6f33531861 Added test case 1014 to compare curl-config --features with curl --version 2007-11-01 03:09:27 +00:00
Dan Fandrich
16897354bc Added test case 1013 to check that curl-config --protocols matches the
protocols listed in curl --version
2007-11-01 00:36:55 +00:00
Dan Fandrich
6790c559af Detect curl source when valgrind provides an absolute source file name 2007-10-31 18:32:06 +00:00
Dan Fandrich
38cd2d781f Added test case 546 to check that subsequent FTP transfers work after a
failed one using the multi interface
2007-10-29 22:57:31 +00:00
Dan Fandrich
15feb8217f Fixed the 2000-series tests so that the downloaded data is actually checked 2007-10-27 01:04:36 +00:00
Dan Fandrich
59dccb34b0 Made the magic testnumber > 10000 support actually work 2007-10-27 01:02:57 +00:00
Dan Fandrich
e8057241c6 Fixed the test case to create only a single test file, which is all the
test harness supports.
2007-10-26 20:19:49 +00:00
Dan Fandrich
3f55ed0ef7 Check that all servers in the <server> section are supported, not just
the first.
2007-10-26 19:26: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
Dan Fandrich
43885493ea Disable valgrind for this test to avoid the rlimit = soft rlimit problem
found by Michal Marek.
2007-10-25 21:49:45 +00:00
Dan Fandrich
1eac702c1a Added test case 2004.
Disable valgrind in test case 1004 due to a libtool bug.
2007-10-25 21:04:51 +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
b7dd186d36 When valgrind is disabled in the test file, don't run it at all (as opposed
to running it and ignoring its output).
2007-10-25 19:39:52 +00:00
Yang Tse
26c1c8b2ad Don't show valgrind log files of other tests 2007-10-25 18:07:13 +00:00
Daniel Stenberg
824aa5f918 Michal Marek fixed the test script to be able to use valgrind even when the
lib is built shared with libtool.
2007-10-25 14:30:51 +00:00
Daniel Stenberg
91e27ce755 Fixed a TFTP memory leak. Enabled test 2003 to verify this. 2007-10-25 07:47:38 +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
Daniel Stenberg
3e3eaaada7 enable 2000 and 2001 2007-10-24 21:27:25 +00:00
Dan Fandrich
38649d1362 Added test cases 2000 and 2001 which test multiple protocols using the
same easy handle
Fixed the filecheck: make target to work outside the source tree
2007-10-24 19:40:07 +00:00
Dan Fandrich
4f00a02ba3 Fixed the test FTP server to support the >10000 test number notation 2007-10-24 19:39:29 +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
8e7da9464a Read callback should return 0 when no more data left 2007-10-23 15:10:48 +00:00
Yang Tse
92433e596b We use this ZERO_NULL to avoid picky compiler warnings,
when assigning a NULL pointer to a function pointer var.
2007-10-17 16:58:32 +00:00
Dan Fandrich
2741f97a69 Fixed a couple of typos that messed up the tests. 2007-10-12 02:09:45 +00:00
Dan Fandrich
d7fbe07ee2 Added some <keywords> sections and use some key words more consistently. 2007-10-12 01:44:22 +00:00
Dan Fandrich
2fce1f3e97 Fixed the -l option of runtests.pl
Added support for skipping tests based on key words.
2007-10-11 21:15:09 +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
Daniel Stenberg
6dd6b4d1fa I enabled test 1009 and made the --local-port use a wide range to reduce the
risk of failures.
2007-10-04 21:26:26 +00:00
Daniel Stenberg
67d94514b0 Kim Rinnewitz reported that --local-port didn't work with TFTP transfers.
This happened because the tftp code always uncondionally did a bind()
without caring if one already had been done and then it failed. I wrote a
test case (1009) to verify this, but it is a bit error-prone since it will
have to pick a fixed local port number and since the tests are run on so
many different hosts in different situations I add it in disabled state.
2007-10-04 10:01:41 +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
Yang Tse
059707be32 Renamed a couple of global variables to avoid shadowing warnings 2007-10-02 16:05:28 +00:00
Daniel Stenberg
119364741e known bug #46: chunked-encoded CONNECT responses from a http proxy now works.
Added test case 1008 to verify. Note that #47 is still there.
2007-10-02 10:21:36 +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
Daniel Stenberg
9ca2644429 Added test536 that was accidentally missing. I also wrote up a new makefile
target called 'filecheck' so that if you run 'make filecheck' in this directory
it'll check if the local files are also mentioned in the Makefile.am so that
they are properly included in release archives!
2007-09-30 22:58:24 +00:00
Daniel Stenberg
ec08e2f9f2 Alex Fishman reported a curl_easy_escape() problem that was made the
function do wrong on all input bytes that are >= 0x80 (decimal 128) due to a
signed / unsigned mistake in the code. I fixed it and added test case 543 to
verify.
2007-09-30 22:40:24 +00:00
Yang Tse
b108c664ac Fix missing right parenthesis 2007-09-30 01:27:39 +00:00
Yang Tse
64db60397b Fix comparison between signed and unsigned 2007-09-30 01:01:43 +00:00
Dan Fandrich
9fc8800b6d Removed cut-and-paste cruft leading to fclose() of an unopened file 2007-09-27 17:22:10 +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
Daniel Stenberg
fd4cf78f36 Philip Langdale provided the new CURLOPT_POST301 option for
curl_easy_setopt() that alters how libcurl functions when following
redirects. It makes libcurl obey the RFC2616 when a 301 response is received
after a non-GET request is made. Default libcurl behaviour is to change
method to GET in the subsequent request (like it does for response code 302
- because that's what many/most browsers do), but with this CURLOPT_POST301
option enabled it will do what the spec says and do the next request using
the same method again. I.e keep POST after 301.

The curl tool got this option as --post301

Test case 1011 and 1012 were added to verify.
2007-09-26 12:44:59 +00:00
Daniel Stenberg
a6315359d7 Max Katsev reported that when doing a libcurl FTP request with
CURLOPT_NOBODY enabled but not CURLOPT_HEADER, libcurl wouldn't do TYPE
before it does SIZE which makes it less useful. I walked over the code and
made it do this properly, and added test case 542 to verify it.
2007-09-26 12:00:01 +00:00
Daniel Stenberg
775f86cb5a Immanuel Gregoire fixed KNOWN_BUGS #44: --ftp-method nocwd did not handle
URLs ending with a slash properly (it should list the contents of that
directory). Test case 351 brought back and also test 1010 was added.
2007-09-24 21:47:35 +00:00
Dan Fandrich
4686adb433 Added variable substitution to the <verify><file> section.
Made a few more tests work remotely.
2007-09-20 20:39:17 +00:00
Dan Fandrich
0159636373 Use double quotes in command lines for consistency. 2007-09-18 20:41:20 +00:00
Dan Fandrich
4f067b1d1c IPv6 is a required feature for these two tests, even if it's not obvious. 2007-09-18 17:41:04 +00:00
Dan Fandrich
ae60745e3e Fixed the required server entry 2007-09-17 23:23:13 +00:00
Dan Fandrich
7f496d8c3f Changed some FTP tests to validate the format of the PORT and EPRT commands
sent by curl, if not the addresses themselves.
2007-09-17 21:44:57 +00:00
Dan Fandrich
048c74f2fa Added %CLIENTIP and %CLIENT6IP data file substitution variables.
Added hooks to the test suite to make it possible to test a curl running
on a remote host.
2007-09-17 21:42:01 +00:00
Dan Fandrich
0ed57d370d Allow setting the IP address on which to listen for connections. 2007-09-17 21:39:34 +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
26f8de459a Made the directory postprocessor more forgiving of input directory format 2007-09-17 17:22:46 +00:00
Daniel Stenberg
e04151ed76 Michal Marek made libcurl automatically append ";type=<a|i>" when using HTTP
proxies for FTP urls.
2007-09-15 21:14:12 +00:00
Dan Fandrich
05e4a3026d Replaced 127.0.0.1 with %HOSTIP where possible 2007-09-14 19:32:31 +00:00
Daniel Stenberg
9e241864e3 Extracting the CURLINFO_PRIVATE pointer makes no point since nothing set
it. This caused a segfault in some fprintf() implementations. Like on Solaris.
2007-09-12 10:46:14 +00:00
Daniel Stenberg
9e88343a17 Daniel S (12 September 2007)
- Bug report #1792649 (http://curl.haxx.se/bug/view.cgi?id=1792649) pointed
  out a problem with doing an empty upload over FTP on a re-used connection.
  I added test case 541 to reproduce it and to verify the fix.

- I noticed while writing test 541 that the FTP code wrongly did a CWD on the
  second transfer as it didn't store and remember the "" path from the
  previous transfer so it would instead CWD to the entry path as stored. This
  worked, but did a superfluous command. Thus, test case 541 now also verifies
  this fix.
2007-09-11 22:23:57 +00:00
Dan Fandrich
d030dfa6e2 Added test case 1007 to test permission problem when uploading with TFTP
(to validate bug #1790403).
2007-09-07 20:05:20 +00:00
Dan Fandrich
6fd1cfeab1 Minor updates 2007-09-05 17:17:59 +00:00
Dan Fandrich
f6251734fc Added more accurate error code returns from SFTP operations. Added test
case 615 to test an SFTP upload failure.
2007-08-30 23:03:59 +00:00
Dan Fandrich
9f44a95522 Renamed several libcurl error codes and options to make them more general
and allow reuse by multiple protocols. Several unused error codes were
removed.  In all cases, macros were added to preserve source (and binary)
compatibility with the old names.  These macros are subject to removal at
a future date, but probably not before 2009.  An application can be
tested to see if it is using any obsolete code by compiling it with the
CURL_NO_OLDIES macro defined.

Documented some newer error codes in libcurl-error(3)
2007-08-30 20:34:57 +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
Dan Fandrich
5cb2ee878c Mention that 'make test' does more than just run all the tests (suggested
by Kris/tinker105 in bug #1779054) and mention the torture tests.
2007-08-28 18:23:19 +00:00
Daniel Stenberg
7cba40b218 Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointed
out that libcurl didn't deal with large responses from server commands, when
the single response was consisting of multiple lines but of a total size of
16KB or more. Dan Fandrich improved the ftp test script and provided test
case 1006 to repeat the problem, and I fixed the code to make sure this new
test case runs fine.
2007-08-24 14:00:42 +00:00
Dan Fandrich
975fafdc49 Added test case 1005 to test excessively-long replies spread out over
multiple lines (similar to test case 1003).
2007-08-23 23:25:47 +00:00
Dan Fandrich
9537580ba2 Allow ftp server alternate replies to contain backslash-escaped control
characters.
2007-08-23 23:24:39 +00:00
Dan Fandrich
7ffae92daf Need even more time to wait for an accept. 2007-08-23 18:45:28 +00:00
Dan Fandrich
abca03cf36 Added test1004 to validate a previous fix for a memory leak when an
empty proxy server is selected.
2007-08-23 17:35:00 +00:00
Daniel Stenberg
381e372939 Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointed
out that libcurl didn't deal with very long (>16K) FTP server response lines
properly. Starting now, libcurl will chop them off (thus the client app will
not get the full line) but survive and deal with them fine otherwise. Test
case 1003 was added to verify this.
2007-08-22 14:18:06 +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
Dan Fandrich
1a8d8aa227 Increase timeout for accept for improved reliability on loaded servers. 2007-08-20 17:53:38 +00:00
Daniel Stenberg
014fe6971e remove stupid comment since there's no content in this test case 2007-08-17 22:24:51 +00:00
Daniel Stenberg
3217809294 Robson Braga Araujo filed bug report #1776235
(http://curl.haxx.se/bug/view.cgi?id=1776235) about ftp requests with NOBODY
on a directory would do a "SIZE (null)" request. This is now fixed and test
case 1000 was added to verify.
2007-08-17 22:22:43 +00:00
Daniel Stenberg
dcf698dc74 some keywords for future stats/coverage checks 2007-08-17 22:17:23 +00:00
Daniel Stenberg
54117be639 Moved the 5320 and 5322 into the 1000-series instead which is a documented
range. They are about FTP but the 100-199 range is full.
2007-08-17 22:11:25 +00:00
Daniel Stenberg
5a79532aee Song Ma provided a patch that cures a problem libcurl has when doing resume
HTTP PUT using Digest authentication. Test case 5320 and 5322 were also
added to verify the functionality.
2007-08-17 20:21:32 +00:00
Dan Fandrich
652e2cf57c Removed redundant dependency lines 2007-08-13 18:11:37 +00:00
Dan Fandrich
c7a66d5af4 There's no need to ignore the User-Agent for this test. 2007-08-09 03:28:16 +00:00
Dan Fandrich
2e60ca382d Fixed some icc compiler warnings. 2007-08-07 00:10:27 +00:00
Daniel Stenberg
6f750f3b57 Dmitriy Sergeyev reported a regression: resumed file:// transfers broke
after 7.16.2. This is much due to the different treatment file:// gets
internally, but now I added test 231 to make it less likely to happen again
without us noticing!
2007-08-02 14:09:08 +00:00
Dan Fandrich
5ecd56d964 Implemented only the parts of Patrick Monnerat's OS/400 patch that renamed
some few internal identifiers to avoid conflicts, which could be useful on
other platforms.
2007-07-23 18:51:22 +00:00
Dan Fandrich
cc44fb1dc8 Log the "<CMD> wasn't handled" error normally since it is now expected
to occur in a couple of tests.
2007-07-23 17:51:43 +00:00
Daniel Stenberg
4bbcc47f3f Added test case 354 that makes a simple FTP retrieval without password, which
verifies the bug fix in #1757328.
2007-07-22 10:08:59 +00:00
Daniel Stenberg
8ab495a088 test and verify curl -I on a single FTP file somewhat more than before 2007-07-21 21:49:23 +00:00
Daniel Stenberg
84e7bb85b1 To allow more flexibility in FTP test cases, I've removed the enforced states
from the test server code as they served no real purpose. The test server is
here to serve for the test cases, not to attempt to function as a real server!
2007-07-21 21:48:58 +00:00
Dan Fandrich
c7db74fe73 Revert the 512 change since newer versions of OpenSSH don't support DSA
keys that small.
2007-07-19 01:42:22 +00:00
Dan Fandrich
89d119646d Use 512 bit keys to reduce the time taken to generate them. This shouldn't
really reduce security since in the common case of a daily automated build
the keys are only used for a single test run lasting a few minutes before
being deleted.
2007-07-18 00:27:13 +00:00
Dan Fandrich
989dd9c34a Fixed test cases 613 and 614 by improving the log postprocessor to handle
a new directory listing format that newer libssh2's can provide.  This
is probably NOT sufficient to handle all directory listing formats that
server's can provide and should be revisited.
2007-07-17 21:53:38 +00:00
Daniel Stenberg
98b9349be7 make it do all three requests on the same connection 2007-07-16 21:44:46 +00:00
Daniel Stenberg
1da3d402f6 convert test case 540 to use a custom Host: header as well 2007-07-15 21:00:26 +00:00
Daniel Stenberg
1da3192d2d let's just export the whole argc + argv pair globally so that each test tool
can take advantage of it however they see fit!
2007-07-15 20:59:43 +00:00
Daniel Stenberg
15c8219340 Added test case 540 and lib540.c, the 'proxyauth.c' test app posted by Shmulik
Regev on the libcurl mailing list on 10 Jul 2007, converted to a test case.
2007-07-14 22:39:22 +00:00
Daniel Stenberg
5ae21ebde9 add support for arg3 as the third argument... 2007-07-14 22:38:18 +00:00
Daniel Stenberg
c7e0d8c30b add some better logging when HTTP server start fails, and make the failure
really hard if the test server can't be resolved (like for ::1 ipv6)
2007-07-14 22:33:46 +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
Dan Fandrich
814b471d55 Added a code coverage section using gcc and gcov. 2007-07-10 22:55:51 +00:00
Dan Fandrich
19631f5d5f Force the time zone to GMT in the cookie tests in case the user is
using one of the so-called 'right' time zones that take into account
leap seconds, which causes the tests to fail (as reported by
Daniel Black in bug report #1745964).
2007-07-10 22:27:16 +00:00
James Housley
a8d6b40736 The previous commits changed the error code 2007-07-10 22:26:59 +00:00
Dan Fandrich
93bd512357 Fixed a curl memory leak reported by Song Ma with a modified version
of the patch he suggested.  Added his test case as test289 to verify.
2007-07-10 22:23:16 +00:00
Dan Fandrich
598bc3968e Add -a when running torture tests now that it's supported. 2007-07-05 01:38:00 +00:00
Gunter Knauf
c8a47bf662 revert previous patch since it turned out that older cp dont know this switch, argh! 2007-06-28 22:31:18 +00:00
James Housley
aed0cc6f2a Using fdopen() is a more correct way to implement the CURLOPT_NEW_FILE_PREMS
file.c, but the debug interface was missing.  This adds the routines needed
to make the memory debuging work for fdopen().
2007-06-28 11:11:29 +00:00
Gunter Knauf
5df5a2aa54 fixed nasty cp warnings about not beeing able to preserve ownership. 2007-06-28 01:20:30 +00:00
Daniel Stenberg
974fa1242a Adjusted how libcurl treats HTTP 1.1 responses without content-lenth or
chunked encoding (that also lacks "Connection: close"). It now simply
assumes that the connection WILL be closed to signal the end, as that is how
RFC2616 section 4.4 point #5 says we should behave.
2007-06-25 13:58:14 +00:00
Daniel Stenberg
a1b650ad7b Gerrit Bruchhuser pointed out a warning that the Intel(R) Thread Checker
tool reports and it was indeed a legitimate one and it is one fixed. It was
a use of a share without doing the proper locking first.
2007-06-21 14:23:38 +00:00
Daniel Stenberg
fc3c5dae87 and fix another flaw in the singlecwd case when we get ftp://site.com/, also
from the #1739100 bug report
2007-06-19 12:33:28 +00:00
Daniel Stenberg
cc26cc5dcd Test listing of root dir with the three ftp-methods. KNOWN_BUGS #44 make me
disable test 351 by default by I add the test case anyway to make it easier
to work on this problem in the future.
2007-06-18 21:04:05 +00:00
Daniel Stenberg
b0aa11fde7 Tom Regner added /usr/lib/misc to the path to scan for sftp to make the
sftp tests run fine on gentoo
2007-06-14 21:16:08 +00:00
Dan Fandrich
c45d44fee9 Wait longer for servers to start up since the ssh server needs to generate
keys the first time (which can take a while on a slow or loaded host).
Enforce a longer startup wait time for the ssh client SOCKS server, too.
Check for an error code from startnew() when starting any server.
2007-06-11 17:53:10 +00:00
Dan Fandrich
1e718a515a We do not use RSA keys in the test suite. 2007-06-11 17:49:25 +00:00
Dan Fandrich
477e27f99d Fixed the test harness so that it actually kills the ssh being used as
the SOCKS server.
2007-06-08 18:56:05 +00:00
Dan Fandrich
6a84d492f1 Improved compatibility with perl 5.0 on the 'open' calls. 2007-06-08 17:32:24 +00:00
Dan Fandrich
873d95a34c Incorporated Daniel Black's test706 and test707 SOCKS test cases. 2007-06-08 17:21:40 +00:00
Dan Fandrich
1500e95839 Improved compatibility with perl 5.0 on the 'open' calls. 2007-06-08 17:03:50 +00:00
Dan Fandrich
ad80490711 Changed the opens to work on older versions of perl.
Redirect ssh output to ssh.log
2007-06-07 22:42:26 +00:00
Dan Fandrich
073a6cea45 Renamed the sshd log file to sshd.log.
Added more options to the ssh config file to improve the consistency of
the test environment.
Force a rewrite of the ssh config files on every invocation.
Changed the opens to work on older versions of perl.
2007-06-07 21:42:33 +00:00
Dan Fandrich
345ffd1163 Cleaned up SOCKS tests. Use a magic port number instead of killserver
to do nonlistening server tests, like other tests.
2007-06-07 20:14:00 +00:00
Dan Fandrich
f0ffb35d55 Fixed some problems in starting SSH for use in SOCKS. 2007-06-07 19:49:09 +00:00
Daniel Stenberg
e86dfd9688 added 703: a socks5 version of 702 2007-06-05 13:52:34 +00:00
Daniel Stenberg
a466b31574 Daniel Black's test suite fixes and initial test cases for SOCKS4/5 using
openssh
2007-06-05 13:50:59 +00:00
Yang Tse
9583b51d80 In case of test failure, try not to show log files of other tests 2007-05-30 17:15:05 +00:00
Dan Fandrich
09fd3b4935 Match file times occurring in the morning. 2007-05-16 17:45:53 +00:00
Dan Fandrich
ea43bb013b Added support for quote commands before a transfer using SFTP and test
case 614.
Allow SFTP quote commands chmod, chown, chgrp to set a value of 0.
2007-05-15 00:28:50 +00:00
Dan Fandrich
b0a4c992e7 Added SFTP directory listing test case 613. 2007-05-14 22:03:42 +00:00
Dan Fandrich
85707460e5 Added FTPS upload tests 408 and 409. 2007-05-10 20:03:20 +00:00
Dan Fandrich
ed998270aa Added FTPS test cases 406 and 407 2007-05-08 22:14:30 +00:00
Dan Fandrich
6c8e6549d0 Check the return code from curl_multi_add_handle() 2007-05-02 06:02:13 +00:00
Dan Fandrich
5187faeeb9 Improved the test harness to allow running test servers on other than
the default port numbers, allowing more than one test suite to run
simultaneously on the same host.
2007-04-30 20:15:33 +00:00
Dan Fandrich
1228ec9fbb Fixed some tests to stop hard-coding the port number. 2007-04-30 19:05:48 +00:00
Dan Fandrich
f213d0db98 Added support in runtests.pl for "!n" test numbers to disable individual tests. 2007-04-25 23:18:52 +00:00
Dan Fandrich
9bdb05b4d6 When displaying log files, truncate the really longs ones such as you
would get from a torture test.
2007-04-25 20:09:32 +00:00
Dan Fandrich
61d7e720a5 Treat log files and -k the same when running torture tests as when not. 2007-04-24 23:28:57 +00:00
Dan Fandrich
17507eac85 Clear out FTP server options before each new client.
Wait for child processes to die to avoid creating zombies.
2007-04-24 21:30:39 +00:00
Dan Fandrich
6a35841b2e Added tests 610-612 to test more SFTP post-quote commands. 2007-04-23 23:00:38 +00:00
Dan Fandrich
28dde78dde Added <postcheck> support to the test harness. 2007-04-23 22:58:45 +00:00
Dan Fandrich
37171809f6 Mention NSS, <postcmd> commands 2007-04-23 21:18:30 +00:00
Dan Fandrich
3398eca7c3 Changed another nonexistent host name to be under the haxx.se domain
to guarantee against it ever being valid.
2007-04-23 01:51:02 +00:00
Dan Fandrich
043070f90e Changed an error message slightly so it can be caught easier by the
autobuild logs scanner.
2007-04-20 17:16:32 +00:00
Dan Fandrich
ae3d5949b8 Various test file cleanups, including using <servercmd> instead of writing
directly to ftpserver.cmd and removing unneeded empty sections.
2007-04-18 20:22:01 +00:00
Dan Fandrich
66fc5498d2 Added test cases 296, 297 and 298 to test --ftp-method handling 2007-04-18 06:30:28 +00:00
Daniel Stenberg
e3dab1bea2 jayjwa added the "DH PARAMETERS" to make this work with recent stunnels 2007-04-14 20:29:09 +00:00
Dan Fandrich
71a0d50f48 Added test cases 294 and 295 to test --ftp-account handling 2007-04-13 20:59:15 +00:00
Yang Tse
8d2a0fe85b Fix test case 534 which started to fail 2007-04-13 due to the existance
of a new host on the net with the same silly domain the test was using
for a host which was supposed not to exist.
2007-04-13 11:35:19 +00:00
Dan Fandrich
35935d71d2 Honour the -a option when -t is enabled. 2007-04-10 00:37:56 +00:00
Dan Fandrich
de17f4436e Changed error return codes to match update code. 2007-04-09 18:24:56 +00:00
Yang Tse
248a5381d4 In case of test failure, try not to show log files of other tests 2007-04-06 04:24:13 +00:00
Dan Fandrich
c1ab3e2d59 Enabled the ssh tests 600-609. 2007-04-05 19:28:33 +00:00
Yang Tse
a0a79ce853 unify fopen() failure error message among tests, allowing
the testsuite to count them as errors of the same kind
2007-04-05 11:05:36 +00:00
Yang Tse
70f9a13ecb Further improve displaying of individual logfiles 2007-04-05 00:14:27 +00:00
Yang Tse
5625e5d5b8 add debug message and expand comment 2007-04-04 08:58:36 +00:00
Yang Tse
8a529bd987 test can be allowed to run if fopen() is capable of fopen()ing
three additional files once that we have already open()ed the
big bunch of file descriptors.
2007-04-04 06:39:03 +00:00
Yang Tse
a1f72943e9 cleanup 2007-04-04 05:04:47 +00:00
Dan Fandrich
0969a96732 Whoops--didn't mean to enable the ssh tests quite yet. 2007-04-04 04:57:40 +00:00
Yang Tse
ec8019b2a8 test can be allowed to run if fopen() is capable of fopen()ing
SAFETY_MARGIN additional files once that we have already open()ed
the big bunch of file descriptors.
2007-04-04 03:19:59 +00:00
Dan Fandrich
27d2d78059 Added more SSH tests (left disabled for now). 2007-04-04 00:48:37 +00:00
Yang Tse
584f3639e3 update copyright year 2007-04-03 18:25:18 +00:00
Yang Tse
2886ce96b0 Verify if the test is limited by an ancient stdio with a 256
open file limit.  In this case the test is skipped with a
message showing this limitation when the number of open files
needed for the test is greater than 256.
2007-04-03 18:02:02 +00:00
Yang Tse
3344142b87 fix enumeration of disabled tests when they have the highest number 2007-04-03 15:59:52 +00:00
Yang Tse
70550a0572 Improve displaying of logfiles making sure all lines end with \n
and avoid using ! as last char of line.
2007-04-03 12:27:03 +00:00
Yang Tse
7bbad0b534 try not to link with unneeded libs, avoiding global LDADD 2007-04-03 02:57:54 +00:00
Yang Tse
161be66c89 when detecting un/supported sshd options use curl's sshd config file. 2007-04-03 02:36:55 +00:00
Dan Fandrich
4095c9de37 Eliminate the sshd option checking dependency on wc and make it faster. 2007-04-03 00:06:39 +00:00
Yang Tse
b8c12fe658 fix error in previous commit 2007-04-02 04:14:59 +00:00
Yang Tse
bdbaedc452 verify ssh daemon version 2007-04-02 01:21:57 +00:00
Gunter Knauf
0839621f47 print update message only if we really update CVS. 2007-04-01 13:59:50 +00:00
Dan Fandrich
ef10eaeb29 Added scp and sftp nonexistent file retrieval tests, but leave them
disabled for now.
2007-04-01 06:28:12 +00:00
Dan Fandrich
f8d78d57a7 Disable the SSH tests until the libssh2 bugs that causes test hangs
are sorted out.
2007-03-31 20:00:40 +00:00
Yang Tse
fdc1b61507 sshd might fail to start if given an unsupported configuration option.
Try to avoid this problem checking for some possible unsupported options,
and avoid using them in the configuration file.
2007-03-31 03:21:08 +00:00
Dan Fandrich
7fd154f094 Fixed some typos in the comments. 2007-03-30 22:07:48 +00:00
Dan Fandrich
a209c32bf3 Resurrected old FTPS error tests 402 and 403 as 404 and 405. 2007-03-30 22:04:14 +00:00
Dan Fandrich
40981286ea Added HTTP --max-filesize tests and FTPS CCC failure test. 2007-03-30 18:50:55 +00:00
Yang Tse
f55a1c3a6c Searching for sshd and sftp-server will be done first
in the PATH and afterwards in other common locations.
2007-03-30 10:11:49 +00:00
Yang Tse
c5586a65c2 ignore more generated files 2007-03-30 02:59:39 +00:00
Dan Fandrich
ffb11ad5c6 Don't tear down the ftp connection if the maximum filesize was exceeded
and added tests 290 and 291 to check.
2007-03-30 01:13:47 +00:00
Dan Fandrich
fbb1e49215 Added FTP-SSL failure test 402 2007-03-30 00:08:41 +00:00
Dan Fandrich
c26320d94f Added ftps upload test 401 2007-03-29 22:50:23 +00:00
Dan Fandrich
c563a53c16 Eliminated extra / in scp/sftp URLs. 2007-03-29 19:19:06 +00:00
Dan Fandrich
e37a49086e Add another option to tighten the test environment. 2007-03-29 18:46:09 +00:00
Dan Fandrich
f776c1d2eb Abort if attempting to run as root. 2007-03-29 05:25:11 +00:00
Dan Fandrich
31b1e988f4 Only show exit status in verbose mode. 2007-03-28 04:36:09 +00:00
Dan Fandrich
884171aecf Don't launch sshd as a daemon so its output can be logged. 2007-03-28 04:05:55 +00:00
Dan Fandrich
282127fbff Tighten up a few more OpenSSH options 2007-03-27 04:01:39 +00:00
Dan Fandrich
2166645ce4 Added SFTP and SCP upload tests in test602 & test603 2007-03-26 19:23:00 +00:00
Dan Fandrich
844f5b6b45 Added test600 and test601, SFTP and SCP file retrieval tests. 2007-03-26 18:04:05 +00:00
Gunter Knauf
424063235b catch up new lib extension when build with gcc/nlmconv. 2007-03-26 17:18:36 +00:00
Dan Fandrich
3b355421ec Added sshserver.pl 2007-03-24 06:29:58 +00:00
Dan Fandrich
0dd1219668 Fixed a memory leak when specifying a proxy with a file: URL and added
test case 288 to verify it.
2007-03-24 02:15:20 +00:00
Dan Fandrich
b7131009fb Changed the test harness to attempt to gracefully shut down servers
before resorting to the kill -9 hammer.

Added test harness infrastructure to support scp/sftp tests, using
OpenSSH as the server.
2007-03-24 01:01:28 +00:00
Daniel Stenberg
0c817b6614 language fix 2007-03-18 23:16:36 +00:00
Daniel Stenberg
ff314d7600 detect and show if built with yassl, but also set the "openssl" flag internally
since that is the API yassl attempts to provide
2007-03-18 22:37:23 +00:00
Daniel Stenberg
c1f3edbdd1 openssl/bio.h doesn't exist when we build with yassl so avoid trying 2007-03-16 22:44:46 +00:00
Dan Fandrich
a20a6f67c5 Fixed the test case to use a truly invalid urlglob range. 2007-03-16 04:34:53 +00:00
Dan Fandrich
ae07fd2ba8 libcurl supplies its own crypto hash functions when SSL is disabled, so
'crypto' tests aren't dependent on SSL.  Compiling with
--disable-crypto-auth will cause test failures, however.
2007-03-12 20:50:16 +00:00
Yang Tse
40087ce7c0 change max allowed time for this test to complete to 90 seconds 2007-03-10 00:19:05 +00:00
Dan Fandrich
e12d46ac50 Updated the test harness to add a new "crypto" feature check and updated the
appropriate test case to use it.  For now, this is treated the same as the
"SSL" feature because curl doesn't list it separately.
2007-03-09 23:39:42 +00:00
Dan Fandrich
1962ebf8e7 Updated the test harness to check for protocol support before running each
test, fixing KNOWN_BUGS #11.  Fixed some tests to more accurately specify
their required servers and features.
2007-03-09 21:01:39 +00:00
Dan Fandrich
7c144d5a7e Made a few cleanups. 2007-03-08 20:00:28 +00:00
Dan Fandrich
0f0540d00b Added SSL as a required feature for test case 400. 2007-03-08 19:50:32 +00:00
Dan Fandrich
1bfa7dfe39 Added test infrastructure to support basic FTPS tests. This currently
supports only ftps:// URLs with --ftp-ssl-control specified, which
implicitly encrypts the control channel but not the data channels.  That
allows stunnel to be used with an unmodified ftp server in exactly the
same way that the test https server is set up.
Added test case 400 as a basic FTPS test.
2007-03-08 02:38:49 +00:00
Yang Tse
e5f8e5e57a stricter newline policy 2007-03-03 05:16:57 +00:00
Yang Tse
53a3abc76b 30 seconds isn't long enough for this test on a loaded server. 2007-03-03 04:27:19 +00:00
Yang Tse
bfd6474f6b stricter newline policy 2007-03-03 02:06:44 +00:00
Yang Tse
cef5b14baa Reduce the posibility of leaving the sockfilter hanging around when
tearing down the test ftp server due to a read error condition.
2007-03-01 16:42:02 +00:00
Yang Tse
e817eb6cec log a 1120 chars long string to aid in quoted-printable and soft
line break detection in daily build logs.
2007-02-27 23:46:48 +00:00
Dan Fandrich
fe0afb211e 5 seconds isn't always enough time to start a server on a loaded system. 2007-02-22 18:35:57 +00:00
Yang Tse
141b3d0c2f remove redundant check in timestamp detection 2007-02-22 17:34:02 +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
Daniel Stenberg
f19d333ef6 - Ravi Pratap provided work on libcurl making pipelining more robust and
fixing some bugs:
  o Don't mix GET and POST requests in a pipeline
  o Fix the order in which requests are dispatched from the pipeline
  o Fixed several curl bugs with pipelining when the server is returning
    chunked encoding:
    * Added states to chunked parsing for final CRLF
    * Rewind buffer after parsing chunk with data remaining
    * Moved chunked header initializing to a spot just before receiving
      headers
2007-02-21 21:59:40 +00:00
Yang Tse
29bb6f65f1 Move header file inclusion logic and definition of timeval
struct for platforms that don't have it to setup_once.h
2007-02-20 12:12:27 +00:00
Yang Tse
37f07a54bd Several corrections & changes to what has been stated in revision 1.45
1) The maketgz script does not insert the timestamp in curlver.h,
   it actually updates it. For CVS versions it is the "CVS" string.

2) testcurl.pl will always print the "date" string which represents
   the moment the test build is run.

3) testcurl.pl may not print the "timestamp" string since the script
   may end before it is printed out. (i.e. unable to update from CVS)

4) The "timestamp" string printed will be the same as the "date" one
   unless one of the following conditions is met.

   *) It is a tarball-based build. Timestamp will be creation time.

   *) CVS update has been done. Timestamp will be end of CVS update.
2007-02-20 05:28:41 +00:00
Yang Tse
da8c666e4f add tutil_tvdiff_secs() for completeness 2007-02-20 01:09:38 +00:00
Yang Tse
78a1e5d1a6 fix typo 2007-02-19 19:46:07 +00:00
Yang Tse
116f60e063 Show libcurl's timestamp. This timestamp is only available in curlver.h
for tarball-based tests and builds, the maketgz script inserts it when
the tarball is created. For CVS-based tests and builds the timestamp we
show is the current UTC build time as it is the CVS version timestamp.

In this way, all builds will have a valid source code timestamp which
isn't related to the moment the tests and build is performed, with the
exception of CVS-based ones which have the same "date" and "timestamp"
2007-02-19 19:41:48 +00:00
Yang Tse
75fca27f8e log a message, stating the need of openssl to run this test 2007-02-19 04:51:47 +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
Yang Tse
789fd0b74a Replicate the configure tests that determined that timeval was available. 2007-02-17 11:43:52 +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
4dc453c087 add debug messages for fopen() failures 2007-02-16 19:17:05 +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
Daniel Stenberg
4efa0d9f68 ftp@example.com is now the new anonymous FTP password. I opted for 'ftp' on
the left side of @ to make it short(er).
2007-02-13 22:50:16 +00:00
Daniel Stenberg
7f70dbcad5 Rob Crittenden added support for NSS (Network Security Service) for the
SSL/TLS layer. http://www.mozilla.org/projects/security/pki/nss/
2007-02-12 22:32:37 +00:00
Yang Tse
8c9233f6b2 Include both testutil.c and testutil.h, and not just testutil.c, in the
list of source files for those tests that use it. Otherwise testutil.h
might not be found by the compiler.
2007-02-09 12:41:57 +00:00
Yang Tse
6fcf98f617 Some tests were using functions curlx_tvnow and curlx_tvdiff which are not
part of the official libcurl API http://curl.haxx.se/lxr/source/lib/README.curlx
The documented way of using them would be to use timeval.c as a source code file.

The above described method works very well when statically linking libcurl and
apps, test programs, but has several drawbacks when you build a true shared
libcurl (i.e. Name space clash at linkage stage as functions are defined more
than once. Windows makefiles are not capable of handling this system of
source-level sharing)

So...

Now testutil.h and testutil.c define and implement tutil_tvnow and tutil_tvdiff
which replace curlx_tvnow and curlx_tvdiff for the libtest programs. Doing this
we avoid the above described problems, and the code in the testsuite does not
impose the need to keep those functions public in libcurl even when not part of
the API.
2007-02-09 01:17:24 +00:00
Yang Tse
2f4fe0175b Some tests were using functions curlx_tvnow and curlx_tvdiff which are not
part of the official libcurl API http://curl.haxx.se/lxr/source/lib/README.curlx
The documented way of using them would be to use timeval.c as a source code file.

The above described method works very well when statically linking libcurl and
apps, test programs, but has several drawbacks when you build a true shared
libcurl (i.e. Name space clash at linkage stage as functions are defined more
than once. Windows makefiles are not capable of handling this system of
source-level sharing)

So...

Now testutil.h and testutil.c define and implement tutil_tvnow and tutil_tvdiff
which replace curlx_tvnow and curlx_tvdiff for the libtest programs. Doing this
we avoid the above described problems, and the code in the testsuite does not
impose the need to keep those functions public in libcurl even when not part of
the API.
2007-02-09 01:11:14 +00:00
Yang Tse
9b6474378a Year 2038 has its own problems (32 bit integer overflow).
So cookie expiration date is lowered to expire at most in 2035.
2007-02-05 02:38:25 +00:00
Gisle Vanem
a7748c2024 Constify argument to suburl(). Remove trailing space. 2007-02-04 12:12:02 +00:00
Yang Tse
c26ec47e90 compiler warning fix 2007-02-02 17:16:06 +00:00
Yang Tse
f71c8c7d84 fix leftover updating cookie expiration date 2007-02-02 11:49:15 +00:00
Yang Tse
68f3c2adca reported in bug: #1566077 the former URL mentioned in the generated cookie
jar has died and we now instead point out our own version of that
2007-02-02 02:12:34 +00:00
Yang Tse
2a8e2edf83 fix test case 62 which was failing due to cookies expiring 1 Feb 2007 2007-02-02 01:36:08 +00:00
Yang Tse
401598c2fe more fixes for the testsuite cookie expiration issue 2007-02-02 01:05:50 +00:00
Yang Tse
d60848d04b cookie expiration time got us with pants at our knees.
Next time in 2038 :-)
2007-02-02 00:10:40 +00:00
Yang Tse
c2639e0738 when using select() instead of poll, skip the test if the number of
open file descriptors is greater than FD_SETSIZE minus SAFETY_MARGIN,
also skip the test if any of the open file descriptors has a number
greater than FD_SETSIZE minus SAFETY_MARGIN.
2007-01-31 15:34:53 +00:00
Yang Tse
d7d5baa0e2 fix temp string buffer variable name 2007-01-30 13:21:39 +00:00
Yang Tse
bad67830b3 skip test on platforms on which we use select() instead
of poll() and select() happens to be bound by FD_SETSIZE
2007-01-30 03:48:29 +00:00
Daniel Stenberg
a4b39c6ab8 the same source file is re-used for multiple tests and I missed to add the
timval.c dependency on some of those
2007-01-29 20:37:02 +00:00
Gisle Vanem
d10e174fd1 Some compilers lacks <sys/time.h>. Include "timeval.h" to simplify the #ifdefs. 2007-01-29 20:24:00 +00:00
Daniel Stenberg
4d8dcf7b77 the libtest source codes that use curlx_tv* functions MUST use the
lib/timeval.c source code since those functions are not in the API (and might
not be accessible)
2007-01-29 10:09:06 +00:00
Daniel Stenberg
abdbd3100f - Michael Wallner reported that when doing a CONNECT with a custom User-Agent
header, you got _two_ User-Agent headers in the CONNECT request...! Added
  test case 287 to verify the fix.
2007-01-29 09:26:36 +00:00
Yang Tse
e09450103b Compiler warning fix 2007-01-28 03:51:10 +00:00
Yang Tse
b6f889085d update copyright year notice 2007-01-27 03:43:05 +00:00
Gunter Knauf
abb4cdafe9 set proper lib extension for non-configure mingw32 builds on Win32. 2007-01-25 14:06:38 +00:00
Dan Fandrich
44ac2776ae Fixed a dangling pointer problem that prevented the http_proxy environment
variable from being properly used in many cases (and caused test case 63
to fail).
2007-01-25 01:35:43 +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
6da70628c6 Make the test script tag parser a bit more robust.
Check for the .exe extension on mingw32 builds.
2007-01-18 20:32:46 +00:00
Dan Fandrich
3bae748256 Added precheck that curl supports the 'openssl' engine in test 307. 2007-01-18 18:04:20 +00:00
Dan Fandrich
521c4b303d Fixed some tag typos in the test data files. 2007-01-17 20:36:56 +00:00
Dan Fandrich
a2effd123a Disabled test 307 for now. 2007-01-17 19:23:32 +00:00
Dan Fandrich
32fe5b14ec Added simple OpenSSL crypto engine tests. 2007-01-16 18:34:58 +00:00
Dan Fandrich
f11d3c329c Added TFTP upload tests. 2007-01-15 21:06:12 +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
Dan Fandrich
5ec5b95f54 Added test for TFTP retrieve of boundary case 512 byte file. 2007-01-10 23:40:22 +00:00
Dan Fandrich
7efb955fd0 Added test of TFTP server error reporting. 2007-01-10 03:32:19 +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
Daniel Stenberg
88c8d72a21 Alexey Simak found out that when doing FTP with the multi interface and
something went wrong like it got a bad response code back from the server,
libcurl would leak memory. Added test case 538 to verify the fix.

I also noted that the connection would get cached in that case, which
doesn't make sense since it cannot be re-use when the authentication has
failed. I fixed that issue too at the same time, and also that the path
would be "remembered" in vain for cases where the connection was about to
get closed.
2006-12-11 09:32:58 +00:00
Daniel Stenberg
090f5a9a45 added the new test 282 2006-11-25 13:32:48 +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
Yang Tse
268fe09322 Revert ftpserver.pl back to revision 1.74 Adding change done in 1.76
This is done to back out changes done in revisions 1.77 and 1.75
2006-11-20 16:58:41 +00:00
Yang Tse
7a557e984a Revert runtests.pl back to revision 1.212
This is done to back out changes done from revisions 1.213 to 1.217
2006-11-20 16:58:04 +00:00
Yang Tse
f1a55cbe6d Revert ftp.pm back to revision 1.5 Adding copyright notice.
This is done to back out changes done from revisions 1.6 to 1.10
2006-11-20 16:57:01 +00:00
Yang Tse
1e35d95df8 Add some message logging 2006-11-20 10:35:25 +00:00
Yang Tse
d8387b418d stop slaves before stopping servers 2006-11-20 06:22:51 +00:00
Yang Tse
adea16a294 Revert to KILL test servers until all test servers
have proper TERM and INT signal handlers implemented.
2006-11-20 03:25:17 +00:00
Daniel Stenberg
7f2d5cab2d log the sleep, like when done in test 190 2006-11-19 22:48:40 +00:00
Yang Tse
8db353e1d7 Avoid passing child pid and test server pid, using the running
servers hash, and adjust message arguments accordingly.
2006-11-19 03:47:56 +00:00
Yang Tse
e6978117a7 Comment out the use of the "warnings" module now that ftp.pm seems to
be clear of warnings. Uncomment it if this module is further modified.

The "warnings" module requires perl 5.006 or later. Previous perl
versions don't have it and die on missing modules.
2006-11-19 03:47:11 +00:00
Yang Tse
0b5e1a9b2f Avoid keeping dupe pids When forked pid and test server pid is the same one. 2006-11-18 04:07:01 +00:00
Yang Tse
2e17a97474 Fix warning "Use of uninitialized value in ...".
If the list has only one item avoid sort subroutine.
2006-11-18 04:05:42 +00:00
Yang Tse
74ddbd8a3b The hash of running servers is now a hash of hashes which for each running
server holds not only its two main pids, but also the pidfile of the test
server and the 'slavepidfiles' for ftp* servers. This allows a better control
when stopping servers.

Now from runtests.pl when test servers are stopped they are signalled in
sequence TERM, INT and KILL allowing time in between for them to die. This
will give us a chance of gracefully stopping test servers, which we didn't
have when we were killing them in first instance.
2006-11-17 16:44:22 +00:00
Daniel Stenberg
e264f699d4 Tor Arntsen spotted this mistake 2006-11-13 13:48:55 +00:00
Yang Tse
17d4f9513e Remove showing stderr log files unconditionally for tests 518 and 537.
Add failure checking for servers when fork()ed.

Use same code path in 'stopserver' when called with a single or multiple pids.
2006-11-09 13:20:42 +00:00
Yang Tse
318a7584f3 add a couple more of debugging messages 2006-11-03 14:13:25 +00:00
Yang Tse
78081a1652 reduce max size of dinamically allocated arrays to minimize the nasty
behaviour some versions of IRIX exhibit of committing suicide on big
mallocs instead of just returning a friendly null pointer
2006-11-03 10:05:21 +00:00
Yang Tse
1dee2cd55e fix comments and renumber rlimit return codes
fix closing of fd's when limit is reached
2006-11-03 01:57:25 +00:00
Yang Tse
426ecfd136 fix comments and renumber rlimit return codes 2006-11-03 01:56:55 +00:00
Yang Tse
7f1870da5f remove leftover comment 2006-11-02 20:56:40 +00:00
Yang Tse
2149a095f7 update and split test cases 518 and 537 into its own source code file 2006-11-02 20:50:18 +00:00
Yang Tse
e8d21adbaa code cleanup 2006-11-02 15:47:24 +00:00
Yang Tse
fa28531322 use our internal string functions and replace sprintf with snprintf 2006-11-02 03:45:07 +00:00
Yang Tse
deef85ca9a Update protocol verification end of lines 2006-11-02 01:21:28 +00:00
Yang Tse
4f4427ff41 check symbol HAVE_UNISTD_H instead of UNISTD_H to include unistd.h 2006-11-02 00:34:21 +00:00
Yang Tse
905ca77c9e test 518 is all about testing libcurl functionality
when more than FD_SETSIZE file descriptors are open.
This means that if for any reason we are not able to
open more than FD_SETSIZE file descriptors then test
518 should not be run.

test 537 is all about testing libcurl functionality
when the system has nearly exhausted the number of
free file descriptors. Test 537 will try to run with
very few free file descriptors.
2006-11-01 18:33:50 +00:00
Yang Tse
f51c567de3 Show stderr log file for test 518 unconditionally.
In this way we'll be able to sort out problems that might
arise in the prechek phase of the 518 test.

Once that 518 has been verified this change will be undone.
2006-10-31 01:30:42 +00:00
Yang Tse
9b2acca63e Sync comment with code and add three messages more 2006-10-31 01:24:03 +00:00
Yang Tse
afcd9f1b1c Address some pitfalls in the rlimit() function check that were
preventing execution of this test on many platforms
2006-10-30 17:24:31 +00:00
Yang Tse
609044aea2 Compiler warning fix 2006-10-29 21:19:23 +00:00
Daniel Stenberg
5aa0db8681 a small unification of the error text on failed server startups 2006-10-27 21:07:08 +00:00
Yang Tse
772a985dc3 Update copyright year, since the file has been modified 2006-10-27 03:47:57 +00:00
Yang Tse
32ad212ac9 30 seconds isn't long enough for this test on a loaded server. 2006-10-27 01:58:59 +00:00
Gisle Vanem
125830ab4b Use proper 'stat' structure for fstat(). I.e. 'struct _stati64' and '_fstati64()'
on Win32.
2006-10-26 14:30:11 +00:00
Yang Tse
5b75b423e6 Improved rlimit logic:
- Take in account RLIM_INFINITY.
- Verify that soft limit is actually changed when doing so.
- Show errno in case getrlimit or setrlimit fails.
- Keep file descriptors open only while runing this test.
2006-10-26 13:55:24 +00:00
Yang Tse
cd3029f36f 30 seconds isn't long enough for this test on a loaded server. 2006-10-26 09:50:21 +00:00
Daniel Stenberg
cde5e35d9b Fixed CURLOPT_FAILONERROR to return CURLE_HTTP_RETURNED_ERROR even for the
case when 401 or 407 are returned, *IF* no auth credentials have been given.
The CURLOPT_FAILONERROR option is not possible to make fool-proof for 401
and 407 cases when auth credentials is given, but we've now covered this
somewhat more.

You might get some amounts of headers transferred before this situation is
detected, like for when a "100-continue" is received as a response to a
POST/PUT and a 401 or 407 is received immediately afterwards.

Added test 281 to verify this change.
2006-10-25 20:40:14 +00:00
Yang Tse
b4700f026b Add project notice and file Id 2006-10-25 09:20:44 +00:00
Yang Tse
d771fa7c48 Compiler warning fix 2006-10-25 08:52:00 +00:00
Yang Tse
384c8f3560 Use curl_global_init() and curl_global_cleanup().
Improve cleanup in case of initialization failure.
2006-10-25 05:59:46 +00:00
Yang Tse
c54a4301ee Abort test if it seems that it would have run forever. This is just to prevent
test hanging and actually is an indication that there's a condition that is
not being properly handled at some point in the library.

Remove a pair of braces and adjust indentation appropriately.
2006-10-24 15:51:42 +00:00
Yang Tse
13e60c55a1 Avoid trying to compare more than strlen bytes. 2006-10-23 19:16:19 +00:00
Dan Fandrich
9b8b1a68f0 30 seconds isn't long enough for this test on a loaded server. 2006-10-23 19:15:14 +00:00
Yang Tse
4ec9316155 Replace is*() macros with our own IS*() ones. 2006-10-23 19:14:54 +00:00
Daniel Stenberg
90933ac660 rely on the global LDADD instead of having specific ones for every program 2006-10-21 13:00:51 +00:00
Daniel Stenberg
deb81b2ad4 Nir Soffer made the tests/libtest/Makefile.am use a proper variable for all
the single test applications' link and dependences, so that you easier can
override those from the command line when using make.
2006-10-21 11:40:04 +00:00
Daniel Stenberg
4e717cdb30 Armel Asselin separated CA cert verification problems from problems with
reading the (local) CA cert file to let users easier pinpoint the actual
problem. CURLE_SSL_CACERT_BADFILE (77) is the new libcurl error code.
2006-10-21 11:32:05 +00:00
Yang Tse
33acd6f041 Compiler warning fix 2006-10-21 10:54:41 +00:00
Yang Tse
d997ff6aa8 Oops! Actually set the limit to 30 seconds. 2006-10-20 15:45:12 +00:00
Yang Tse
b9ccecf86e Decrease the posibility of aborting a test which actually is not
stale by replacing loop counters with timeouts. In this way the
main loop of the test will be allowed to run up to 30 seconds on
any platform before aborting it.
2006-10-20 15:39:54 +00:00
Yang Tse
19e07771d1 Set loop2 counter limit to 60 on this test to avoid a false positive. 2006-10-19 23:35:52 +00:00
Yang Tse
ef267ab449 Replace tabs with spaces and Compiler warning fix. 2006-10-19 22:49:33 +00:00
Yang Tse
4f6ed683e8 Compiler warning fix 2006-10-19 22:48:33 +00:00
Yang Tse
c818e7064f When aborting, show loop counter values when more than one counter exists. 2006-10-19 21:12:27 +00:00
Yang Tse
ead6ab2ef7 Abort test if it seems that it would have run forever. This is just to prevent
test hanging and actually is an indication that there's a condition that is
not being properly handled at some point in the library.

Loop counter limits might need to be further increased on false positives.
2006-10-19 17:29:25 +00:00
Yang Tse
5df4be1165 Check for USE_WINSOCK instead of WIN32 where the check was done
to verify winsock API availability.
2006-10-18 21:05:40 +00:00
Daniel Stenberg
b61fbbde46 buildconf already runs ares/buildconf by itself if there is an ares subdir
present, so there's no use to doing it again in this script!
2006-10-17 11:46:42 +00:00
Yang Tse
e150150d9f Remove redundant __CYGWIN__ symbol check 2006-10-11 16:01:16 +00:00
Yang Tse
943f0733bb Compiler warning fix 2006-10-10 23:58:02 +00:00
Yang Tse
8274447dd9 Call curl_global_cleanup() in all code paths before exiting test 2006-10-10 23:50:37 +00:00
Daniel Stenberg
cbcdd337aa Added test case 536 in an attempt to add Bogdan Nicula's problematic case
with multi interface and pipelining. This test just works and did not repeat
the problem his test code showed, but could still serve as a useful test.
2006-10-09 21:29:53 +00:00
Daniel Stenberg
c144adf77c used for test 535 too 2006-10-09 21:26:09 +00:00
Yang Tse
15e3dfe1d3 Compiler warning fix 2006-10-09 11:21:40 +00:00
Daniel Stenberg
a1de9367ec Bogdan Nicula's second test case (posted Sun, 08 Oct 2006) converted to test
case 535 and it now runs fine. Again a problem with the pipelining code not
taking all possible (error) conditions into account.
2006-10-09 06:58:05 +00:00
Daniel Stenberg
2ad7fcbc2f test 534 added in an attempt to repeat Bogdan Nicula's bug... 2006-10-08 10:51:53 +00:00
Daniel Stenberg
2c62dfd124 modified lib533 to accept both URLs on the command line 2006-10-08 08:50:12 +00:00
Daniel Stenberg
ef66497a0d Fix a "sockfilt" leak. When a new 'data' connection sockfilt server is started,
make sure that a previously used one is killed first (since they re-use the
same .pid file etc)
2006-10-08 08:43:32 +00:00
Daniel Stenberg
befc30bc55 Bogdan Nicula's hanging test case was converted to test case 533 and the test
now runs fine.
2006-10-06 21:19:57 +00:00
Daniel Stenberg
ca5846cde9 catch silly mistakes better 2006-10-06 21:19:40 +00:00
Daniel Stenberg
552b963e6d Dmitriy Sergeyev provided an example source code that crashed CVS libcurl
but that worked nicely in 7.15.5. I converted it into test case 532 and
fixed the problem.
2006-10-04 21:11:08 +00:00
Daniel Stenberg
5e0d9aea32 Support for FTP third party transfers is now dropped 2006-09-30 20:31:11 +00:00
Daniel Stenberg
ae13c93b7d Reported in #1561470 (http://curl.haxx.se/bug/view.cgi?id=1561470), libcurl
would crash if a bad function sequence was used when shutting down after
using the multi interface (i.e using easy_cleanup after multi_cleanup) so
precautions have been added to make sure it doesn't any more - test case 529
was added to verify.
2006-09-28 21:26:06 +00:00
Daniel Stenberg
68e9f75708 As reported in bug: #1566077 the former URL mentioned in the generated cookie
jar has died and we now instead point out our own version of that
2006-09-27 21:00:45 +00:00
Daniel Stenberg
f1d707705e allow user in passwd state for test 280 to work (--ftp-alternative-to-user) 2006-09-24 10:30:02 +00:00
Daniel Stenberg
0992e391ba filled in some docs for the FTP server control commands 2006-09-23 20:39:34 +00:00
Daniel Stenberg
b22aaeef6a added simple test of --ftp-alternative-to-user 2006-09-23 20:39:15 +00:00
Daniel Stenberg
e7d90e08b9 Added test case 531 in an attempt to repeat bug report #1561470
(http://curl.haxx.se/bug/view.cgi?id=1561470) that is said to crash when an
FTP upload fails with the multi interface. It did not, but I made a failed
upload still assume the control connection to be fine.
2006-09-21 20:52:20 +00:00
Daniel Stenberg
ec4a16f2e0 Armel Asselin fixed problems when you gave a proxy URL with user name and
empty password or no password at all. Test case 278 and 279 were added to
verify.
2006-09-20 21:49:41 +00:00
Gisle Vanem
56bf97ffc9 'in6addr_any' must be placed in .c-file. Added 'REAL_WIN32' for
all Win32 targets except CygWin. Cleanup.
2006-09-13 13:41:53 +00:00
Daniel Stenberg
e55d4fd5c1 nicer reporting of disabled tests 2006-09-13 10:48:03 +00:00
Daniel Stenberg
5ee231415f added CVS id and clarified the comment lines 2006-09-13 10:18:01 +00:00
Daniel Stenberg
c866771cd2 Added a generic way to disable test cases when "all" is run, and added the
FTP 3rd party transfers to that file for now until I have them sorted out.
2006-09-13 10:16:36 +00:00
Yang Tse
5a6c89661a Cygwin preprocessor adjustments 2006-09-12 01:17:16 +00:00
Daniel Stenberg
29dc39fce1 - Fixed my breakage from earlier today so that doing curl_easy_cleanup() on a
handle that is part of a multi handle first removes the handle from the
  stack.

- Added CURLOPT_SSL_SESSIONID_CACHE and --no-sessionid to disable SSL
  session-ID re-use on demand since there obviously are broken servers out
  there that misbehave with session-IDs used.
2006-09-11 17:18:18 +00:00
Gisle Vanem
e134a40208 Added select_test() function to allow selecting on no sockets on
Winsock.
2006-09-10 19:01:04 +00:00
Gisle Vanem
145084b699 Print usage in case 'arg2 == NULL'. 2006-09-09 16:55:21 +00:00
Daniel Stenberg
e9160a31e0 removed the comment that isn't valid for this file, just a copy'n paste error 2006-09-08 12:03:55 +00:00
Daniel Stenberg
e3c15fc4b9 test 530 is the first ever HTTP pipelining test for libcurl 2006-09-08 11:56:56 +00:00
Daniel Stenberg
b7eeb6e67f Major overhaul introducing http pipelining support and shared connection
cache within the multi handle.
2006-09-07 21:49:20 +00:00
Daniel Stenberg
a932803eac Invoke memanalyze from the source path and hush up about killing the FTP
server as part of test cases
2006-09-06 10:03:34 +00:00
Daniel Stenberg
dc9f154823 added missing test 2006-08-31 22:18:08 +00:00
Dan Fandrich
cd6c58216a Use /usr/bin/env to invoke perl like the other test scripts. 2006-08-23 21:20:00 +00:00
Daniel Stenberg
cfdcae4bc7 Based on a patch by Armel Asselin, the FTP code no longer re-issues the TYPE
command on subsequent requests on a re-used connection unless it has to.
2006-08-19 21:18:36 +00:00
Daniel Stenberg
490cccba3c Andrew Biggs pointed out a "Expect: 100-continue" flaw where libcurl didn't
send the whole request at once, even though the Expect: header was disabled
by the application. An effect of this change is also that small (< 1024
bytes) POSTs are now always sent without Expect: header since we deem it
more costly to bother about that than the risk that we send the data in
vain.
2006-08-18 22:54:57 +00:00
Yang Tse
ee3514ccdc Replace exit() with return() in main() 2006-08-14 17:00:08 +00:00
Yang Tse
b33f47804d Allow again proper compilation outside of the source tree 2006-08-07 18:06:37 +00:00
Yang Tse
aa791ee5cf Fix compiler warnings. 2006-07-29 09:15:03 +00:00
Yang Tse
2c81bfead5 Replace send() and recv() with swrite() and sread() macros. 2006-07-28 18:01:23 +00:00
Daniel Stenberg
c10d15aa0f test case 277 - HTTP RFC1867-type formposting with custom Content-Type 2006-07-27 22:44:56 +00:00
Yang Tse
ab4256d53a Abort if unable to write pid file, and close socket when aborting. 2006-07-19 15:28:30 +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
431c4bd6e3 tests/libtest/lib506.c version 1.11 is now also logging CURLSHOPT_LOCKFUNC, CURLSHOPT_UNLOCKFUNC and CURLSHOPT_USERDATA, so we now also have to check them here. 2006-07-17 16:47:07 +00:00
Yang Tse
773bec5ae5 Fix compiler warning "enumerated type mixed with another type" 2006-07-17 14:32:19 +00:00
Yang Tse
2aa4710745 Minor cleanup 2006-07-17 03:38:13 +00:00
Yang Tse
ccfce89423 Null terminate string in buffer before feeding it to strtol() 2006-07-14 06:31:41 +00:00
Yang Tse
498aad8587 Change to meaningful var names and take care of a compiler warning on IRIX 6.5.22 MIPSPro C 7.3 64bit 2006-07-13 18:50:51 +00:00
Yang Tse
f0694c582e Remove var not used. 2006-07-12 10:41:07 +00:00
Yang Tse
f90f0c98d9 Log a message if not all data is sent. 2006-07-12 09:39:35 +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
86f4cead16 sread now returns ssize_t 2006-07-12 06:14:49 +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
Daniel Stenberg
28611704d9 Ates Goral pointed out that libcurl's cookie parser did case insensitive
string comparisons on the path which is incorrect and provided a patch that
fixes this. I edited test case 8 to include details that test for this.
2006-07-08 18:52:08 +00:00
Gisle Vanem
cc5174a89a Fix "'x' might be used uninitialized in this function" warnings. 2006-06-10 17:35:28 +00:00
Daniel Stenberg
7929600798 stricter type use to please compilers 2006-06-09 08:25:16 +00:00
Daniel Stenberg
6a03ab3ad4 lib525.c does a FTP upload with PORT using multi interface 2006-06-08 22:43:21 +00:00
Daniel Stenberg
2bd3033f68 NTLM2 session response support 2006-06-07 14:14:04 +00:00
Daniel Stenberg
edb5444fa3 reverted the previous .libs check for libs, but instead make mingw32 builds
more similar to other configure builds (== use .la for libext and no binext)
2006-05-27 11:36:05 +00:00
Daniel Stenberg
3718737091 better check for libs created in the .libs directory since libtool does this
kind of magic
2006-05-25 11:04:08 +00:00
Daniel Stenberg
f689d06ca9 make sure we pass a time_t * to localtime(), and the timeval struct members
are not always time_t ones
2006-05-24 21:39:52 +00:00
Daniel Stenberg
4a8dfb3461 based on Tor Arntsen's fix, this should correct test case 271 to again run
fine
2006-05-24 15:22:03 +00:00
Daniel Stenberg
973ed24dc8 1 - allow much longer time for the test FTP server to startup and get verified
2 - store the time it took to verify it and allow that time to be used as
  %FTPTIME[23] in command lines to allow us to adjust better to slow hosts
  since test 190 failed on my slow solaris machine just because it hadn't
  gotten time to run all the way the test assumed all machines would reach
  before the time-out elapsed.
2006-05-11 06:34:30 +00:00
Daniel Stenberg
975534370f My Solaris test server was simply too slow to be able to respond within 4
seconds even when everything is fine! Now we allow a test server 8 seconds
to respond to still be considered ok.
2006-05-10 21:38:46 +00:00
Daniel Stenberg
00312e95fe removed variable declarations shadowing previously declared variables 2006-05-10 09:53:52 +00:00
Daniel Stenberg
95152aec68 David McCreedy brought line end conversions when doing FTP ASCII
transfers. They are done on non-windows systems and translate CRLF to LF.
2006-04-26 07:40:37 +00:00
Daniel Stenberg
e5babd086d if configure found a fork(), sws supports --fork which is *NOT* used by the
ordinary test suite. Also removed the perror() calls and instead made the
logging output the errno code to ease error tracking using logs.
2006-04-10 13:11:52 +00:00
Daniel Stenberg
c212ebbdda output the exit code from stunnel to stderr in case it is non-zero 2006-04-10 13:10:25 +00:00
Daniel Stenberg
83b8de3d43 support --fork and pass that on to sws 2006-04-10 13:09:56 +00:00
Daniel Stenberg
e174d374f2 Scan for 'stunnel4' before 'stunnel' since debian have them setup this way
and it should break most other systems. The "funny" part is that debian
actually have a 'stunnel' setup to simulate stunnel v3 but it breaks our own
stunnel-version-detect-and-adjust-to-it system.

Added initial support for optionally running servers with fork support.
2006-04-10 13:03:20 +00:00
Daniel Stenberg
4edb93508d Use correct content-length. Found out by patching the libcurl read to only
read one byte at a time...
2006-04-10 12:26:08 +00:00
Daniel Stenberg
b0adcd6a46 cut off a bit more of the type-2 ntlm message since it differs between
hosts
2006-04-05 12:46:03 +00:00
Daniel Stenberg
be285cde3f Michele Bini modified the NTLM code to work for his "weird IIS case"
(http://curl.haxx.se/mail/lib-2006-02/0154.html) by adding the NTLM hash
function in addition to the LM one and making some other adjustments in the
order the different parts of the data block are sent in the Type-2 reply.
Inspiration for this work was taken from the Firefox NTLM implementation.

I edited the existing 21(!) NTLM test cases to run fine with these news. Due
to the fact that we now properly include the host name in the Type-2 message
the test cases now only compare parts of that chunk.
2006-04-05 12:35:48 +00:00
Daniel Stenberg
bcc62cc9e3 #1451929 (http://curl.haxx.se/bug/view.cgi?id=1451929) detailed a bug that
occurred when asking libcurl to follow HTTP redirects and the original URL had
more than one question mark (?). Added test case 276 to verify.
2006-03-28 08:03:25 +00:00
Daniel Stenberg
33df856925 If run on a curl built shared, detect this and invoke libtool for gdb
accordingly.
2006-03-03 14:37:44 +00:00
Daniel Stenberg
ce09cedd2e added test524 2006-03-03 13:12:39 +00:00
Daniel Stenberg
7d68101f83 Prevent uploading to a URL that has no file name part. 2006-03-03 13:09:30 +00:00
Gisle Vanem
f592ea6c30 Fix typo. 2006-02-25 18:57:20 +00:00
Dan Fandrich
d29147565c Fixed test case 57 (KNOWN_BUG #18) 2006-02-22 23:55:28 +00:00
Daniel Stenberg
10beb36b1c Ulf Hrnhammar fixed a format string (printf style) problem in the Negotiate
code. It should however not be the cause of any troubles. He also fixed a
few similar problems in the HTTP test server code.
2006-02-18 22:27:01 +00:00
Daniel Stenberg
e96445bd02 how silly, the cookie expired! ;-) 2006-02-06 20:02:14 +00:00
Daniel Stenberg
67bf4f28ff Michal Marek provided a patch for FTP that makes libcurl continue to try PASV
even after EPSV returned a positive response code, if libcurl failed to
connect to the port number the EPSV response said. Obviously some people are
going through protocol-sensitive firewalls (or similar) that don't understand
EPSV and then they don't allow the second connection unless PASV was
used. This also called for a minor fix of test case 238.
2006-01-24 14:40:43 +00:00
Daniel Stenberg
fcfd6d9504 Duane Cathey was one of our friends who reported that curl -P [IP]
(CURLOPT_FTPPORT) didn't work for ipv6-enabed curls if the IP wasn't a
"native" IP while it works fine for ipv6-disabled builds!

In the process of fixing this, I removed the support for LPRT since I can't
think of many reasons to keep doing it and asking on the mailing list didn't
reveal anyone else that could either. The code that sends EPRT and PORT is
now also a lot simpler than before (IMHO).
2006-01-19 23:52:03 +00:00
Daniel Stenberg
67a83c1b34 David Shaw finally removed all traces of Gopher and we are now officially
not supporting it. It hasn't been functioning for years anyway, so this is
just finally stating what already was true. And a cleanup at the same time.
2006-01-16 22:14:37 +00:00
Daniel Stenberg
bebf70667d Andrew Benham fixed a race condition in the test suite that could cause the
test script to kill all processes in the current process group!
2006-01-13 12:16:16 +00:00
Daniel Stenberg
bda1e9aeab Made the copyright year match the latest modification's year. 2006-01-09 13:17:14 +00:00
Daniel Stenberg
8a0ca3066e modified output to prevent the autobuild system to trap on the 'FAILED' output
mistaking it for an actual failed test case
2006-01-04 23:02:40 +00:00
Daniel Stenberg
81b9793807 Added remake of the arpa/tftp.h file to make the TFTP server build on systems
without the real header file.
2006-01-03 22:47:07 +00:00
Daniel Stenberg
7278f17e8f killed trailing whitespace 2006-01-03 22:44:58 +00:00
Daniel Stenberg
66c7427df0 Andres Garcia made the TFTP test server build with mingw ("I also had to copy
the 'tftp.h' file from a linux box, since it doesn't come with mingw.")
2006-01-03 22:19:15 +00:00
Daniel Stenberg
687cf0235e modified to hush compiler warnings 2006-01-03 12:18:22 +00:00
Daniel Stenberg
74a299fd08 1. sws now supports two new "commands" and 2. if built with
CURL_SWS_FORK_ENABLED defined it forks for each new connection and thus can
support any amount of connection clients (used for hiper tests and not for the
standard plain curl test suite)
2006-01-02 12:19:12 +00:00
Dan Fandrich
178afd81a9 Fixed lcc compiler warnings. 2005-12-19 19:47:14 +00:00
Yang Tse
d6c5d24af3 Cleanup windows header includes. Where aplicable, inclusion of
windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h
2005-12-18 15:36:14 +00:00
Dan Fandrich
6005a461bb Log CPPFLAGS environment variable along with the others. 2005-12-13 19:07:33 +00:00
Dan Fandrich
e2df946eee Fixed some compiler warnings on lcc. 2005-12-13 18:54:31 +00:00
Yang Tse
b1fece74e3 Fix compiler warning 2005-12-08 16:43:32 +00:00
Yang Tse
93d59520e4 If unable to get curl's version, log all failure details. 2005-12-08 11:29:47 +00:00
Daniel Stenberg
59b6cb9e91 Yang Tse: fixed compiler warning 2005-12-06 07:47:37 +00:00
Daniel Stenberg
e06afaeb7a Yang Tse: With last change logging directory needs to be created sooner. 2005-12-06 07:44:18 +00:00
Daniel Stenberg
1d8212e53a Yang Tse: make runtests.pl more talkative when unable to find out curl's
version.
2005-12-05 19:23:56 +00:00
Daniel Stenberg
272231fb09 Another Yang Tse warning cleanup raid! 2005-12-05 14:10:48 +00:00
Daniel Stenberg
a5fcb26ab1 modified to the new error text for range error 2005-11-10 22:22:38 +00:00
Daniel Stenberg
80f2e3f263 test 275 makes a CONNECT through a proxy and then gets two pages from the
same server
2005-10-30 23:15:49 +00:00
Daniel Stenberg
966fa848a0 Nis Jorgensen filed bug report #1338648
(http://curl.haxx.se/bug/view.cgi?id=1338648) which really is more of a
feature request, but anyway. It pointed out that --max-redirs did not allow
it to be set to 0, which then would return an error code on the first
Location: found. Based on Nis' patch, now libcurl supports CURLOPT_MAXREDIRS
set to 0, or -1 for infinity. Added test case 274 to verify.
2005-10-27 22:05:38 +00:00
Daniel Stenberg
be9c873a6e Dave Dribin made libcurl understand and handle cases when the server
(wrongly) sends *two* WWW-Authenticate headers for Digest. While this should
never happen in a sane world, libcurl previously got into an infinite loop
when this occurred. Dave added test 273 to verify this.
2005-10-20 20:07:32 +00:00
Daniel Stenberg
68917eb517 added test case 272 for -z download over FTP when the timestamp is identical
to the remote one
2005-10-05 06:23:45 +00:00
Daniel Stenberg
4ec55a964d fixed the proper path to the tftpd server 2005-09-30 14:25:50 +00:00
Daniel Stenberg
da3992d2e9 added test 271 2005-09-19 22:04:14 +00:00
Daniel Stenberg
48908e4633 test 271, the first ever TFTP test 2005-09-19 22:04:06 +00:00
Daniel Stenberg
f5ae149338 seems to work for test 271 on Linux now! 2005-09-19 22:03:16 +00:00
Daniel Stenberg
90559bed53 renamed sendfile() since some systems have a system call named like this -
now the functions are named sendtftp() and recvtftp() instead.
2005-09-16 10:52:38 +00:00
Daniel Stenberg
973a18cf03 In the Solaris 7 header files for tftp, the th_stuff struct member is an
unsigned short. Trying a typecast here to fix.
2005-09-16 10:50:43 +00:00
Daniel Stenberg
3c666ce57a prevent warnings on re-defining MIN 2005-09-16 07:19:54 +00:00
Daniel Stenberg
da3ecc91f8 use int "subscripts" to prevent warnings from picky compilers 2005-09-16 06:14:30 +00:00
Daniel Stenberg
09c8f558f7 use internal *printf() clones 2005-09-16 05:49:53 +00:00
Daniel Stenberg
528a149def ifdef for includes, added checking for two not previously checked files (one
being necessary for solaris builds)
2005-09-15 21:50:50 +00:00
Daniel Stenberg
29e36afb6b use make -k when running the tests 2005-09-15 21:49:26 +00:00
Daniel Stenberg
0e39543d35 ignore this too 2005-09-15 20:36:58 +00:00
Daniel Stenberg
0de20d8ee6 build tftpd too! 2005-09-15 20:36:28 +00:00
Daniel Stenberg
cd5de5c0e5 First version of the TFTP server. Basic functionality is there. 2005-09-15 20:32:59 +00:00
Daniel Stenberg
bd5afc26bd added TFTP and TFTP-ipv6 support 2005-09-15 20:25:02 +00:00
Daniel Stenberg
9542dfdcdc moved test2file() to util.c 2005-09-15 20:22:43 +00:00
Daniel Stenberg
b9c8de598b Thanks to Scott Davis' detailed reports, I found this premature detection
of the end of a chunked-encoded POST request.
2005-09-07 10:51:37 +00:00
Daniel Stenberg
7e845e7cfd Added FTP_SKIP_PASV_IP and --ftp-skip-pasv-ip 2005-09-04 05:16:06 +00:00
Gunter Knauf
75dbb3189a quick hack to make it working again on Win32 - however we should consider to set some defaults depending on the compiler architecture we guess we are since it doesnt work well if we prefer building the msvc makefile with gmake instead of nmake because we found gmake first in path.... 2005-08-30 18:37:08 +00:00
Daniel Stenberg
a4773fcbbb Toby Peterson added CURLOPT_IGNORE_CONTENT_LENGTH to the library, accessible
from the command line tool with --ignore-content-length. This will make it
easier to download files from Apache 1.x (and similar) servers that are
still having problems serving files larger than 2 or 4 GB. When this option
is enabled, curl will simply have to wait for the server to close the
connection to signal end of transfer. I wrote test case 269 that runs a
simple test that this works.
2005-08-24 10:57:28 +00:00
Daniel Stenberg
1e038c4bc6 valgrind version 3 renames the --logfile command line option to --log-file... 2005-08-24 10:49:57 +00:00
Daniel Stenberg
e22ac39da4 detabify 2005-08-18 08:47:56 +00:00
Daniel Stenberg
9ad92b3007 added test 268 that makes curl -d @nonexisting 2005-08-12 22:09:21 +00:00
Daniel Stenberg
c0d343d56d do a POST with NTLM and add two custom headers 2005-08-11 21:33:40 +00:00
Gunter Knauf
f451bb7c49 fix for NetWare crossbuilds to display the right config.h when build on Win32. 2005-08-11 18:02:09 +00:00
Daniel Stenberg
6508d446e1 Support realloc() on a NULL pointer properly (printf(%p) on a NULL pointer
outputs (nil) and not a 0x0 or similar.
2005-08-04 23:05:36 +00:00
Gisle Vanem
34a827bbfe Needs 'struct_stat'. Increased verbosity. 2005-07-28 13:20:27 +00:00
Daniel Stenberg
465e19dbe9 Adrian Schuur added trailer support in the chunked encoding stream. The
trailer is then sent to the normal header callback/stream.
2005-07-12 18:15:34 +00:00
Daniel Stenberg
20005a83d2 Andrew Bushnell provided enough info for me to tell that we badly needed to
fix the CONNECT authentication code with multi-pass auth methods (such as
NTLM) as it didn't previously properly ignore response-bodies - in fact it
stopped reading after all response headers had been received. This could
lead to libcurl sending the next request and reading the body from the first
request as response to the second request. (I also renamed the function,
which wasn't strictly necessary but...)

The best fix would to once and for all make the CONNECT code use the
ordinary request sending/receiving code, treating it as any ordinary request
instead of the special-purpose function we have now. It should make it
better for multi-interface too. And possibly lead to less code...

Added test case 265 for this. It doesn't work as a _really_ good test case
since the test proxy is too stupid, but the test case helps when running the
debugger to verify.
2005-07-03 22:25:15 +00:00
Daniel Stenberg
27926030f9 add more info when this script gets confused, and added getaddrinfo and
freeaddrinfo to the trace output
2005-06-30 14:07:52 +00:00
Daniel Stenberg
30c93d66eb verify that the URL decoding is done properly too 2005-06-22 22:24:47 +00:00
Daniel Stenberg
3b60bb7259 David Shaw's fix that unifies proxy string treatment so that a proxy given
with CURLOPT_PROXY can use a http:// prefix and user + password. The user
and password fields are now also URL decoded properly.

Test case 264 added to verify.
2005-06-22 22:24:10 +00:00
Daniel Stenberg
29aafb9cea Andres Garcia's text mode fix for the 'data' part 2005-06-03 14:06:03 +00:00
Daniel Stenberg
300b4a9158 Todd Kulesza reported a flaw in the proxy option, since a numerical IPv6
address was not possible to use. It is now, but requires it written
RFC2732-style, within brackets - which incidently is how you enter numerical
IPv6 addresses in URLs. Test case 263 added to verify.
2005-05-31 13:03:26 +00:00
Daniel Stenberg
52071f3476 added keywords 2005-05-31 12:57:21 +00:00
Daniel Stenberg
a7846189cd Eric Cooper reported about a problem with HTTP servers that responds with
binary zeroes within the headers. They confused libcurl to do wrong so the
downloaded headers become incomplete. The fix is now verified with test case
262.
2005-05-29 22:30:48 +00:00
Daniel Stenberg
e3a530eb61 Andrs Garca fixed a warning appearing on windows 2005-05-27 11:01:41 +00:00
Daniel Stenberg
50e9522a06 silense a warning 2005-05-25 22:12:57 +00:00
Daniel Stenberg
72e532cb67 no more time/re-start of sockfilt, no more redirect of stdin/stdout when
talking to sockfilt
2005-05-25 12:27:19 +00:00
Daniel Stenberg
ac5635f77d added function for individual ftp slave kills 2005-05-25 12:26:38 +00:00
Daniel Stenberg
640d67c119 modified output logging, fixed the ftpslave killing 2005-05-25 12:26:20 +00:00
Daniel Stenberg
3e79693e3b utilize the whole usec in the log and don't output to stderr if the logfile
can't be opened
2005-05-25 12:04:52 +00:00
Daniel Stenberg
d55d3c2fd0 nicer raw logging and put code into (nicer) functions 2005-05-25 12:04:24 +00:00
Daniel Stenberg
3aced17c75 don't restart sockfilt after only 5 seconds of inactivity 2005-05-24 21:09:49 +00:00
Daniel Stenberg
6a63c51f7c Andres Garcia's mode=text patch to make these do fine on Windows 2005-05-24 10:03:13 +00:00
Daniel Stenberg
632cf13767 add test case 261, response code 226 to TYPE 2005-05-24 09:40:58 +00:00
Daniel Stenberg
c654b79c53 added keywords 2005-05-21 22:38:19 +00:00
Daniel Stenberg
bee7b874ea added -nobuildconf 2005-05-20 11:24:55 +00:00
Daniel Stenberg
9c3fc592f7 keywords added 2005-05-20 11:15:24 +00:00
Daniel Stenberg
4eab7a1ebc shorter name 2005-05-20 11:15:15 +00:00
Daniel Stenberg
3d985688e4 sum up 2005-05-20 11:14:44 +00:00
Daniel Stenberg
17ea2631cd Add support for text mode on stdout tests as well, and add the mode=text
to the docs.
2005-05-20 10:40:32 +00:00
Daniel Stenberg
b749910e6c include ctype.h for isdigit() 2005-05-19 09:55:53 +00:00
Daniel Stenberg
6ff092f140 removed duplicate 2005-05-19 07:12:16 +00:00
Daniel Stenberg
4a091bbd8a Bug report #1204435 identified a problem with malformed URLs like
"http://somehost?data" as it added a slash too much in the request ("GET
/?data/"...). Added test case 260 to verify.
2005-05-18 20:01:01 +00:00
Daniel Stenberg
45bce1062a ignore resolve too 2005-05-18 10:05:38 +00:00
Daniel Stenberg
8cb344bf3c use less code and prevent compiler warning 2005-05-18 10:01:46 +00:00
Daniel Stenberg
c84839eb91 scan for gmake and make to prefer gmake on systems that have it 2005-05-17 12:07:08 +00:00
Daniel Stenberg
1f878aee69 Made test case 241 precheck that the given name resolves to an ipv6 address,
or the test is skipped. Ideally, we should let this test case go over a few
frequently used IPv6 localhost aliases...
2005-05-17 10:27:11 +00:00
Daniel Stenberg
84fd4686e2 Moved more generic functions to util.[ch]
Added resolve.c to simply resolve a given host name
2005-05-17 10:22:22 +00:00
Daniel Stenberg
1a31bff9fe return, not exit, on several places 2005-05-16 07:07:00 +00:00
Daniel Stenberg
5d9fc28fa7 Modified the default HTTP headers used by libcurl:
A) Normal non-proxy HTTP:

 - no more "Pragma: no-cache" (this only makes sense to proxies)

B) Non-CONNECT HTTP request over proxy:

 - "Pragma: no-cache" is used (like before)
 - "Proxy-Connection: Keep-alive" (for older style 1.0-proxies)

C) CONNECT HTTP request over proxy:

 - "Host: [name]:[port]"
 - "Proxy-Connection: Keep-alive"
2005-05-11 09:52:59 +00:00
Daniel Stenberg
315a9c95d5 prevent 64bit warnings 2005-05-10 11:21:57 +00:00
Daniel Stenberg
e010ac9706 allow the ares/config.h display to fail 2005-05-10 11:19:12 +00:00
Daniel Stenberg
b2b66f749a no need to display src/config.h anymore since it is a duplicate of lib/config.h
but we could use having a look at ares/config.h when that is used
2005-05-09 07:45:30 +00:00
Daniel Stenberg
ef5eea689a Added an active disconnected state, to make the code clearer. 2005-05-07 13:52:07 +00:00
Daniel Stenberg
fd191deb49 removed unnecessary logging to ease REAL debuggin 2005-05-07 08:55:37 +00:00
Daniel Stenberg
2b00ed7ef8 Added two test cases for multipart formpost over a proxy with --anyauth. Our
HTTP test server is a bit limited though, as it never responds to the POST
request until all data has been sent (and received)...
2005-05-06 23:22:33 +00:00
Daniel Stenberg
d960ea959d When a server is clearly running, curl is now invoked to verify that it can
download a file from the server before the server is considered fine to use
for the given test case. This should fix the cases where the server can run
but curl cannot work with it.
2005-05-06 23:21:34 +00:00
Daniel Stenberg
c06da7c84a now add --trace-time by default for curl tests 2005-05-04 21:58:47 +00:00
Daniel Stenberg
cea117b509 removed lots of (now) redundant logging 2005-05-04 21:57:07 +00:00
Daniel Stenberg
6078c938b2 modify a value we are allowed to 2005-05-04 21:51:09 +00:00
Daniel Stenberg
9e95dd4821 improved logging (all FTP protocol data, both ways) to possibly help us realize
why sometimes the control connection dies after a RETR has been sent
2005-05-04 21:49:30 +00:00
Daniel Stenberg
7dde3d1825 *MAN* was this hard to track down. Had I just read the docs properly from the
start... Anyway, fork() + exec() makes _two_ pids (in perl) that we need to
track and kill after use. Thankyouverymuch.
2005-05-03 23:14:43 +00:00
Daniel Stenberg
a0fe950b75 add more info to the log to ease debugging 2005-05-03 23:13:24 +00:00
Daniel Stenberg
ed9e10f2d8 another <case> converted to sysread 2005-05-02 11:55:17 +00:00
Daniel Stenberg
02ae3c2810 read from the open2 filehandle with sysread, not <handle> 2005-05-02 11:31:15 +00:00
Daniel Stenberg
669ebb5f71 Fixed the FTP server read stuff when waiting for a connect after a PASV/EPSV.
Made the ftp server use the passed in pidfile name, and made runtests.pl
pass it in properly.
2005-05-02 10:22:09 +00:00
Daniel Stenberg
9a3e0e52cb fix the server for the slow response case 2005-05-02 10:03:12 +00:00
Daniel Stenberg
6f4ff1f2bf When starting the ftp server, wait a few seconds to make really sure that
a pidfile for the server appears as otherwise it failed.
2005-05-02 09:08:44 +00:00
Daniel Stenberg
d3eea61f1f Make sure there's no pidfile if we cannot start the initial sockfilt tool -
this happens for some ipv6-enabled hosts on which sockfilt cannot listen
on ipv6.
2005-05-02 09:08:02 +00:00
Daniel Stenberg
e71bd416f4 blank a few more environment variables before running a test 2005-05-02 07:54:25 +00:00
Daniel Stenberg
c4dbed040b fixed to use fork()+exec() to start test servers 2005-05-01 13:20:53 +00:00
Daniel Stenberg
366b62af2d always use the libcurl-provided *printf() functions 2005-05-01 12:56:09 +00:00
Daniel Stenberg
a6955aa486 util.h added as "source" to make it get added in dist archives 2005-05-01 12:51:27 +00:00
Daniel Stenberg
ad30341fa2 logfile name is const 2005-04-30 23:35:51 +00:00
Daniel Stenberg
23da55a9f1 Moved common code to util.[ch] instead of having it duplicated in sws.c
and sockfilt.c. For good-to-have functions for the servers written in C.
2005-04-30 23:30:55 +00:00
Daniel Stenberg
63621bae81 Set mode text on the section that is written by curl in text mode, to allow
the runtests.pl to check this differently on operating systems that
differentiate on this.
2005-04-28 21:07:07 +00:00
Daniel Stenberg
85f9e6c4b9 basic signal handler for sigint and sigkill 2005-04-28 21:06:17 +00:00
Daniel Stenberg
967ec296c0 fixed the attribute parser to better handle multiple ones, with or without
quotes around the contents
2005-04-28 21:05:40 +00:00
Daniel Stenberg
c6aae9b1d7 moved two functions to ftp.pm, made some more changes on stopping servers
and fixed the textmode attribute thing for windows a bit
2005-04-28 21:04:58 +00:00
Daniel Stenberg
913c370c25 moved in functions from runtests.pl to enable the ftpserver to use the
killslaves function
2005-04-28 21:04:08 +00:00
Daniel Stenberg
e5472bbd21 AF_INET6 for ipv6 addresses! 2005-04-28 14:31:25 +00:00
Daniel Stenberg
957c258c6d no, the kill servers messages need to be verbose, they're too frequent 2005-04-28 14:25:48 +00:00
Daniel Stenberg
abee109cd1 display killed pids to make it easier to see for autobuilds etc 2005-04-28 14:03:08 +00:00
Daniel Stenberg
502e5ae6e1 historic thing we will not use 2005-04-28 13:55:34 +00:00
Daniel Stenberg
b8417be1f2 removed ftpsserver.pl 2005-04-28 13:55:16 +00:00
Daniel Stenberg
9e037431b4 When staring a HTTP server, use the pidfile preferably since it turns out
sometimes the server can start but curl cannot speak to it, and then we must
remember the server (in order to kill it properly) anyway.

Also, make sure to kill all servers on exit everywhere.
2005-04-28 13:54:48 +00:00
Daniel Stenberg
f71b3676bb ignore more generated files 2005-04-28 11:22:18 +00:00
Daniel Stenberg
50fe7b5e35 remove unused ftps-server code and fixed two warnings 2005-04-28 08:23:25 +00:00
Daniel Stenberg
9fb253388b if diff -u makes zero output, try diff -c instead 2005-04-28 08:20:33 +00:00
Daniel Stenberg
8cf1786296 kill slave processes when they fail 2005-04-28 07:36:55 +00:00
Daniel Stenberg
51b17b299c 1. no longer ask the server for the HTTPS pid, as it returns the HTTP pid
(problem identified by Dan F)
2. initial text mode fix for file checks, to allow better text file testing
on windows (with regard to line endings)
3. fixed to use the proper ftpserver pidfile to find pid
2005-04-28 06:50:42 +00:00
Daniel Stenberg
8465a367a4 listen(..., 1) as 0 doesn't work on Tru64! 2005-04-27 12:28:04 +00:00
Daniel Stenberg
3bcfe678ab display listening port in log 2005-04-27 12:27:23 +00:00
Daniel Stenberg
d5403f3a5b show what error codes we test for too, and show 10 test case numbers 2005-04-27 10:12:41 +00:00
Daniel Stenberg
26abb48533 keyword update 2005-04-27 09:59:47 +00:00
Daniel Stenberg
177848ed27 detect SSL library properly and display it on startup 2005-04-27 09:59:29 +00:00
Daniel Stenberg
01165e08e0 Fred New reported a bug where we used Basic auth and user name and password in
.netrc, and when following a Location: the subsequent requests didn't properly
use the auth as found in the netrc file. Added test case 257 to verify my fix.
2005-04-25 21:39:48 +00:00
Daniel Stenberg
c12159ce21 show up to 5 (random) test cases using the keyword 2005-04-22 22:29:48 +00:00
Daniel Stenberg
4485503ecc keywords added 2005-04-22 21:59:08 +00:00
Daniel Stenberg
f0057977b7 ignore the memdump file when showing files after a failure 2005-04-22 20:47:35 +00:00
Daniel Stenberg
e8e43f06af copyright this year 2005-04-22 20:47:21 +00:00
Daniel Stenberg
b8d7a13ea3 modified the test case success reporting, added "test N out of Y" and
"remaining: [time]" outputs to hint users about what to expect
2005-04-22 11:51:06 +00:00
Daniel Stenberg
78a76dc905 test 256 is like test 38 but with proxy + proxy auth 2005-04-22 10:15:21 +00:00
Daniel Stenberg
5fa5fff0e9 keywords 2005-04-22 10:06:58 +00:00
Daniel Stenberg
53a8e5655b added CURLOPT_PORT test when using proxy 2005-04-19 08:10:04 +00:00
Daniel Stenberg
63d109f7be Olivier reported that even though he used CURLOPT_PORT, libcurl clearly still
used the default port. He was right. I fixed the problem and added the test
cases 521, 522 and 523 to verify the fix.
2005-04-18 19:41:04 +00:00
Daniel Stenberg
c904b6b5bf Toshiyuki Maezawa reported that when doing a POST with a read callback,
libcurl didn't properly send an Expect: 100-continue header. It does now.
2005-04-18 17:14:58 +00:00
Daniel Stenberg
4382204e1b better fix for the socket -1 case 2005-04-18 08:59:46 +00:00
Daniel Stenberg
6d3114efe2 ignore sockfilt 2005-04-18 08:51:04 +00:00
Daniel Stenberg
b62baaed95 safety measure to avoid using -1 as socket 2005-04-18 08:49:46 +00:00
Daniel Stenberg
9b391e531b allow some more time 2005-04-18 08:49:21 +00:00
Daniel Stenberg
a0c7a6d22b ARGH my stupidity is endless. Ipv4-only hosts don't send EPRT or LPRT. 2005-04-18 07:56:43 +00:00
Daniel Stenberg
14424f7058 Modified the FTP server to use the new 'sockfilt' program to do all the socket
level stuff. The FTP server communicates with sockfilt using perl's open2().
This enables easier IPv6 support and hopefully FTP-SSL support in the future.
Added four test cases for FTP-ipv6.
2005-04-18 06:57:44 +00:00
Daniel Stenberg
6063dff8d0 Modified to not mix ordinary print to STDOUT with a system() that prints to
stdout, since I've found cases on Solaris where the second output mixes with
the first and thus the big check-script doesn't properly find the first
string in the output stream.
2005-04-18 05:46:10 +00:00
Daniel Stenberg
53280a196b keywords added 2005-04-16 23:15:19 +00:00
Daniel Stenberg
0bf9a5704b minor edits, report the test cases without keywords 2005-04-16 23:15:12 +00:00
Daniel Stenberg
8182d17ae1 starting to produce a summary in HTML 2005-04-16 12:43:32 +00:00
Daniel Stenberg
6c2f583f51 keywords added 2005-04-16 00:00:35 +00:00
Daniel Stenberg
a72eaddda3 initial tool to report info/keywords of the test cases 2005-04-15 23:48:58 +00:00
Daniel Stenberg
dc050e45df started adding "keywords" for each test, to better allow us to sum up what
kind of tests we have and how many tests that test certain features
2005-04-15 23:48:31 +00:00
Daniel Stenberg
2056a538b9 Two new slowdown tests for better testing of the FTP response reader function
when the response come in many small chunks.
2005-04-14 22:52:42 +00:00
Daniel Stenberg
cd1144dc24 make the ftp server support reply/servercmd, and make SLOWDOWN work, and
update the docs accordingly
2005-04-14 22:52:08 +00:00
Daniel Stenberg
d7b11d4c33 fix port number 2005-04-13 12:37:38 +00:00
Daniel Stenberg
67805b6dc5 requires OpenSSL, as our GnuTLS doesn't provide support for
CURLOPT_SSL_CTX_FUNCTION (yet).
2005-04-12 07:19:34 +00:00
Daniel Stenberg
0050ab2a3d support tests that requires 'OpenSSL' specificly 2005-04-12 07:18:48 +00:00
Daniel Stenberg
fb3c85ab2f fixed the 304 response-with-content-length problem reported by Cory Nelson 2005-04-08 16:59:13 +00:00
Daniel Stenberg
6a6c0e7a73 test time-conditioned FTP uploads 2005-04-05 21:07:27 +00:00
Daniel Stenberg
74816fed6c Hardeep Singh reported a problem doing HTTP POST with Digest. (It was actually
also affecting NTLM and Negotiate.) It turned out that if the server responded
with 100 Continue before the initial 401 response, libcurl didn't take care of
the response properly. Test case 245 and 246 added to verify this.
2005-04-03 22:46:25 +00:00
Daniel Stenberg
b4c9789d5f Test 245 was just added in an attempt to repeat Hardeep Singh's recent bug.
But this works just fine on my host. Plain HTTP POST using Digest.
2005-04-03 22:18:27 +00:00
Daniel Stenberg
f6b1173437 copyright this year 2005-03-31 14:42:28 +00:00
Daniel Stenberg
346992c366 Attempt to make this code more forgiving for systems that doesn't detect
the failed connect "immediately".
2005-03-31 14:10:54 +00:00
Daniel Stenberg
ab4086bc24 Updated the copyright year since changes have been this year. 2005-03-31 07:02:02 +00:00
Daniel Stenberg
677a74fa1b Made the server send data to the control/data connections using two dedicated
functions. This enabled me to add a function that automatically delays between
each byte, to proper test curl's ability to read FTP server responses sent in
many (small) chunks. See also upcoming libcurl fixes...
2005-03-29 09:09:58 +00:00
Daniel Stenberg
8a076d1dba Based on Augustus Saunders' comments and findings, the HTTP output auth
function was fixed to use the proper proxy authentication when multiple ones
were added as accepted. test 239 and test 243 were added to repeat the
problems and verify the fixes.
2005-03-28 22:19:31 +00:00
Daniel Stenberg
31443724c6 modified some log outputs, added comment about auth required as used in
test 154
2005-03-28 22:15:17 +00:00
Daniel Stenberg
0e7614919b can you spell copy and paste error for me loud and clear? ;-P 2005-03-22 19:58:00 +00:00
Daniel Stenberg
2bf72937d2 provide HTML and PDF versions of the man pages in the dist archive 2005-03-22 19:46:49 +00:00
Daniel Stenberg
3e5a32671c Make NTLM tests depend on the NTLM feature at not SSL, since the NTLM support
is no longer only present when built with SSL support.
2005-03-21 08:14:32 +00:00
Daniel Stenberg
d34f32b39e format mistake 2005-03-21 07:45:18 +00:00
Daniel Stenberg
5b6b6283f3 some additional debug output 2005-03-19 01:00:00 +00:00
Dan Fandrich
987cdebefb Fixed spelling of --runtestopts 2005-03-18 18:41:50 +00:00
Dan Fandrich
6b978db369 Netware builds don't use configure. 2005-03-18 18:03:38 +00:00
Daniel Stenberg
44f2024bab adjust to use plain 'make' even for cross-compiles if using configure-
style build
2005-03-18 09:21:25 +00:00
Dan Fandrich
5b3730feae Change the bogus address used in test237 to be more reliable when run
on a host with a buggy resolver that strips all but the bottom 8 bits of
each octet.  The resolved address in this case (192.0.2.127) is guaranteed
never to belong to a real host (see RFC3330).
2005-03-17 20:50:17 +00:00
Daniel Stenberg
bbba9d568f added descriptions 2005-03-17 12:16:24 +00:00
Daniel Stenberg
e8ddf84871 don't set TEST_F to blank when --runtestopts isn't used, as that will override
the default options set in the Makefile
2005-03-17 09:44:09 +00:00
Daniel Stenberg
67f04d2d5f support multiple error codes for a test case since some things just vary
between platforms
2005-03-17 08:17:48 +00:00
Daniel Stenberg
d26e932858 add new option 2005-03-17 08:04:08 +00:00
Daniel Stenberg
73b9d0840c add new file 2005-03-17 08:04:00 +00:00
Daniel Stenberg
2ea4326c40 its a start 2005-03-17 08:03:46 +00:00
Dan Fandrich
233237740d Added the --runtestsopts option to testcurl.pl to override the default
options used by runtests.pl during testing (useful for disabling valgrind).
2005-03-17 00:57:17 +00:00
Daniel Stenberg
4a6cc54eb5 check for the HTTPS server in a manner similar to how we check for the HTTP
server
2005-03-16 22:02:09 +00:00
Daniel Stenberg
9a5c21c16f test EPSV and PASV response handling when they get well-formated data back
but using illegal values
2005-03-15 12:33:08 +00:00
Daniel Stenberg
06ffb47ef2 initial man page attempt for testcurl.pl 2005-03-15 12:13:37 +00:00
Daniel Stenberg
562d2de303 Added lots of new command line options, made confsuffix get set based on
targetos only and not build os. Commented away the line that enables perl
warnings.
2005-03-15 07:35:36 +00:00
Dan Fandrich
677ddd6160 Make nonexistent host names absolute so tests will pass on machines
with a wildcard DNS search domain.
2005-03-15 04:04:50 +00:00
Daniel Stenberg
387aaba810 show LDFLAGS too 2005-03-14 12:26:29 +00:00
Daniel Stenberg
2f8085af15 David Houlder added --form-string 2005-03-12 19:39:27 +00:00
Daniel Stenberg
0e4e28fdda no more rewriting of the setup file 2005-03-11 00:20:30 +00:00
Daniel Stenberg
d26cfd5791 skip the test of "2094 Nov 6" for now, since the 64bit time_t systems return
different values for it...
2005-03-09 07:56:32 +00:00
Daniel Stenberg
702664e959 Dominick Meglio reported that using CURLOPT_FILETIME when transferring a FTP
file got a Last-Modified: header written to the data stream, corrupting the
actual data. This was because some conditions from the previous FTP code was
not properly brought into the new FTP code. I fixed and I added test case 520
to verify. (This bug was introduced in 7.13.1)
2005-03-08 08:09:14 +00:00
Daniel Stenberg
cb9bb31f7d test 236: FTP resume upload but denied access to remote file 2005-03-07 08:29:28 +00:00
Daniel Stenberg
7657186bf6 added valgrind.pm to the dist 2005-03-06 22:33:05 +00:00
Daniel Stenberg
aa47ac4c06 Added test case 235 that makes a resumed upload of a file that isn't present
on the remote side. This then converts the operation to an ordinary STOR
upload. This was requested/pointed out by Ignacio Vazquez-Abrams.

It also proved (and I fixed) a bug in the newly rewritten ftp code (and
present in the 7.13.1 release) when trying to resume an upload and the servers
returns an error to the SIZE command. libcurl then loops and sends SIZE
commands infinitely.
2005-03-04 23:52:06 +00:00
Dan Fandrich
9798432f56 Fixed some compiler warnings. Fixed a low incidence memory leak in the test server. 2005-02-24 18:54:23 +00:00
Daniel Stenberg
527f70e540 Curl_base64_decode() now returns an allocated buffer 2005-02-22 12:10:30 +00:00
Daniel Stenberg
b7721deb02 added test case 234 which is like 233 but uses --location-trusted instead so
thus the second request to the new host will use authentication fine
2005-02-19 22:33:06 +00:00
Daniel Stenberg
5ba188ab2d Ralph Mitchell reported a flaw when you used a proxy with auth, and you
requested data from a host and then followed a redirect to another
host. libcurl then didn't use the proxy-auth properly in the second request,
due to the host-only check for original host name wrongly being extended to
the proxy auth as well. Added test case 233 to verify the flaw and that the
fix removed the problem.
2005-02-18 23:53:07 +00:00
Daniel Stenberg
160d6b26b0 Moved out the valgrind report parser to valgrind.pm, to make it easier to
test it outside the test suite. Now we also disable valgrind usage if libcurl
was built shared, as then valgrind is only testing the wrapper-script running
shell which is pointless.
2005-02-10 08:50:33 +00:00
Daniel Stenberg
6a2e21ec8c FTP code turned into state machine. Not completely yet, but a good start.
The tag 'before_ftp_statemachine' was set just before this commit in case
of future need.
2005-02-09 13:06:40 +00:00
Daniel Stenberg
6a99ab098c Bugfixed the parser that scans the valgrind report outputs. I noticed that it
previously didn't detect and report the "Conditional jump or move depends on
uninitialised value(s)" error.

When I fixed this, I caught a few curl bugs with it. And then I had to spend
time to make the test suite IGNORE these errors when OpenSSL is used since it
produce massive amounts of valgrind warnings (but only of the "Conditional..."
kind it seems).

So, if a test that requires SSL is run, it ignores the "Conditional..."
errors, and you'll get a "valgrind PARTIAL" output instead of "valgrind OK".
2005-01-30 12:56:36 +00:00
Daniel Stenberg
b03adde546 properly mark tests as requiring feature 'SSL' 2005-01-30 12:53:05 +00:00
Daniel Stenberg
0859cd2444 when using valgrind, include a much longer stack trace 2005-01-29 13:06:31 +00:00
Daniel Stenberg
54b02ecf09 adjusted to the moved unlock of the DNS entry 2005-01-28 22:22:59 +00:00
Daniel Stenberg
cf38a4c470 test the EPRT/LPRT/PORT somewhat more 2005-01-27 23:03:02 +00:00
Daniel Stenberg
aacc79a3a3 Use the same work-around for the memdebug stuff as in the command line client,
to allow the contents of the env var decide the file name.
2005-01-27 22:40:56 +00:00
Daniel Stenberg
289a42f050 Make the debug build get the debug dump file path from the environment
variable to allow the test suite to better control where it ends up.
2005-01-27 15:51:03 +00:00
Daniel Stenberg
ade1e79b37 verify a part of the PORT line 2005-01-27 12:59:40 +00:00
Daniel Stenberg
2415724d5f Make the server ignore the given PORT address, to make it possible to test
curl's -P option easier.
2005-01-26 23:18:31 +00:00
Daniel Stenberg
177dbc7be0 Ian Ford asked about support for the FTP command ACCT, and I discovered it is
present in RFC959... so now (lib)curl supports it as well. --ftp-account and
CURLOPT_FTP_ACCOUNT set the account string. (The server may ask for an account
string after PASS have been sent away. The client responds with "ACCT [account
string]".) Added test case 228 and 229 to verify the functionality. Updated
the test FTP server to support ACCT somewhat.
2005-01-25 22:13:12 +00:00
Daniel Stenberg
f2e71edcbd A minor "syntax error" in numerous test files corrected 2005-01-25 21:45:03 +00:00