Commit Graph

507 Commits

Author SHA1 Message Date
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
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
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
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 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
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
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
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
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 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 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 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
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
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 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
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 4ae2f77ba1 test1411: verify SMTP without SIZE support 2012-09-04 19:40:46 +02:00
Sara Golemon 09d9dd8873 Unit test for curl_multi_wait() 2012-09-01 23:27:11 +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
Joe Mason 24c43e9d34 Add tests of auth retries 2012-08-03 17:01:54 -04: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
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 6c09ffaf46 tests: add five more Metalink test cases 2012-06-27 13:16:01 +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
Yang Tse b193ba8a02 tests: add six Metalink test cases 2012-06-21 18:32:31 +02:00
Tatsuhiro Tsujikawa 7292486ec3 tests: Added Metalink test case # 2005 2012-06-21 04:16: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 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
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
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
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