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:
@@ -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
|
||||
|
Reference in New Issue
Block a user