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

2164 Commits

Author SHA1 Message Date
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
Guenter Knauf
f37affab8c Trial to fix win32 autobuilds.
It seems that its time to look at some better ideas for the win32
non-configure builds; probably a prebuild target which copies
config-win32.h to curl_config.h and appends also then feature
defines like USE_ARES.
2010-08-20 02:33:29 +02:00
Dan Fandrich
ebbe694e78 Removed a C99ism & made an array const 2010-08-18 22:16:46 -07: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
Julien Chaffraix
6b490ed33c progress: callback for POSTs less than MAX_INITIAL_POST_SIZE
Add a call to Curl_pgrsSetUploadSize in this case valided by a test
case.

Reported by: Никита Дорохин.
Bug: http://curl.haxx.se/mail/lib-2010-04/0173.html
2010-08-16 22:56:43 +02:00
Dan Fandrich
4d703ee100 Make the LD_PRELOAD path absolute in the tests that use it
In some situations, libtool will change directories and perform
a link step before executing the libtest test app. Since
LD_PRELOAD is in effect for this entire process, the path to the
binary must be absolute so it will be valid no matter in which
directory the app is running.
2010-08-16 13:36:51 -07:00
Dan Fandrich
9f4a174698 Clear stdout and stderr files on each test run
This allows a test to be run several times in the same test
session even when the -k option is given.
2010-08-16 12:09:18 -07:00
Dan Fandrich
72da720b4a Reset environment variables before starting servers
Otherwise, variables from tests could affect the servers
themselves.
2010-08-13 22:14:26 -07:00
Daniel Stenberg
a43201e578 runtests: clear old setenv remainders before test
Due to the layout of the singletest function there are situations where
it returns before it clears the environment variables that were
especially set for the single specific test case. That could lead to
subsequent tests getting executed with environment variables sticking
around from a previous test which could lead to badness.

This change makes sure to clear all custom variables that may be laying
around from a previous round, before running a test case.

Reported by: Kamil Dudka
Bug: http://curl.haxx.se/mail/lib-2010-08/0141.html
2010-08-11 23:12:39 +02:00
Daniel Stenberg
37201e3c36 callbacks: acknowledge progress callback error returns
When the progress callback is called during the TCP connection, an error
return would accidentally not abort the operation as intended but would
instead be counted as a failure to connect to that particular IP and
libcurl would just continue to try the next. I made singleipconnect()
and trynextip() return CURLcode properly.

Added bonus: it corrected the error code for bad --interface usages,
like tested in test 1084 and test 1085.

