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

782 Commits

Author SHA1 Message Date
Daniel Stenberg
49c6d7e32d Added test 1097 to verify the bug Axel Kuhn epidox posted on March 3 2009
on curl-users, it is also added to DISABLED since I don't have time to work
on it further right now.
2009-03-03 13:25:19 +00:00
Daniel Stenberg
7f22da5230 verify that a 550-response for a RETR returns 78 but also that the control
connection is kept alive afterwards
2009-02-19 13:47:06 +00:00
Daniel Stenberg
bdd4294e79 - Craig A West brought us: libcurl now defaults to do CONNECT with HTTP
version 1.1 instead of 1.0 like before. This change also introduces the new
  proxy type for libcurl called 'CURLPROXY_HTTP_1_0' that then allows apps to
  switch (back) to CONNECT 1.0 requests. The curl tool also got a --proxy1.0
  option that works exactly like --proxy but sets CURLPROXY_HTTP_1_0.

  I updated all test cases cases that use CONNECT and I tried to do some using
  --proxy1.0 and some updated to do CONNECT 1.1 to get both versions run.
2009-02-02 16:19:23 +00:00
Daniel Stenberg
82ca52713b - Alexey Borzov filed bug report #2535504
(http://curl.haxx.se/bug/view.cgi?id=2535504) pointing out that realms with
  quoted quotation marks in HTTP Digest headers didn't work. I've now added
  test case 1095 that verifies my fix.
2009-01-26 13:19:03 +00:00
Dan Fandrich
ddd3fe5948 Improved the title and keywords 2009-01-21 04:46:13 +00:00
Dan Fandrich
5591550167 Fixed a couple more locale-dependent toupper conversions, mainly for
clarity.  This does fix one problem that causes ;type=i FTP URLs
to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is
used (test case 561)

Added tests 561 and 1092 through 1094 to test various combinations
of ;type= and ;mode= URLs that could potentially fail in the Turkish
locale.
2009-01-21 04:42:47 +00:00
Dan Fandrich
14b6cc4e22 Always use nocheck="yes" for consistency 2009-01-07 21:57:26 +00:00
Gunter Knauf
aa32f61ce7 sync'd address with other tests. 2008-12-30 15:33:09 +00:00
Gunter Knauf
8266727062 trial with an address which has a valid domain part but invalid host to avoid dns redirections. 2008-12-30 09:16:38 +00:00
Dan Fandrich
4607dfe257 Mention what makes this test special 2008-12-11 03:01:38 +00:00
Dan Fandrich
01d6133bd7 Added test cases 1089 and 1090 to test --write-out after a redirect to
test a report that the size didn't work, but these test cases pass.
2008-12-09 21:59:57 +00:00
Daniel Stenberg
18371aaff9 - Fred Machado posted about a weird FTP problem on the curl-users list and when
researching it, it turned out he got a 550 response back from a SIZE command
  and then I fell over the text in RFC3659 that says:

   The presence of the 550 error response to a SIZE command MUST NOT be taken
   by the client as an indication that the file cannot be transferred in the
   current MODE and TYPE.

  In other words: the change I did on September 30th 2008 and that has been
  included in the last two releases were a regression and a bad idea. We MUST
  NOT take a 550 response from SIZE as a hint that the file doesn't exist.
2008-12-08 20:20:51 +00:00
Dan Fandrich
ecc6f550eb Added tests 1087 and 1088 to test Basic authentication on a redirect
with and without --location-trusted
2008-11-25 23:30:53 +00:00
Dan Fandrich
0fa14c8662 Fully clean up after test 608 so that it can be run twice in succession. 2008-11-24 22:06:43 +00:00
Daniel Stenberg
ba9f8c674c restored from my messy previous commit mistake 2008-11-21 07:47:31 +00:00
Daniel Stenberg
40e8b4e527 - I removed the default use of "Pragma: no-cache" from libcurl when a proxy is
used. It has been used since forever but it was never a good idea to use
  unless explicitly asked for.
2008-11-19 22:00:14 +00:00
Dan Fandrich
d1f063c62d Shortened some FTP responses to allow the timeout to be reduced by a second
while still causing a timeout during the data phase.
2008-11-13 01:45:59 +00:00
Dan Fandrich
fb8870297d Give the test an extra second to run so it passes on slow machines 2008-11-12 01:04:27 +00:00
Daniel Stenberg
d07d1a6ef8 Added test case 560:
This test was added after the HTTPS-using-multi-interface with OpenSSL
regression of 7.19.1 to hopefully prevent this embarassing mistake from
appearing again... Unfortunately the bug wasn't triggered by this test, which
presumably is because the connect to a local server is too fast/different
compared to the real/distant servers we saw the bug happen with.
2008-11-11 21:59:25 +00:00
Daniel Stenberg
8bdd60fa71 Added missing <keywords> 2008-11-11 21:58:41 +00:00
Dan Fandrich
2903a5c050 Added test 1086 to test a timeout the occurs during an FTP data transfer. 2008-11-06 00:13:18 +00:00
Yang Tse
92f3b3895e test #558 tests internal hash create/destroy
test #559 tests internal hash create/add/destroy
2008-10-27 20:01:58 +00:00
Yang Tse
310d842b70 Skip test #558 when libcurl is built with hidden symbols 2008-10-27 14:02:50 +00:00
Yang Tse
dc289aa4fa convert test #558 into something more interesting, attempting
now to minimally exercise some internal hash routines.
2008-10-26 21:40:20 +00:00
Yang Tse
6db8f53445 test #558 verifies loop operation using malloc() and free() 2008-10-26 03:03:29 +00:00
Dan Fandrich
9391d980c3 Tweaked a few tests to test proper Turkish locale handling 2008-10-23 01:53:27 +00:00
Dan Fandrich
7ff38c14a9 Fixed some problems with SFTP range support to fix test cases 634 through 637. 2008-10-21 07:10:25 +00:00
Dan Fandrich
7ded272b94 Added missing HTTP proxy and other keywords 2008-10-16 21:34:34 +00:00
Dan Fandrich
a102c2c22b Don't rely on shell support to run multiple precheck tests 2008-10-13 20:41:02 +00:00
Dan Fandrich
d74d3fe851 Ensure the IPv6 stack is operational before running this test (other tests
use the startup of the IPv6 test server as a substitute check for this).
2008-10-12 05:27:26 +00:00
Dan Fandrich
5ecff1e4c3 Added HTTP as a required feature 2008-10-09 18:53:17 +00:00
Dan Fandrich
f6d80d66a2 Added tests 633 through 637 to test the new file range support for SFTP.
All but the first test cause an infinite loop or other failure and so
are added to DISABLED.
2008-10-09 05:16:06 +00:00
Daniel Stenberg
830018aa38 - Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified and
fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing:

  Any subsequent transfer with a redirect leaks memory, eventually crashing
  the process potentially.

  Any subsequent transfer WITHOUT a redirect causes the most recent redirect
  that DID occur on some previous transfer to still be reported.
2008-10-08 22:01:23 +00:00
Dan Fandrich
8dfddd279b Added tests 1082 through 1085 to test symbolic --interface parameters 2008-10-08 21:46:55 +00:00
Dan Fandrich
11a8a25528 Created test cases 1080 and 1081 to reproduce a problem of
CURLINFO_REDIRECT_URL leaking memory and returning incorrect results when
two URLs are requested. Reported by vmpdemo in bug #2152270
2008-10-08 03:32:10 +00:00
Dan Fandrich
95456b8e78 Added const to some pointer variables 2008-10-08 01:17:51 +00:00
Dan Fandrich
b9ce871463 Changed the handling of read/write errors in Curl_perform() to allow a
a fresh connection to be made in such cases and the request retransmitted.
This should fix test case 160.  Added test case 1079 in an attempt to
test a similar connection dropping scenario, but as a race condition, it's
hard to test reliably.
2008-10-07 23:15:02 +00:00
Dan Fandrich
d3fdbe48ae Added "HTTP proxy" keyword 2008-09-30 17:18:27 +00:00
Daniel Stenberg
038542ea3e - The libcurl FTP code now returns CURLE_REMOTE_FILE_NOT_FOUND error when SIZE
gets a 550 response back for the cases where a download (or NOBODY) is
  wanted. It still allows a 550 as response if the SIZE is used as part of an
  upload process (like if resuming an upload is requested and the file isn't
  there before the upload). I also modified the FTP test server and a few test
  cases accordingly to match this modified behavior.
2008-09-30 09:51:58 +00:00
Dan Fandrich
372203f1fa Added "HTTP proxy" and "proxytunnel" keywords where applicable 2008-09-29 22:44:04 +00:00
Daniel Stenberg
42224594b6 remove the entire comment now when we no longer set TZ 2008-09-23 11:02:56 +00:00
Daniel Stenberg
d369a2b775 - Introducing Jamie Lokier's function for date to epoch conversion used in the
date parser function. This makes our function less dependent on system-
  provided functions and instead we do all the magic ourselves. We also no
  longer depend on the TZ environment variable.
2008-09-23 11:00:01 +00:00
Daniel Stenberg
391e8afd1f - Made the SOCKS code use the new Curl_read_plain() function to fix the bug
Markus Moeller reported: http://curl.haxx.se/mail/archive-2008-09/0016.html

- recv() errors other than those equal to EAGAIN now cause proper
  CURLE_RECV_ERROR to get returned. This made test case 160 fail so I've now
  disabled it until we can figure out another way to exercise that logic.
2008-09-22 23:12:00 +00:00
Daniel Stenberg
de48e4e4df better description 2008-09-22 21:33:18 +00:00
Dan Fandrich
974145f61c Changed the test data file so it passes an XML syntax check 2008-09-15 22:35:09 +00:00
Dan Fandrich
c3d871aef4 Added HTTP 1.0 downgrade tests with proxies 2008-09-06 18:24:04 +00:00
Dan Fandrich
91ff938035 Improved the logic the decides whether to use HTTP 1.1 features or not in a
request.

Detect cases where an upload must be sent chunked and the server supports
only HTTP 1.0 and return CURLE_UPLOAD_FAILED.
2008-09-05 17:58:53 +00:00
Daniel Stenberg
18110b519c - Martin Drasar provided the CURLOPT_POSTREDIR patch. It renames
CURLOPT_POST301 (but adds a define for backwards compatibility for you who
  don't define CURL_NO_OLDIES). This option allows you to now also change the
  libcurl behavior for a HTTP response 302 after a POST to not use GET in the
  subsequent request (when CURLOPT_FOLLOWLOCATION is enabled). I edited the
  patch somewhat before commit. The curl tool got a matching --post302
  option. Test case 1076 was added to verify this.
2008-09-05 16:13:20 +00:00
Daniel Stenberg
780f13db30 Stefan Krause's mail to curl-library at 03 Sep 2008 made me add these two
new date strings to get tested too.
2008-09-05 08:15:21 +00:00
Dan Fandrich
85a79f9d67 Added tests 1071 through 1074 to test automatic downgrading from HTTP 1.1
to HTTP 1.0 upon receiving a response from the HTTP server.  Tests 1072
and 1073 are similar to test 1069 in that they involve the impossible
scenario of sending chunked data to a HTTP 1.0 server.  All these currently
fail and are added to DISABLED.

Added test 1075 to test --anyauth with Basic authentication.
2008-08-29 23:42:39 +00:00
Daniel Stenberg
d24465b79a test 1070 added 2008-08-29 10:48:27 +00:00
Daniel Stenberg
c67a99ff27 - When libcurl was doing a HTTP POST and the server would respond with
"Connection: close" and actually close the connection after the
  response-body, libcurl could still have outstanding data to send and it
  would not properly notice this and stop sending. This caused weirdness and
  sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222

  Note that there are still reasons to consider libcurl's behavior when
  getting a >= 400 response code while sending data, as Craig Perras' note
  "http upload: how to stop on error" specifies:
  http://curl.haxx.se/mail/archive-2008-08/0138.html
2008-08-29 10:47:59 +00:00
Daniel Stenberg
e138ae5ec9 - I'm abandoning the system with the web site mirrors (but keeping download
files bing mirrored) and thus I've changed the URL in the cookiejar header
  to no longer use curlm.haxx.se but instead use the main site curl.haxx.se
2008-08-28 11:35:54 +00:00
Dan Fandrich
8ce78ca488 Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to set
the HTTP method to GET (or HEAD) when given a value of 0.
2008-08-28 06:28:07 +00:00
Dan Fandrich
370c3afc71 Added test 1069 to test PUT from stdin without content length. It fails
in a similar manner to test 1065 so is added to DISABLED.
2008-08-28 02:24:46 +00:00
Dan Fandrich
93357ef017 Added test 1069 to test PUT from stdin without content length. It fails
in a similar manner to test 1065 so is added to DISABLED.
2008-08-28 02:18:44 +00:00
Dan Fandrich
753592cc70 Added test case 1068 to do a simple HTTP PUT from stdin 2008-08-28 02:03:54 +00:00
Dan Fandrich
fc09d10560 Added multi keyword 2008-08-26 20:21:59 +00:00
Dan Fandrich
59b2e3ea4a Added multi keyword 2008-08-26 20:11:12 +00:00
Daniel Stenberg
b34390017b added test case 1067 to verify --referer "firstone.html;auto" 2008-08-23 21:27:58 +00:00
Dan Fandrich
e3ad6d2bd1 Fixed a problem when --dump-header - was given with more than one URL,
which caused an error when the second header was dumped due to stdout
being closed.  Added test case 1066 to verify.  Also fixed a potential
problem where a closed file descriptor might be used for an upload
when more than one URL is given.
2008-08-22 22:57:25 +00:00
Yang Tse
95cef39def Test case 557 now also verifies signed and unsigned int formatting. 2008-08-21 05:19:40 +00:00
Yang Tse
3e0b6a7d1f Update test case 557 2008-08-18 18:52:13 +00:00
Yang Tse
2f71461b29 Added test case 557 to verify libcurl's internal curl_m*printf() functions
formatting functionality when handling signed and unsigned longs, as well as
our curl_off_t data type.
2008-08-18 09:58:08 +00:00
Dan Fandrich
a923d8541c Added test case 1065 to test a PUT with a single file but two URLs. This
was discovered to be problematic while investigating an incident reported by
Von back in May.  curl in this case doesn't include a Content-Length: or
Transfer-Encoding: chunked header which is illegal. This test case is
added to DISABLED until a solution is found.
2008-08-15 19:18:46 +00:00
Dan Fandrich
527a5f0980 Added Range keyword 2008-08-14 19:18:18 +00:00
Dan Fandrich
6e878d2ca4 Added test 1063 to test an invalid large range on a file: 2008-08-14 19:18:01 +00:00
Dan Fandrich
7eab7fa353 Fixed a buffer overflow problem in Curl_proxyCONNECT that could occur
when a server responded with long headers and data.  Luckily, the buffer
overflowed into another unused buffer, so no actual harm was done.
Added test cases 1060 and 1061 to verify.
2008-08-12 20:07:52 +00:00
Dan Fandrich
e8e8177e9d Added HTTP CONNECT keywords 2008-08-11 23:16:48 +00:00
Dan Fandrich
f1fe04245a Fixed a boundary condition error in ftp_readresp() whereby a non-terminal
line of a multiline FTP response whose last byte landed exactly at the end
of the BUFSIZE-length buffer would be treated as the terminal response
line.  The following response code read in would then actually be the
end of the previous response line, and all responses from then on would
correspond to the wrong command. Test case 1062 verifies this.

Stop closing a never-opened ftp socket.
2008-08-11 23:16:08 +00:00
Dan Fandrich
fa001f27a5 Made ftp a required feature 2008-08-08 07:51:50 +00:00
Dan Fandrich
40b2e06a7f Added test1059 to test the FTP proxy tunnel problem fixed July 11. 2008-08-08 07:26:30 +00:00
Daniel Stenberg
3a499099af - Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and
proved how PUT and POST with a redirect could lead to a "hang" due to the
  data stream not being rewound properly when it had to in order to get sent
  properly (again) to the subsequent URL. This is now fixed and these test
  cases are no longer disabled.
2008-08-04 22:00:22 +00:00
Daniel Stenberg
8d012181b0 - Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
with -C - sent garbage in the Content-Range: header. I fixed this problem by
  making sure libcurl always sets the size of the _entire_ upload if an app
  attemps to do resumed uploads since libcurl simply cannot know the size of
  what is currently at the server end. Test 1041 is no longer disabled.
2008-08-03 22:20:58 +00:00
Dan Fandrich
6838fb32af Improved title 2008-08-03 05:13:05 +00:00
Dan Fandrich
f27299dc3b Added tests 1057 and 1058 to test FTP and HTTPS transfers with ranges
relative to end of file.
2008-08-01 22:12:34 +00:00
Dan Fandrich
9251dd7b24 User names embedded in proxy URLs without a password were parsed
incorrectly--the host name is treated as part of the user name and the
port number becomes the password.  This can be observed in test 279
(was KNOWN_ISSUE #54).
2008-08-01 02:09:08 +00:00
Dan Fandrich
b13b9f3331 Fixed keyword 2008-07-31 05:00:02 +00:00
Dan Fandrich
108e584983 Added keywords 2008-07-31 02:51:44 +00:00
Dan Fandrich
f3b4071209 Added test of IPv6 scope handling 2008-07-31 02:38:51 +00:00
Dan Fandrich
bc649593e4 Added test cases 1052 through 1055 to test uploading data from files
during redirects.  Test cases 1052 and 1055 show problems (maybe the same
root cause as 1051) and are disabled.
2008-07-30 21:04:44 +00:00
Dan Fandrich
1f26ea4a85 Added test case 1051 to test Location: following with PUT, as reported
by Ben Sutcliffe.  The test when run manually shows a problem in curl,
but the test harness web server doesn't run the test correctly so it's
disabled for now.
2008-07-30 07:24:59 +00:00
Dan Fandrich
adc032e7d8 Return an error code when extra files are found in filecheck: 2008-07-29 18:57:01 +00:00
Dan Fandrich
4ff37a4ed1 Added test case 1050 to test --ftp-port with an IPv6 address.
Made --interface tests less restrictive on host address.
2008-07-29 01:05:28 +00:00
Dan Fandrich
f042a7419d Added test cases 1045 through 1049 as simple tests of --interface using the
localhost interface.
2008-07-28 18:39:32 +00:00
Dan Fandrich
e06944438a Added test 1044 to test large file support in ftp with -I. 2008-07-26 20:09:36 +00:00
Dan Fandrich
ed2dbefa73 Fixed the XML syntax of a few test files. 2008-07-17 22:39:23 +00:00
Dan Fandrich
aa4a7471dd Added test1042 and test1043 to test -C - on HTTP. 2008-07-15 04:12:15 +00:00
Dan Fandrich
69a03ce23c Added test1040 and test1041 to test -C - on HTTP. Test 1041 failed so it's
added to DISABLED.
2008-07-15 03:36:38 +00:00
Dan Fandrich
8d49a8f278 Added test cases 1038 and 1039 to test Adrian Kreher's report that ftp
uploads with -C - didn't resume properly, but the tests pass.
2008-07-11 05:08:06 +00:00
Dan Fandrich
bbb1b99ce1 Added tests 1036 and 1037 to verify resumed ftp downloads with -C - 2008-07-10 06:09:03 +00:00
Dan Fandrich
a25959184e Added test cases 1034 & 1035 to test IDN name conversion failures. 2008-07-07 23:52:52 +00:00
Daniel Stenberg
0e5da5b8bc - Scott Barrett provided a test case for a segfault in the FTP code and the
fix for it. It occured when you did a FTP transfer using
  CURLFTPMETHOD_SINGLECWD and then did another one on the same easy handle but
  switched to CURLFTPMETHOD_NOCWD. Due to the "dir depth" variable not being
  cleared properly.  Scott's test case is now known as test 539 and it
  verifies the fix.
2008-07-07 20:37:07 +00:00
Daniel Stenberg
82412f218f Phil Blundell provided a fix for libcurl's treatment of unexpected 1xx
response codes. Previously libcurl would hang on such occurances. I added
test case 1033 to verify.
2008-07-03 08:47:53 +00:00
Daniel Stenberg
d92945bb8a - Eduard Bloch filed the debian bug report #487567
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that
  libcurl used Content-Range: instead of Range when doing a range request with
  --head (CURLOPT_NOBODY). This is now fixed and test case 1032 was added to
  verify.
2008-06-22 20:38:16 +00:00
Dan Fandrich
a837bd08b0 Edited some test keywords for consistency 2008-06-21 17:56:48 +00:00
Dan Fandrich
5304b13365 Added SSH failure test cases 628-632 2008-06-19 00:18:58 +00:00
Dan Fandrich
024c7641a9 Added IPv6 keywords for some more tests that require IPv6 networking support 2008-06-12 23:50:57 +00:00
Daniel Stenberg
5abfdc0140 - curl the tool now deals with its command line options somewhat differently!
All boolean options (such as -O, -I, -v etc), both short and long versions,
  now always switch on/enable the option named. Using the same option multiple
  times thus make no difference. To switch off one of those options, you need
  to use the long version of the option and type --no-OPTION. Like to disable
  verbose mode you use --no-verbose!

- Added --remote-name-all to curl, which if used changes the default for all
  given URLs to be dealt with as if -O is used. So if you want to disable that
  for a specific URL after --remote-name-all has been used, you muse use -o -
  or --no-remote-name.
2008-06-08 20:53:49 +00:00
Daniel Stenberg
930a45e7a9 - Added CURLINFO_PRIMARY_IP as a new information retrievable with
curl_easy_getinfo. It returns a pointer to a string with the most recently
  used IP address. Modified test case 500 to also verify this feature. The
  implementing of this feature was sponsored by Lenny Rachitsky at NeuStar.
2008-06-06 17:33:35 +00:00