Added CURLOPT_POSTFIELDSIZE_LARGE to offer a large file version of the

CURLOPT_POSTFIELDSIZE option to allow really big HTTP POSTs.
This commit is contained in:
Daniel Stenberg 2004-03-12 08:55:47 +00:00
Родитель 9af532e662
Коммит 1ebda8fa0e
6 изменённых файлов: 29 добавлений и 7 удалений

Просмотреть файл

@ -6,6 +6,12 @@
Changelog
Daniel (12 March 2004)
- Added CURLOPT_POSTFIELDSIZE_LARGE, the large file version of
CURLOPT_POSTFIELDSIZE to allow POSTs larger than 2GB.
- David Byron fixed an uninitialized variable case/crash.
Daniel (10 March 2004)
- Jeff Lawson fixed the SSL connection to deal with received signals during the
connect.

Просмотреть файл

@ -3,10 +3,11 @@ Curl and libcurl 7.11.1. A bugfix release.
Public curl release number: 79
Releases counted from the very beginning: 106
Available command line options: 94
Available curl_easy_setopt() options: 111
Available curl_easy_setopt() options: 112
This release includes the following changes:
o CURLOPT_POSTFIELDSIZE_LARGE added to offer POSTs larger than 2GB
o CURL_VERSION_LARGEFILE is a feature bit returned by libcurls that feature
large file support
o libcurl only requires winsock 1.1 on windows now

Просмотреть файл

@ -21,7 +21,7 @@
.\" * $Id$
.\" **************************************************************************
.\"
.TH curl_easy_setopt 3 "27 Feb 2004" "libcurl 7.11.1" "libcurl Manual"
.TH curl_easy_setopt 3 "12 Mar 2004" "libcurl 7.11.1" "libcurl Manual"
.SH NAME
curl_easy_setopt - set options for a curl easy handle
.SH SYNOPSIS
@ -464,6 +464,11 @@ If you want to post data to the server without letting libcurl do a strlen()
to measure the data size, this option must be used. When this option is used
you can post fully binary data, which otherwise is likely to fail. If this
size is set to zero, the library will use strlen() to get the size.
.IP CURLOPT_POSTFIELDSIZE_LARGE
Pass a curl_off_t as parameter. Use this to set the size of the
\fICURLOPT_POSTFIELDS\fP data to prevent libcurl from doing strlen() on the
data to figure out the size. This is the large file version of the
\fICURLOPT_POSTFIELDSIZE\fP option.
.IP CURLOPT_HTTPPOST
Tells libcurl you want a multipart/formdata HTTP POST to be made and you
instruct what data to pass on to the server. Pass a pointer to a linked list

Просмотреть файл

@ -783,6 +783,9 @@ typedef enum {
*/
CINIT(FTP_SSL, LONG, 119),
/* The _LARGE version of the standard POSTFIELDSIZE option */
CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;

Просмотреть файл

@ -782,11 +782,18 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
break;
case CURLOPT_POSTFIELDSIZE:
/*
* The size of the POSTFIELD data, if curl should now do a strlen
* to find out. Enables binary posts.
* The size of the POSTFIELD data to prevent libcurl to do strlen() to
* figure it out. Enables binary posts.
*/
data->set.postfieldsize = va_arg(param, long);
break;
case CURLOPT_POSTFIELDSIZE_LARGE:
/*
* The size of the POSTFIELD data to prevent libcurl to do strlen() to
* figure it out. Enables binary posts.
*/
data->set.postfieldsize = va_arg(param, curl_off_t);
break;
case CURLOPT_REFERER:
/*
* String to set in the HTTP Referer: field.

Просмотреть файл

@ -780,9 +780,9 @@ struct UserDefined {
char *useragent; /* User-Agent string */
char *encoding; /* Accept-Encoding string */
char *postfields; /* if POST, set the fields' values here */
size_t postfieldsize; /* if POST, this might have a size to use instead of
strlen(), and then the data *may* be binary (contain
zero bytes) */
curl_off_t postfieldsize; /* if POST, this might have a size to use instead
of strlen(), and then the data *may* be binary
(contain zero bytes) */
char *ftpport; /* port to send with the FTP PORT command */
char *device; /* network interface to use */
curl_write_callback fwrite; /* function that stores the output */