mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Tim Sneddon's VMS fix for huge HTTP POSTs
This commit is contained in:
parent
f10985fc50
commit
6b49fd7483
5
CHANGES
5
CHANGES
@ -6,6 +6,11 @@
|
||||
|
||||
Changelog
|
||||
|
||||
Daniel (5 November 2004)
|
||||
- Tim Sneddon made libcurl send no more than 64K in a single first chunk when
|
||||
doing a huge POST on VMS, as this is a system limitation. Default on general
|
||||
systems is 100K.
|
||||
|
||||
Daniel (4 November 2004)
|
||||
- Andres Garcia made it build on mingw againa, my --retry code broke the build.
|
||||
|
||||
|
@ -17,6 +17,7 @@ This release includes the following changes:
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o huge POSTs on VMS
|
||||
o configure no longer uses pkg-config on cross-compiles
|
||||
o potential gzip decompress memory leak
|
||||
o "-C - --fail" on a HTTP page already downloaded
|
||||
@ -27,11 +28,13 @@ Other curl-related news since the previous public release:
|
||||
|
||||
o pycurl 7.12.2: http://pycurl.sf.net/
|
||||
o TclCurl 0.12.2: http://personal1.iddeo.es/andresgarci/tclcurl/english/
|
||||
o libcurl.NET 1.1: http://www.seasideresearch.com/downloads.html
|
||||
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Peter Wullinger, Guillaume Arluison, Alexander Krasnostavsky, Mohun Biswas,
|
||||
Tomas Pospisek, Gisle Vanem, Dan Fandrich, Paul Nolan
|
||||
Tomas Pospisek, Gisle Vanem, Dan Fandrich, Paul Nolan, Andres Garcia,
|
||||
Tim Sneddon
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
@ -1925,14 +1925,15 @@ CURLcode Curl_http(struct connectdata *conn)
|
||||
if(data->set.postfields) {
|
||||
|
||||
if((data->state.authhost.done || data->state.authproxy.done )
|
||||
&& (postsize < (100*1024))) {
|
||||
&& (postsize < MAX_INITIAL_POST_SIZE)) {
|
||||
/* If we're not done with the authentication phase, we don't expect
|
||||
to actually send off any data yet. Hence, we delay the sending of
|
||||
the body until we receive that friendly 100-continue response */
|
||||
|
||||
/* The post data is less than 100K, then append it to the header.
|
||||
This limit is no magic limit but only set to prevent really huge
|
||||
POSTs to get the data duplicated with malloc() and family. */
|
||||
/* The post data is less than MAX_INITIAL_PORT_SIZE, then append it
|
||||
to the header. This limit is no magic limit but only set to
|
||||
prevent really huge POSTs to get the data duplicated with
|
||||
malloc() and family. */
|
||||
|
||||
result = add_buffer(req_buffer, "\r\n", 2); /* end of headers! */
|
||||
if(result)
|
||||
|
@ -57,5 +57,14 @@ int Curl_http_should_fail(struct connectdata *conn);
|
||||
public curl/curl.h header. */
|
||||
#define CURLAUTH_PICKNONE (1<<30) /* don't use auth */
|
||||
|
||||
/* MAX_INITIAL_POST_SIZE indicates the number of kilobytes that will be sent
|
||||
in the initial part of a multi-part POST message. This is primarily for
|
||||
OpenVMS where the maximum number of bytes allowed per I/O is 64K. For
|
||||
other systems that do not define this, the default is (as it was
|
||||
previously) 100K. */
|
||||
#ifndef MAX_INITIAL_POST_SIZE
|
||||
#define MAX_INITIAL_POST_SIZE (100*1024)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -2,6 +2,7 @@
|
||||
/* MSK, 03/09/04, Seems to work for all platforms I've built on so far. */
|
||||
/* Added HAVE_SYS_IOCTL_H, IOCTL_3_ARGS and SIZEOF_CURL_OFF_T defines */
|
||||
/* MSK, 06/04/04, Added HAVE_INET_NTOP */
|
||||
/* TES, 11/05/04, Added MAX_INITIAL_POST_SIZE, HAVE_BASENAME */
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#ifdef __ALPHA
|
||||
@ -14,6 +15,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define to set number of kilobytes in initial POST message. On VMS systems
|
||||
this is important as the default is 100 and the maximum amount of data
|
||||
transferable in a VMS $QIO is 64K. All VMS versions prior to Alpha/I64
|
||||
V8.2 and TCP/IP V5.5 are affected by this. */
|
||||
#define MAX_INITIAL_POST_SIZE (60*1024)
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
@ -32,6 +39,9 @@
|
||||
/* Define if you have the geteuid function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define if you have the basename function. */
|
||||
#define HAVE_BASENAME 1
|
||||
|
||||
/* Define if you have the gethostbyaddr function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
/* MSK, 03/09/04, Seems to work for all platforms I've built on so far. */
|
||||
/* Added HAVE_SYS_IOCTL_H, IOCTL_3_ARGS and SIZEOF_CURL_OFF_T defines */
|
||||
/* MSK, 06/04/04, Added HAVE_INET_NTOP */
|
||||
/* TES, 10/06/04, Added MAX_INITIAL_POST_SIZE, HAVE_BASENAME */
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#ifdef __ALPHA
|
||||
@ -14,6 +15,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define to set the number of kilobytes per POST message. On VMS systems
|
||||
this is important as the default is 100 and the maximum amount of data
|
||||
transferable in a VMS QIO is 64K. All VMS versions prior to Alpha/I64 V8.2
|
||||
and TCP/IP V5.5 are affected by this. */
|
||||
#define MAX_INITIAL_POST_SIZE (60*1024)
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
@ -32,6 +39,9 @@
|
||||
/* Define if you have the geteuid function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define if you have the basename function. */
|
||||
#define HAVE_BASENAME 1
|
||||
|
||||
/* Define if you have the gethostbyaddr function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user