Compare commits

...

14 Commits

Author SHA1 Message Date
Daniel Stenberg
cac269cf91 1.2.1 release time 2004-10-20 08:01:38 +00:00
Daniel Stenberg
249036ada0 this change was reverted since it broke on solaris 2004-10-19 18:50:46 +00:00
Daniel Stenberg
18d80b9e8f iconv 2.1.3 is considered bad for test case 165 2004-10-19 18:49:31 +00:00
Daniel Stenberg
b2d8e0b476 revert the charset fix as it broke the solaris tests (native iconv doesn't
like that name)
2004-10-19 18:46:12 +00:00
Daniel Stenberg
225a652021 Ralph Mitchell fixed: input field with NAME= and VALUE= weren't processed
properly case insensitive
2004-10-19 18:36:17 +00:00
Daniel Stenberg
38b1d96750 Alexander Krasnostavsky made it possible to make FTP 3rd party transfers with
both source and destination being the same host. It can be useful if you want
to move a file on a server or similar.
2004-10-19 18:26:35 +00:00
Daniel Stenberg
2f069ad3e2 snart isn't really used these days so we cut out the reference to it 2004-10-19 15:34:05 +00:00
Daniel Stenberg
a3dbe03e80 added num_connects 2004-10-19 15:32:31 +00:00
Daniel Stenberg
f4bef25b5e CURLINFO_NUM_CONNECTS and more 2004-10-19 15:30:08 +00:00
Gisle Vanem
ebf7d22503 djgpp has locale.h and setlocale(). 2004-10-19 10:14:06 +00:00
Gisle Vanem
9296d9deb8 All Win compilers have locale.h + setlocale(). 2004-10-19 10:13:26 +00:00
Daniel Stenberg
7b95a25adc bug 1049275 fixes test 165 2004-10-19 06:04:25 +00:00
Daniel Stenberg
82d6cfa7fc Peter Wullinger pointed out that curl should call setlocale() properly to
initiate the specific language operations, to make the IDN stuff work better.
2004-10-18 13:37:18 +00:00
Daniel Stenberg
48750d5fc7 start over on 7.12.3 2004-10-18 08:42:44 +00:00
23 changed files with 235 additions and 80 deletions

16
CHANGES
View File

@@ -6,6 +6,22 @@
Changelog
Daniel (19 October 2004)
- Alexander Krasnostavsky made it possible to make FTP 3rd party transfers
with both source and destination being the same host. It can be useful if
you want to move a file on a server or similar.
- Guillaume Arluison added CURLINFO_NUM_CONNECTS to allow an app to figure
out how many new connects a previous transfer required.
I added %{num_connects} to the curl tool and added test case 192 and 193
to verify the new code.
Daniel (18 October 2004)
- Peter Wullinger pointed out that curl should call setlocale() properly to
initiate the specific language operations, to make the IDN stuff work
better.
Version 7.12.2 (18 October 2004)
Daniel (16 October 2004)

View File