Reported by: Adam Light
Bug: http://curl.haxx.se/mail/lib-2010-08/0105.html
2010-08-10 23:16:08 +02:00
Guenter Knauf
ff26895b5c Added msys Perl since git for Win32 comes with own Perl which identifies as msys. 2010-08-10 07:10:57 +02:00
Guenter Knauf
7115245f88 Make testcurl.pl Watcom-aware. 2010-08-10 04:09:35 +02:00
Daniel Stenberg
dc2157a087 parse_remote_port: fix ;type= URL suffix over HTTP proxy
Test 563 is enabled now and verifies that the combo FTP type=A URL,
CURLOPT_PORT set and proxy work fine. As a bonus I managed to remove the
somewhat odd FTP check in parse_remote_port() and instead converted it
to a better and more generic 'slash_removed' struct field. Checking the
->protocol field isn't right since when an FTP:// URL is sent over a
HTTP proxy, the protocol is HTTP but the URL was handled by the FTP code
and thus slash_removed is set TRUE for this case.
2010-08-10 00:56:45 +02:00
Yang Tse
b24e872502 build: don't build libhostname unless shared libcurl is built 2010-08-09 09:33:53 +02:00
Yang Tse
50a1d5ee1c build: libhostname and chkhostname linkage adjustments followup 2010-08-09 05:45:11 +02:00
Yang Tse
c49e9683b8 build: libhostname linkage adjustments followup 2010-08-08 02:59:55 +02:00
Yang Tse
af4eae77ac build: chkhostname build adjustments followup 2010-08-07 17:39:36 +02:00
U-D5B1PQ1J\Administrador
7d342c723c build: allow NTLM tests to run on more build configurations 2010-08-07 15:03:54 +02:00
Yang Tse
59bad26bb2 build: ensure that libhostname doesn't get installed 2010-08-06 18:40:13 +02:00
Yang Tse
1cbe66fbc8 build: remove unused file 2010-08-04 18:54:45 +02:00
Daniel Stenberg
687df5c8c3 sethostname: provide local prototype for gethostname
This is only to avoid warnings on some systems.
2010-08-02 22:51:24 +02:00
Daniel Stenberg
d296dd4ee8 sethostname: avoid including unistd.h to duck for warnings 2010-07-30 22:32:57 +02:00
Daniel Stenberg
04eff9beb9 sethostname: ISO C does not allow extra `;' outside of a function 2010-07-30 22:26:19 +02:00
Kamil Dudka
b5c3feda17 NTLM tests: boost coverage by forcing the hostname
A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM
test-cases to override the system implementation of gethostname().  It
makes it possible to test the NTLM authentication for exact match, and
this way test the implementation of MD4 and DES.

If LD_PRELOAD doesn't work, a debug build willl also workk as debug
builds are now made to prefer a specific environment variable and will
then return that content as host name instead of the actual one.

Kamil wrote the bulk of this, Daniel Stenberg polished it.
2010-07-30 00:51:24 +02:00
Kamil Dudka
d63bdba097 test575: do not fail with threaded DNS resolver 2010-06-17 17:07:15 +02:00
Yang Tse
12043e3c9c fix compiler warning: external declaration in primary source file 2010-05-31 16:58:24 +02:00
Yang Tse
a324fa7b97 fix compiler warning: variable was set but never used 2010-05-31 16:51:36 +02:00
Kamil Dudka
35955179c6 CURL_LLONG_MAX: avoid constant overflow
... when (CURL_SIZEOF_CURL_OFF_T == 4)
2010-05-29 21:23:18 +02:00
Daniel Stenberg
4b96e5c70f test1115: verify that unexpected 1xx responses work fine 2010-05-28 00:55:11 +02:00
Kamil Dudka
75743b009b lib577: avoid redefinition of ERROR 2010-05-28 00:50:11 +02:00
Kamil Dudka
01459828ef test313: a new test for CRL support 2010-05-27 23:45:18 +02:00
Kamil Dudka
99179da4cc tests/certs: re-generated because of lost pass-phrase 2010-05-27 23:39:54 +02:00
Kamil Dudka
645bdd837a tests/certs/scripts: generate also CRL
... and make it possible to do so without any user interaction
2010-05-27 23:33:19 +02:00
Tor Arntsen
eadeb5bd9a lib573: do not compare double for exact match 2010-05-27 20:20:08 +02:00
Tor Arntsen
22f3b01478 Test 573: Use correct type for CURLINFO_CONNECT_TIME
curl_easy_getinfo() called with a pointer to long instead of double
would sigbus on RISC processors (e.g. MIPS) due to wrong alignment
of pointer address.
2010-05-20 17:12:53 +02:00
Kamil Dudka
2ffe834bff ftp wildcard: a new option CURLOPT_FNMATCH_DATA 2010-05-16 02:52:33 +02:00
Dan Fandrich
43b816538f Fixed test 577 to work when --enable-hidden-symbols is configured 2010-05-14 14:42:58 -07:00
Dan Fandrich
a82c5a39c4 Added directories.pm to the source tar ball 2010-05-14 13:31:07 -07:00
Pavel Raiskup
0825cd80a6 FTP: WILDCARDMATCH/CHUNKING/FNMATCH added 2010-05-12 23:17:51 +02:00
Daniel Stenberg
adaf87530d multi interface: missed storing connection time
Dirk Manske reported a regression. When connecting with the multi
interface, there were situations where libcurl wouldn't store
connect time correctly as it used to (and is documented to) do.

Using his fine sample program we could repeat it, and I wrote up
test case 573 using that code. The problem does not easily show
itself using the local test suite though.

The fix, also as suggested by Dirk, is a bit on the ugly side as
it adds yet another call to Curl_verboseconnect() and setting the
TIMER_CONNECT time.  That situation is subject for some closer
inspection in the future.
2010-05-07 23:49:29 +02:00
Hoi-Ho Chan
51427e1947 PolarSSL: initial support added
This is Hoi-Ho Chan's patch with some minor fixes by me. There
are some potential issues in this, but none worse than we can
sort out on the list and over time.
2010-05-05 22:30:46 +02:00
Daniel Stenberg
7f616eb513 test: enable valgrind for 604, seems to work 2010-04-28 23:27:31 +02:00
Paul Howarth
fe818c8076 add 1s post-command delay to tests 513 and 514
addressing http://curl.haxx.se/mail/lib-2009-12/0031.html
2010-04-28 23:21:59 +02:00
Kamil Dudka
d487ade72c test536: do not fail with threaded DNS resolver
Also tweaked comments in certain examples using curl_multi_fdset().
2010-04-24 12:14:21 +02:00
monnerat
4bfe07640c Implement SMTP authentication 2010-04-19 11:16:30 +02:00
Dan Fandrich
f38510f4b5 Eliminated an unlikely race condition in some tests.
Based on a patch from the FreeBSD ports by Peter Pentchev.
2010-04-15 10:51:03 -07:00
Daniel Stenberg
5a814f6f2c ignore files generated by 'maketgz' 2010-04-14 17:12:34 +02:00
Guenter Knauf
92b387f57a Use correct directory for c-ares git pull
Signed-off-by: Tor Arntsen <tor@spacetec.no>
2010-04-13 22:55:33 +02:00
Guenter Knauf
9c7a9f8329 added last git commit output for c-ares too. 2010-04-13 04:05:43 +02:00
Guenter Knauf
6ab2cae55e changed the git update block to take care of c-ares repo if detected. 2010-04-13 03:15:31 +02:00