Commit Graph

877 Commits

Author SHA1 Message Date
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 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
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 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
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 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
Quinn Slack 59cf93ccdb TLS-SRP: support added when using GnuTLS 2011-01-19 20:35:02 +01: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 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 9e46318a03 unittest: verify curl_strequal 2011-01-04 16:13:58 +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 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
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
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
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
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 bbb6eb3aaa test1119: verify symbols-in-versions 2010-11-03 11:23:54 +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
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
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 ecb3fe63d7 gopher tests: use sws and adjusted to more standard style 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
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