@@ -1,7 +1,7 @@
Curl and libcurl 7.12.2
Curl and libcurl 7.12.3
Public curl release number: 83
Releases counted from the very beginning: 110
Public curl release number: 84
Releases counted from the very beginning: 111
Available command line options: 96
Available curl_easy_setopt() options: 121
Number of public functions in libcurl: 36
@@ -10,75 +10,21 @@ Curl and libcurl 7.12.2
This release includes the following changes:
o the IDN code now verifies that only TLD-legitmate letters are used in the
name or a warning is displayed (when verbose is enabled)
o provides error texts for IDN errors
o file upload parts in formposts now get their directory names cut off
o added CURLINFO_OS_ERRNO
o added CURLOPT_FTPSSLAUTH to allow ftp connects to attempt "AUTH TLS" instead
before "AUTH SSL"
o curl_getdate() completely rewritten: may affect rare curl -z use cases
o added CURLINFO_NUM_CONNECTS
This release includes the following bugfixes:
o CURLOPT_FTP_CREATE_MISSING_DIRS works for third party transfers
o memory leak for cookies received with max-age set
o potential memory leaks in the window name resolver
o URLs with ?-letters in the user name or password fields
o libcurl error message is now provided when send() fails
o no more SIGPIPE on Mac OS X and other SO_NOSIGPIPE-supporting platforms
o HTTP resume was refused if redirected
o configure's gethostbyname check when both nsl and socket libs are required
o configure --with-libidn now checks the given path before defaults
o a race condition sometimes resulting in CURLE_COULDNT_RESOLVE_HOST in the
windows threaded name resolver code
o isspace() invokes with negative values in the cookie code
o a case of read-already-freed-data when CURLOPT_VERBOSE is used and a (very)
persistent connection
o now includes descriptive error messages for IDN errors
o more forgivning PASS response code check for better working with proftpd
o curl/multi.h works better included in winsock-using apps
o curl_easy_reset() no longer enables the progress meter
o build fix for SSL disabled curl with SSL Engine support present
o configure --with-ssl=PATH now ignores pkg-config path info
o CURLOPT_SSLENGINE can be set to NULL even if no engine support is available
o LDAP crash when more than one record was received
o connect failures properly stores an error message in the errorbuffer
o Rare Location:-following problem with bad original URL
o -F can now add Content-Type on non-file sections
o double Host: header when following Location: with replaced Host:
o curl_multi_add_handle() return code
o "Proxy-Connection: close" is now understood and properly dealt with
o curl_getdate() crash
o downloading empty files now calls the write callback properly
o no reverse DNS lookups for ip-only addresses with ipv6-enabled libcurl
o file handler leak when getting an empty file:// URL
o libcurl works better multi-threaded on AIX (when built with xlc)
o cookies over proxy didn't match the path properly
o MSVC makefile fixes to build better
o FTP response 530 on 'PASS' now sends back a better error message
o test 165 works with older iconv versions as well
o use setlocale() for better IDN functionality by default
Other curl-related news since the previous public release:
o AdacURL version 7.12.1 http://www.almroth.com/adacurl/index.html
o pycurl version 7.12.1 http://pycurl.sourceforge.net/
o tclcurl version 0.12.1
http://personal1.iddeo.es/andresgarci/tclcurl/english/
o libcurl.NET was announce: http://www.seasideresearch.com/downloads.html
o Get your fresh Mozilla-extracted ca cert bundle here:
http://curl.haxx.se/docs/caextract.html
o New web mirror in Taiwan: http://curl.cs.pu.edu.tw/
o pycurl 7.12.2: http://pycurl.sf.net/
o TclCurl 0.12.2: http://personal1.iddeo.es/andresgarci/tclcurl/english/
This release would not have looked like this without help, code, reports and
advice from friends like these:
Casey O'Donnell, Roland Krikava, Alex, Alexander Krasnostavsky, Kjetil
Jacobsen, Ling Thio, Roman Koifman, Harshal Pradhan, Jonas Forsman, David
Tarendash, Daniel at touchtunes, Bertrand Demiddelaer, Andreas Rieke,
Jean-Claude Chauve, Dan Fandrich, Peter Sylvester, "Mekonikum", Jean-Philippe
Barrette-LaPierre, G<>nter Knauf, Larry Campbell, Fedor Karpelevitch,
Aleksandar Milivojevic, Gisle Vanem, Chris "Bob Bob", Chih-Chung Chang, Andy
Cedilnik, Alan Pinstein, Eric Vergnaud, Traian Nicolescu, runekl at
opoint.com
Peter Wullinger, Guillaume Arluison
Thanks! (and sorry if I forgot to mention someone)

View File

@@ -1,11 +1,9 @@
Issues not sorted in any particular order.
To get fixed in 7.12.2 (planned release: mid October 2004)
======================
To get fixed in 7.12.3 (planned release: December 2004)
======================
47 - Peter Sylvester's patch for SRP on the TLS layer
48 - MSVC Makefile improvements by Samuel D<>az Garc<72>a

View File

