Compare commits
10 Commits
curl-7_6_1
...
curl-7_6_1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b44a3df76 | ||
|
|
572c29a4a3 | ||
|
|
9464c5430d | ||
|
|
a14aaaf23f | ||
|
|
c41c5a0ef2 | ||
|
|
c0c0283356 | ||
|
|
1bcd3e601a | ||
|
|
e721f85c83 | ||
|
|
7015c61b86 | ||
|
|
30ec0af109 |
23
CHANGES
23
CHANGES
@@ -7,8 +7,29 @@
|
|||||||
History of Changes
|
History of Changes
|
||||||
|
|
||||||
|
|
||||||
|
Daniel (31 January 2001)
|
||||||
|
- Curl_read() and curl_read() now return a ssize_t for the size, as it had to
|
||||||
|
be able to return -1. The telnet support crashed due to this and there was
|
||||||
|
a possibility to weird behaviour all over.
|
||||||
|
|
||||||
|
- Added a configure.in check for a working getaddrinfo() if IPv6 is requested.
|
||||||
|
I also made the configure script feature --enable-debug which sets a couple
|
||||||
|
of compiler options when used. It assumes gcc.
|
||||||
|
|
||||||
|
Daniel (30 January 2001)
|
||||||
|
- I finally took a stab at the long-term FIXME item I've had on myself, and
|
||||||
|
now libcurl will properly work when doing a HTTP range-request that follows
|
||||||
|
a Location:. Previously that would make libcurl fail saying that the server
|
||||||
|
doesn't seem to support range requests.
|
||||||
|
|
||||||
Daniel (29 January 2001)
|
Daniel (29 January 2001)
|
||||||
- Yet another Content-Range change. Ok now? Bob Schader checks from his end.
|
- I added a test case for the HTTP PUT resume thing (test case 33).
|
||||||
|
|
||||||
|
Version 7.6.1-pre1
|
||||||
|
|
||||||
|
Daniel (29 January 2001)
|
||||||
|
- Yet another Content-Range change. Ok now? Bob Schader checks from his end
|
||||||
|
and it works for him.
|
||||||
|
|
||||||
Daniel (27 January 2001)
|
Daniel (27 January 2001)
|
||||||
- So the HTTP PUT resume fix wasn't good. There should appearantly be a
|
- So the HTTP PUT resume fix wasn't good. There should appearantly be a
|
||||||
|
|||||||
73
configure.in
73
configure.in
@@ -26,6 +26,72 @@ dnl The install stuff has already been taken care of by the automake stuff
|
|||||||
dnl AC_PROG_INSTALL
|
dnl AC_PROG_INSTALL
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
|
|
||||||
|
dnl ************************************************************
|
||||||
|
dnl lame option to switch on debug options
|
||||||
|
dnl
|
||||||
|
AC_MSG_CHECKING([whether to enable debug options])
|
||||||
|
AC_ARG_ENABLE(debug,
|
||||||
|
[ --enable-debug Enable pedantic debug options
|
||||||
|
--disable-debug Disable debug options],
|
||||||
|
[ case "$enableval" in
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
;;
|
||||||
|
*) AC_MSG_RESULT(yes)
|
||||||
|
|
||||||
|
CPPFLAGS="$CPPFLAGS -DMALLOCDEBUG"
|
||||||
|
CFLAGS="-Wall -pedantic -g"
|
||||||
|
;;
|
||||||
|
esac ],
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl check for working getaddrinfo()
|
||||||
|
dnl
|
||||||
|
AC_DEFUN(CURL_CHECK_WORKING_GETADDRINFO,[
|
||||||
|
AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
|
||||||
|
AC_TRY_RUN( [
|
||||||
|
#ifdef HAVE_NETDB_H
|
||||||
|
#include <netdb.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STRING_H
|
||||||
|
#include <string.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void main(void) {
|
||||||
|
struct addrinfo hints, *ai;
|
||||||
|
int error;
|
||||||
|
|
||||||
|
memset(&hints, 0, sizeof(hints));
|
||||||
|
hints.ai_family = AF_UNSPEC;
|
||||||
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
|
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
|
||||||
|
if (error) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],[
|
||||||
|
ac_cv_working_getaddrinfo="yes"
|
||||||
|
],[
|
||||||
|
ac_cv_working_getaddrinfo="no"
|
||||||
|
],[
|
||||||
|
ac_cv_working_getaddrinfo="yes"
|
||||||
|
])])
|
||||||
|
if test "$ac_cv_working_getaddrinfo" = "yes"; then
|
||||||
|
AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works])
|
||||||
|
AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN(CURL_CHECK_LOCALTIME_R,
|
AC_DEFUN(CURL_CHECK_LOCALTIME_R,
|
||||||
[
|
[
|
||||||
dnl check for a few thread-safe functions
|
dnl check for a few thread-safe functions
|
||||||
@@ -251,7 +317,6 @@ AC_ARG_ENABLE(ipv6,
|
|||||||
ipv6=no
|
ipv6=no
|
||||||
;;
|
;;
|
||||||
*) AC_MSG_RESULT(yes)
|
*) AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(ENABLE_IPV6)
|
|
||||||
ipv6=yes
|
ipv6=yes
|
||||||
;;
|
;;
|
||||||
esac ],
|
esac ],
|
||||||
@@ -268,7 +333,6 @@ main()
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(ENABLE_IPV6)
|
|
||||||
ipv6=yes,
|
ipv6=yes,
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
ipv6=no,
|
ipv6=no,
|
||||||
@@ -276,6 +340,11 @@ main()
|
|||||||
ipv6=no
|
ipv6=no
|
||||||
))
|
))
|
||||||
|
|
||||||
|
if test "$ipv6" = "yes"; then
|
||||||
|
CURL_CHECK_WORKING_GETADDRINFO
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
|
|||||||
@@ -452,7 +452,7 @@ char *curl_getenv(char *variable);
|
|||||||
char *curl_version(void);
|
char *curl_version(void);
|
||||||
|
|
||||||
/* This is the version number */
|
/* This is the version number */
|
||||||
#define LIBCURL_VERSION "7.6.1-pre1"
|
#define LIBCURL_VERSION "7.6.1-pre2"
|
||||||
#define LIBCURL_VERSION_NUM 0x070601
|
#define LIBCURL_VERSION_NUM 0x070601
|
||||||
|
|
||||||
/* linked-list structure for the CURLOPT_QUOTE option (and other) */
|
/* linked-list structure for the CURLOPT_QUOTE option (and other) */
|
||||||
@@ -554,7 +554,7 @@ CURLcode curl_setopt(CURL *handle, CURLoption option, ...);
|
|||||||
CURLcode curl_close(CURL *curl); /* the opposite of curl_open() */
|
CURLcode curl_close(CURL *curl); /* the opposite of curl_open() */
|
||||||
|
|
||||||
CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize,
|
CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize,
|
||||||
size_t *n);
|
ssize_t *n);
|
||||||
CURLcode curl_write(CURLconnect *c_conn, char *buf, size_t amount,
|
CURLcode curl_write(CURLconnect *c_conn, char *buf, size_t amount,
|
||||||
size_t *n);
|
size_t *n);
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ int Curl_GetFTPResponse(int sockfd, char *buf,
|
|||||||
int *ftpcode)
|
int *ftpcode)
|
||||||
{
|
{
|
||||||
int nread;
|
int nread;
|
||||||
size_t keepon=TRUE;
|
ssize_t keepon=TRUE;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
int timeout = 3600; /* in seconds */
|
int timeout = 3600; /* in seconds */
|
||||||
struct timeval interval;
|
struct timeval interval;
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ CURLcode add_buffer(send_buffer *in, void *inptr, size_t size)
|
|||||||
static
|
static
|
||||||
int GetLine(int sockfd, char *buf, struct connectdata *conn)
|
int GetLine(int sockfd, char *buf, struct connectdata *conn)
|
||||||
{
|
{
|
||||||
size_t nread;
|
ssize_t nread;
|
||||||
int read_rc=1;
|
int read_rc=1;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
struct UrlData *data=conn->data;
|
struct UrlData *data=conn->data;
|
||||||
|
|||||||
@@ -198,10 +198,10 @@ CURLcode Curl_client_write(struct UrlData *data,
|
|||||||
*/
|
*/
|
||||||
CURLcode Curl_read(struct connectdata *conn, int sockfd,
|
CURLcode Curl_read(struct connectdata *conn, int sockfd,
|
||||||
char *buf, size_t buffersize,
|
char *buf, size_t buffersize,
|
||||||
size_t *n)
|
ssize_t *n)
|
||||||
{
|
{
|
||||||
struct UrlData *data = conn->data;
|
struct UrlData *data = conn->data;
|
||||||
size_t nread;
|
ssize_t nread;
|
||||||
|
|
||||||
#ifdef USE_SSLEAY
|
#ifdef USE_SSLEAY
|
||||||
if (data->ssl.use) {
|
if (data->ssl.use) {
|
||||||
@@ -234,7 +234,7 @@ CURLcode Curl_read(struct connectdata *conn, int sockfd,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize,
|
CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize,
|
||||||
size_t *n)
|
ssize_t *n)
|
||||||
{
|
{
|
||||||
struct connectdata *conn = (struct connectdata *)c_conn;
|
struct connectdata *conn = (struct connectdata *)c_conn;
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ CURLcode Curl_client_write(struct UrlData *data, int type, char *ptr,
|
|||||||
/* internal read-function, does plain socket, SSL and krb4 */
|
/* internal read-function, does plain socket, SSL and krb4 */
|
||||||
CURLcode Curl_read(struct connectdata *conn, int sockfd,
|
CURLcode Curl_read(struct connectdata *conn, int sockfd,
|
||||||
char *buf, size_t buffersize,
|
char *buf, size_t buffersize,
|
||||||
size_t *n);
|
ssize_t *n);
|
||||||
/* internal write-function, does plain socket, SSL and krb4 */
|
/* internal write-function, does plain socket, SSL and krb4 */
|
||||||
CURLcode Curl_write(struct connectdata *conn, int sockfd,
|
CURLcode Curl_write(struct connectdata *conn, int sockfd,
|
||||||
void *mem, size_t len,
|
void *mem, size_t len,
|
||||||
|
|||||||
@@ -833,7 +833,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
|
|||||||
|
|
||||||
bool keepon = TRUE;
|
bool keepon = TRUE;
|
||||||
char *buf = data->buffer;
|
char *buf = data->buffer;
|
||||||
size_t nread;
|
ssize_t nread;
|
||||||
|
|
||||||
init_telnet(data);
|
init_telnet(data);
|
||||||
|
|
||||||
@@ -872,7 +872,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FD_ISSET(sockfd, &readfd))
|
if(FD_ISSET(sockfd, &readfd)) {
|
||||||
Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
|
Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
|
||||||
|
|
||||||
/* if we receive 0 or less here, the server closed the connection and
|
/* if we receive 0 or less here, the server closed the connection and
|
||||||
@@ -885,7 +885,9 @@ CURLcode Curl_telnet(struct connectdata *conn)
|
|||||||
telrcv(data, (unsigned char *)buf, nread);
|
telrcv(data, (unsigned char *)buf, nread);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CURLE_OK;
|
}
|
||||||
|
/* mark this as "no further transfer wanted" */
|
||||||
|
return Curl_Transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
CURLcode static
|
CURLcode static
|
||||||
_Transfer(struct connectdata *c_conn)
|
_Transfer(struct connectdata *c_conn)
|
||||||
{
|
{
|
||||||
size_t nread; /* number of bytes read */
|
ssize_t nread; /* number of bytes read */
|
||||||
int bytecount = 0; /* total number of bytes read */
|
int bytecount = 0; /* total number of bytes read */
|
||||||
int writebytecount = 0; /* number of bytes written */
|
int writebytecount = 0; /* number of bytes written */
|
||||||
long contentlength=0; /* size of incoming data */
|
long contentlength=0; /* size of incoming data */
|
||||||
@@ -161,6 +161,12 @@ _Transfer(struct connectdata *c_conn)
|
|||||||
Curl_pgrsTime(data, TIMER_PRETRANSFER);
|
Curl_pgrsTime(data, TIMER_PRETRANSFER);
|
||||||
Curl_speedinit(data);
|
Curl_speedinit(data);
|
||||||
|
|
||||||
|
if((conn->sockfd == -1) &&
|
||||||
|
(conn->writesockfd == -1)) {
|
||||||
|
/* nothing to read, nothing to write, we're already OK! */
|
||||||
|
return CURLE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (!conn->getheader) {
|
if (!conn->getheader) {
|
||||||
header = FALSE;
|
header = FALSE;
|
||||||
if(conn->size > 0)
|
if(conn->size > 0)
|
||||||
@@ -444,7 +450,12 @@ _Transfer(struct connectdata *c_conn)
|
|||||||
write a chunk of the body */
|
write a chunk of the body */
|
||||||
if(conn->protocol&PROT_HTTP) {
|
if(conn->protocol&PROT_HTTP) {
|
||||||
/* HTTP-only checks */
|
/* HTTP-only checks */
|
||||||
if (data->resume_from &&
|
if (data->newurl) {
|
||||||
|
/* abort after the headers if "follow Location" is set */
|
||||||
|
infof (data, "Follow to new URL: %s\n", data->newurl);
|
||||||
|
return CURLE_OK;
|
||||||
|
}
|
||||||
|
else if (data->resume_from &&
|
||||||
!content_range &&
|
!content_range &&
|
||||||
(data->httpreq==HTTPREQ_GET)) {
|
(data->httpreq==HTTPREQ_GET)) {
|
||||||
/* we wanted to resume a download, although the server
|
/* we wanted to resume a download, although the server
|
||||||
@@ -454,11 +465,6 @@ _Transfer(struct connectdata *c_conn)
|
|||||||
"byte ranges. Cannot resume.");
|
"byte ranges. Cannot resume.");
|
||||||
return CURLE_HTTP_RANGE_ERROR;
|
return CURLE_HTTP_RANGE_ERROR;
|
||||||
}
|
}
|
||||||
else if (data->newurl) {
|
|
||||||
/* abort after the headers if "follow Location" is set */
|
|
||||||
infof (data, "Follow to new URL: %s\n", data->newurl);
|
|
||||||
return CURLE_OK;
|
|
||||||
}
|
|
||||||
else if(data->timecondition && !data->range) {
|
else if(data->timecondition && !data->range) {
|
||||||
/* A time condition has been set AND no ranges have been
|
/* A time condition has been set AND no ranges have been
|
||||||
requested. This seems to be what chapter 13.3.4 of
|
requested. This seems to be what chapter 13.3.4 of
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#define CURL_NAME "curl"
|
#define CURL_NAME "curl"
|
||||||
#define CURL_VERSION "7.6.1-pre1"
|
#define CURL_VERSION "7.6.1-pre2"
|
||||||
#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "
|
#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "
|
||||||
|
|||||||
@@ -61,4 +61,5 @@ command29.txt error30.txt name30.txt prot30.txt reply30.txt \
|
|||||||
command30.txt name29.txt prot29.txt reply29.txt \
|
command30.txt name29.txt prot29.txt reply29.txt \
|
||||||
command31.txt name32.txt reply31.txt reply32.txt \
|
command31.txt name32.txt reply31.txt reply32.txt \
|
||||||
command32.txt prot31.txt reply310001.txt reply320001.txt \
|
command32.txt prot31.txt reply310001.txt reply320001.txt \
|
||||||
name31.txt prot32.txt reply310002.txt reply320002.txt
|
name31.txt prot32.txt reply310002.txt reply320002.txt \
|
||||||
|
command33.txt extra33.txt name33.txt prot33.txt reply33.txt
|
||||||
|
|||||||
3
tests/data/command33.txt
Normal file
3
tests/data/command33.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
http://%HOSTIP:%HOSTPORT/33 -Tdata/extra33.txt -C 50
|
||||||
|
|
||||||
|
|
||||||
15
tests/data/extra33.txt
Normal file
15
tests/data/extra33.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
1
tests/data/name33.txt
Normal file
1
tests/data/name33.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
HTTP PUT resume
|
||||||
18
tests/data/prot33.txt
Normal file
18
tests/data/prot33.txt
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
PUT /33 HTTP/1.0
|
||||||
|
Content-Range: bytes 50-149/150
|
||||||
|
User-Agent: curl/7.6 (sparc-sun-solaris2.7) libcurl 7.6-pre4 (SSL 0.9.6) (krb4 enabled)
|
||||||
|
Host: 127.0.0.1:8999
|
||||||
|
Pragma: no-cache
|
||||||
|
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||||
|
Content-Length: 100
|
||||||
|
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
|
012345678
|
||||||
7
tests/data/reply33.txt
Normal file
7
tests/data/reply33.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
HTTP/1.1 303 See Other
|
||||||
|
Server: fake
|
||||||
|
Location: /moo/moo/moo/320002
|
||||||
|
|
||||||
|
This Location should be fetched with a GET!
|
||||||
|
|
||||||
|
|
||||||
@@ -507,6 +507,7 @@ sub singletest {
|
|||||||
unlink($STDOUT);
|
unlink($STDOUT);
|
||||||
unlink($STDERR);
|
unlink($STDERR);
|
||||||
|
|
||||||
|
unlink("$LOGDIR/upload.$NUMBER"); # remove upload leftovers
|
||||||
unlink($CURLOUT); # remove the downloaded results
|
unlink($CURLOUT); # remove the downloaded results
|
||||||
unlink($FTPDCMD); # remove the instructions for this test
|
unlink($FTPDCMD); # remove the instructions for this test
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user