cURL / Mailing Lists / curl-library / Single Mail

curl-library

reworked my patch and used curl-7.8.1-pre5 as the basis

From: Georg Huettenegger <georg_at_ist.org>
Date: Mon, 20 Aug 2001 11:04:48 +0200 (CEST)

hi,

after some disucussions with daniel i reworked my patch and took
curl-7.8.1-pre5 as the basis.

the following points are addressed with my patch:
o) changed some char * to const char * to make the compiler happy
(although there are quite a number of char * that could be made to const
char *)

o) changed the Curl_FormReader implementation to copy as much data as
possible into the given buffer (the old function is still around as
the internal funtion Curl_FormReadOneLine for the new Expect:
100-continue header)

o) the new default behaviour of the library is to use a 100-continue
handshake with the webserver. if this is not appropriate disable the
header (using curl_easy_setopt (CURLOPT_HTTPHEADER)) - this is shown in
the new sample postit2.c This change affects urldata.h, url.c, http.c,
and transfer.c (that waits for the 100-continue header before it
writes anything - if a timeout is encountered it nevertheless writes
without waiting any further).

o) added a new function curl_formadd that is intended to supersede
curl_formparse (and i already changed the documentation to state that
curl_formparse is deprecated => if that is not agreed i will change it
back). it does allow the following: adding simple name/content
sections, adding single and multiple file sections, adding sections
where a pointer to the memory is provided (and in case the length is
also provided the memory is allowed to contain null
characters). Everything may have a contenttype.

As for the new curl_formadd: within my patch is the manpage i wrote
with examples that show what it is capable of. if some functionality
the old formparse offers is missing please let me know! i added also
some testcases into formdata.c itself so looking at the end of the
formdata.c file also gives some insight into the new functionality.

i would suggest adding my changes into curl-7.9 (or better in the
first 7.9 pre) and not into 7.8.1 so that my changes can be tested for
some time.

bye,
 georg

Received on 2001-08-20