@@ -1,5 +1,7 @@
Changelog for the c-ares project
Version 1.2.1 (October 20, 2004)
* September 29
- Henrik Stoerner fix: got a report that Tru64 Unix (the unix from Digital

View File

@@ -1121,6 +1121,7 @@ AC_CHECK_HEADERS(
sys/utime.h \
sys/poll.h \
libgen.h \
locale.h \
setjmp.h,
dnl to do if not found
[],
@@ -1217,6 +1218,7 @@ AC_CHECK_FUNCS( strtoll \
utime \
sigsetjmp \
basename \
setlocale \
poll,
dnl if found
[],

View File

@@ -3,6 +3,12 @@ join in and help us correct one or more of these! Also be sure to check the
changelog of the current development status, as one or more of these problems
may have been fixed since this was written!
* Test case 165 might fail on system which has libidn present, but with an
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the
test pass, but instead makes it fail on Solaris hosts that use its native
iconv.
* curl version 7.12.2 fails on AIX if compiled with --enable-ares.
The workaround is to combine --enable-ares with --disable-shared

View File

@@ -21,7 +21,7 @@
.\" * $Id$
.\" **************************************************************************
.\"
.TH curl 1 "3 May 2004" "Curl 7.12" "Curl Manual"
.TH curl 1 "19 Oct 2004" "Curl 7.12.3" "Curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
@@ -932,6 +932,9 @@ The average upload speed that curl measured for the complete upload.
.TP
.B content_type
The Content-Type of the requested document, if there was any. (Added in 7.9.5)
.TP
.B num_connects
Number of new connects made in the recent transfer. (Added in 7.12.3)
.RE
If this option is used several times, the last one will be used.
@@ -1187,4 +1190,4 @@ ftp://ftp.sunet.se/pub/www/utilities/curl/
.SH "SEE ALSO"
.BR ftp (1),
.BR wget (1),
.BR snarf (1)

View File

@@ -113,6 +113,13 @@ method(s) available for your proxy authentication. (Added in 7.10.8)
.IP CURLINFO_OS_ERRNO
Pass a pointer to a long to receive the errno variable from a connect failure.
(Added in 7.12.2)
.IP CURLINFO_NUM_CONNECTS
Pass a pointer to a long to receive how many new connections libcurl had to
create to achieve the previous transfer (only the successful connects are
counted). Combined with \fICURLINFO_REDIRECT_COUNT\fP you are able to know
how many times libcurl successfully reused existing connection(s) or not. See
the Connection Options of \fIcurl_easy_setopt(3)\fP to see how libcurl tries
to make persistent connections to save time. (Added in 7.12.3)
.SH RETURN VALUE
If the operation was successful, CURLE_OK is returned. Otherwise an
appropriate error code will be returned.

View File

@@ -1179,9 +1179,10 @@ typedef enum {
CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,
CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,
CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,
CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
/* Fill in new entries below here! */
CURLINFO_LASTONE = 26
CURLINFO_LASTONE = 27
} CURLINFO;
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as

View File

@@ -28,7 +28,7 @@
/* This is the version number of the libcurl package from which this header
file origins: */
#define LIBCURL_VERSION "7.12.2-CVS"
#define LIBCURL_VERSION "7.12.3-CVS"
/* This is the numeric version of the libcurl version number, meant for easier
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
@@ -44,12 +44,12 @@
always a greater number in a more recent release. It makes comparisons with
greater than and less than work.
*/
#define LIBCURL_VERSION_NUM 0x070c02
#define LIBCURL_VERSION_NUM 0x070c03
/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 12
#define LIBCURL_VERSION_PATCH 2
#define LIBCURL_VERSION_PATCH 3
#endif /* __CURL_CURLVER_H */

View File

@@ -27,6 +27,7 @@
#define HAVE_IOCTLSOCKET 1
#define HAVE_INET_PTON 1
#define HAVE_INET_NTOP 1
#define HAVE_LOCALE_H 1
#define HAVE_LONGLONG 1
#define HAVE_MALLOC_H 1
#define HAVE_MEMORY_H 1
@@ -37,6 +38,7 @@
#define HAVE_PERROR 1
#define HAVE_SELECT 1
#define HAVE_SETJMP_H 1
#define HAVE_SETLOCALE 1
#define HAVE_SETVBUF 1
#define HAVE_SIGNAL 1
#define HAVE_SIGACTION 1

View File

@@ -784,5 +784,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
if(sockconn)
*sockconn = sockfd; /* the socket descriptor we've connected */
data->info.numconnects++; /* to track the number of connections made */
return CURLE_OK;
}

View File

@@ -38,7 +38,7 @@
#include "memdebug.h"
/*
* This is supposed to be called in the beginning of a permform() session
* This is supposed to be called in the beginning of a perform() session
* and should reset all session-info variables
*/
CURLcode Curl_initinfo(struct SessionHandle *data)
@@ -63,6 +63,7 @@ CURLcode Curl_initinfo(struct SessionHandle *data)
info->header_size = 0;
info->request_size = 0;
info->numconnects = 0;
return CURLE_OK;
}
@@ -170,6 +171,9 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
case CURLINFO_OS_ERRNO:
*param_longp = data->state.os_errno;
break;
case CURLINFO_NUM_CONNECTS:
*param_longp = data->info.numconnects;
break;
default:
return CURLE_BAD_FUNCTION_ARGUMENT;
}

