Commit Graph

549 Commits

Author SHA1 Message Date
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 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
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 de17f4436e Changed error return codes to match update code. 2007-04-09 18:24:56 +00:00
Dan Fandrich c1ab3e2d59 Enabled the ssh tests 600-609. 2007-04-05 19:28:33 +00:00
Dan Fandrich 0969a96732 Whoops--didn't mean to enable the ssh tests quite yet. 2007-04-04 04:57:40 +00:00
Dan Fandrich 27d2d78059 Added more SSH tests (left disabled for now). 2007-04-04 00:48:37 +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
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
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 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
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 a20a6f67c5 Fixed the test case to use a truly invalid urlglob range. 2007-03-16 04:34:53 +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 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 bfd6474f6b stricter newline policy 2007-03-03 02:06:44 +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
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
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
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
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
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 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 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 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 deef85ca9a Update protocol verification end of lines 2006-11-02 01:21:28 +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
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
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
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 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 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 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 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
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
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 dc9f154823 added missing test 2006-08-31 22:18:08 +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
Daniel Stenberg c10d15aa0f test case 277 - HTTP RFC1867-type formposting with custom Content-Type 2006-07-27 22:44:56 +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
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
Daniel Stenberg 2bd3033f68 NTLM2 session response support 2006-06-07 14:14:04 +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 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 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 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
Dan Fandrich d29147565c Fixed test case 57 (KNOWN_BUG #18) 2006-02-22 23:55:28 +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 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 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 7e845e7cfd Added FTP_SKIP_PASV_IP and --ftp-skip-pasv-ip 2005-09-04 05:16:06 +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 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
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