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

2754 Commits

Author SHA1 Message Date
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