Patrick Monnerat and I modified libcurl so that now it *copies* all strings

passed to it with curl_easy_setopt()! Previously it has always just refered
to the data, forcing the user to keep the data around until libcurl is done
with it. That is now history and libcurl will instead clone the given
strings and keep private copies.
This commit is contained in:
Daniel Stenberg
2007-08-01 21:20:01 +00:00
parent 006878686c
commit 50c10aa5bf
21 changed files with 364 additions and 218 deletions

View File

@@ -233,7 +233,7 @@ CURLcode Curl_readrewind(struct connectdata *conn)
/* We have sent away data. If not using CURLOPT_POSTFIELDS or
CURLOPT_HTTPPOST, call app to rewind
*/
if(data->set.postfields ||
if(data->set.str[STRING_POSTFIELDS] ||
(data->set.httpreq == HTTPREQ_POST_FORM))
; /* do nothing */
else {
@@ -992,7 +992,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
}
else if (checkprefix("Content-Encoding:", k->p) &&
data->set.encoding) {
data->set.str[STRING_ENCODING]) {
/*
* Process Content-Encoding. Look for the values: identity,
* gzip, deflate, compress, x-gzip and x-compress. x-gzip and