Keep the upload byte counter in an curl_off_t, not an int. 32bits is not
enough. This is most likely the bug Jean-Louis Lemaire reported that makes 2GB FTP uploads to report error when completed. Also padded comments to get them aligned again, only for visibility.
This commit is contained in:
@@ -339,14 +339,14 @@ struct hostname {
|
|||||||
|
|
||||||
struct Curl_transfer_keeper {
|
struct Curl_transfer_keeper {
|
||||||
curl_off_t bytecount; /* total number of bytes read */
|
curl_off_t bytecount; /* total number of bytes read */
|
||||||
int writebytecount; /* number of bytes written */
|
curl_off_t writebytecount; /* number of bytes written */
|
||||||
struct timeval start; /* transfer started at this time */
|
struct timeval start; /* transfer started at this time */
|
||||||
struct timeval now; /* current time */
|
struct timeval now; /* current time */
|
||||||
bool header; /* incoming data has HTTP header */
|
bool header; /* incoming data has HTTP header */
|
||||||
enum {
|
enum {
|
||||||
HEADER_NORMAL, /* no bad header at all */
|
HEADER_NORMAL, /* no bad header at all */
|
||||||
HEADER_PARTHEADER, /* part of the chunk is a bad header, the rest is
|
HEADER_PARTHEADER, /* part of the chunk is a bad header, the rest
|
||||||
normal data */
|
is normal data */
|
||||||
HEADER_ALLBAD /* all was believed to be header */
|
HEADER_ALLBAD /* all was believed to be header */
|
||||||
} badheader; /* the header was deemed bad and will be
|
} badheader; /* the header was deemed bad and will be
|
||||||
written as body */
|
written as body */
|
||||||
@@ -383,7 +383,6 @@ struct Curl_transfer_keeper {
|
|||||||
z_stream z; /* State structure for zlib. */
|
z_stream z; /* State structure for zlib. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* for the low speed checks: */
|
|
||||||
time_t timeofdoc;
|
time_t timeofdoc;
|
||||||
long bodywrites;
|
long bodywrites;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user