View File

@@ -2189,6 +2189,7 @@ CURLcode Curl_pretransfersec(struct connectdata *conn)
CURLcode status = CURLE_OK;
struct SessionHandle *data = conn->data;
struct connectdata *sec_conn = NULL; /* secondary connection */
bool reuse_fresh_tmp = data->set.reuse_fresh;
/* update data with source host options */
char *url = aprintf( "%s://%s/", conn->protostr, data->set.source_host);
@@ -2204,12 +2205,22 @@ CURLcode Curl_pretransfersec(struct connectdata *conn)
data->set.ftpport = data->set.source_port;
data->set.userpwd = data->set.source_userpwd;
/* if both remote hosts are the same host - create new connection */
if (strequal(conn->host.dispname, data->set.source_host))
/* NOTE: this is restored back to the original value after the connect is
done */
data->set.reuse_fresh = TRUE;
/* secondary connection */
status = Curl_connect_host(data, &sec_conn);
if(CURLE_OK == status) {
sec_conn->sec_conn = NULL; /* important if re-using existing connection
to prevent loop */
sec_conn->data = data;
conn->sec_conn = sec_conn;
}
data->set.reuse_fresh = reuse_fresh_tmp;
return status;
}

View File

@@ -624,6 +624,8 @@ struct PureInfo {
long proxyauthavail;
long httpauthavail;
long numconnects; /* how many new connection did libcurl created */
char *contenttype; /* the content type of the object */
};

View File

@@ -26,10 +26,10 @@ sub namevalue {
my ($tag)=@_;
my $name=$tag;
if($name =~ /name *=/i) {
if($name =~ /name *= *([^\"\']([^ \">]*))/) {
if($name =~ /name *= *([^\"\']([^ \">]*))/i) {
$name = $1;
}
elsif($name =~ /name *= *(\"|\')([^\"\']*)(\"|\')/) {
elsif($name =~ /name *= *(\"|\')([^\"\']*)(\"|\')/i) {
$name=$2;
}
else {
@@ -45,10 +45,10 @@ sub namevalue {
# get value tag
my $value= $tag;
if($value =~ /[^\.a-zA-Z0-9]value *=/i) {
if($value =~ /[^\.a-zA-Z0-9]value *= *([^\"\']([^ \">]*))/) {
if($value =~ /[^\.a-zA-Z0-9]value *= *([^\"\']([^ \">]*))/i) {
$value = $1;
}
elsif($value =~ /[^\.a-zA-Z0-9]value *= *(\"|\')([^\"\']*)(\"|\')/) {
elsif($value =~ /[^\.a-zA-Z0-9]value *= *(\"|\')([^\"\']*)(\"|\')/i) {
$value=$2;
}
else {

View File

@@ -10,7 +10,7 @@
/* Define if you have the <io.h> header file. */
#define HAVE_IO_H 1
/* Define if you have the <limits.h> header file */
#define HAVE_LIMITS_H 1
@@ -26,6 +26,12 @@
/* Define if you have the <sys/utime.h> header file */
#define HAVE_SYS_UTIME_H 1
/* Define if you have the <locale.h> header file */
#define HAVE_LOCALE_H 1
/* Define if you have the setlocale() function. */
#define HAVE_SETLOCALE 1
/*************************************************
* This section is for compiler specific defines.*
*************************************************/

View File

@@ -95,6 +95,12 @@
/* Define if you have the <limits.h> header file */
#undef HAVE_LIMITS_H
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* type to use in place of socklen_t if not defined */
#undef socklen_t

View File

@@ -90,7 +90,7 @@
#include <sys/utime.h>
#endif
#endif
#endif /* HAVE_UTIME_H */
#ifdef HAVE_LIMITS_H
#include <limits.h>
@@ -100,6 +100,10 @@
#include <sys/poll.h>
#endif
#ifdef HAVE_LOCALE_H
#include <locale.h> /* for setlocale() */
#endif
#define ENABLE_CURLX_PRINTF
/* make the curlx header define all printf() functions to use the curlx_*
versions instead */
@@ -2790,6 +2794,11 @@ operate(struct Configurable *config, int argc, char *argv[])
errorbuffer[0]=0; /* prevent junk from being output */
/* setup proper locale from environment */
#ifdef HAVE_SETLOCALE
setlocale(LC_ALL, "");
#endif
/* inits */
if (main_init() != CURLE_OK) {
helpf("error initializing curl library\n");

View File

@@ -56,6 +56,7 @@ typedef enum {
VAR_REQUEST_SIZE,
VAR_EFFECTIVE_URL,
VAR_CONTENT_TYPE,
VAR_NUM_CONNECTS,
VAR_NUM_OF_VARS /* must be the last */
} replaceid;
@@ -80,6 +81,7 @@ static struct variable replacements[]={
{"speed_download", VAR_SPEED_DOWNLOAD},
{"speed_upload", VAR_SPEED_UPLOAD},
{"content_type", VAR_CONTENT_TYPE},
{"num_connects", VAR_NUM_CONNECTS},
{NULL, VAR_NONE}
};
@@ -131,6 +133,11 @@ void ourWriteOut(CURL *curl, char *writeinfo)
curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &longinfo))
fprintf(stream, "%ld", longinfo);
break;
case VAR_NUM_CONNECTS:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &longinfo))
fprintf(stream, "%ld", longinfo);
break;
case VAR_TOTAL_TIME:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))

View File

@@ -26,7 +26,8 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test512 test165 test166 test167 test168 test169 test170 test171 \
test172 test204 test205 test173 test174 test175 test176 test177 \
test513 test514 test178 test179 test180 test181 test182 test183 \
test184 test185 test186 test187 test188 test189 test191
test184 test185 test186 test187 test188 test189 test191 test192 \
test193
# The following tests have been removed from the dist since they no longer
# work. We need to fix the test suite's FTPS server first, then bring them

51
tests/data/test192 Normal file
View File

@@ -0,0 +1,51 @@
#
# Server-side
<reply>
<data nocheck=1>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 8
Connection: close
monster
</data>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<name>
HTTP GET -w num_connects with one simple connect
</name>
<command>
http://%HOSTIP:%HTTPPORT/192 -w '%{num_connects}\n'
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /192 HTTP/1.1
Host: 127.0.0.1:%HTTPPORT
Pragma: no-cache
Accept: */*
</protocol>
<stdout>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 8
Connection: close
monster
1
</stdout>
</verify>

73
tests/data/test193 Normal file
View File

@@ -0,0 +1,73 @@
#
# Server-side
<reply>
<data nocheck=1>
HTTP/1.1 302 OK swsbounce swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 8
Connection: close
Location: ./193
monster
</data>
<data1 nocheck=1>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 8
Connection: close
monster
</data1>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<name>
HTTP GET -w num_connects with redirected fetch (2 connects)
</name>
<command>
http://%HOSTIP:%HTTPPORT/193 -w '%{num_connects}\n' -L
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /193 HTTP/1.1
Host: 127.0.0.1:%HTTPPORT
Pragma: no-cache
Accept: */*
GET /193 HTTP/1.1
Host: 127.0.0.1:%HTTPPORT
Pragma: no-cache
Accept: */*
</protocol>
<stdout>
HTTP/1.1 302 OK swsbounce swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 8
Connection: close
Location: ./193
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 8
Connection: close
monster
2
</stdout>
</verify>