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

1026 Commits

Author SHA1 Message Date
Marc Hoersken
b3d72a95be metalink tests: Updated expected output to include hash name 2012-09-17 07:35:11 +02: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
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
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
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
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
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
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
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
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
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
Tatsuhiro Tsujikawa
7292486ec3 tests: Added Metalink test case # 2005 2012-06-21 04:16:53 +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
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
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
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
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