mirror of
https://github.com/curl/curl.git
synced 2026-04-23 13:02:13 +03:00
John McGowan found a problem where the DEBUGFUNCTION was called with bad
data on uploads.
This commit is contained in:
parent
3a01478ce8
commit
30a46e1135
1 changed files with 7 additions and 6 deletions
|
|
@ -1007,7 +1007,13 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||
&bytes_written); /* actually send away */
|
||||
if(result)
|
||||
return result;
|
||||
else if(conn->upload_present != bytes_written) {
|
||||
|
||||
if(data->set.verbose)
|
||||
/* show the data before we change the pointer upload_fromhere */
|
||||
Curl_debug(data, CURLINFO_DATA_OUT, conn->upload_fromhere,
|
||||
bytes_written);
|
||||
|
||||
if(conn->upload_present != bytes_written) {
|
||||
/* we only wrote a part of the buffer (if anything), deal with it! */
|
||||
|
||||
/* store the amount of bytes left in the buffer to write */
|
||||
|
|
@ -1032,11 +1038,6 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||
}
|
||||
}
|
||||
|
||||
if(data->set.verbose)
|
||||
Curl_debug(data, CURLINFO_DATA_OUT, conn->upload_fromhere,
|
||||
bytes_written);
|
||||
|
||||
|
||||
k->writebytecount += bytes_written;
|
||||
Curl_pgrsSetUploadCounter(data, (double)k->writebytecount);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue