Loading lib/http_chunks.c +8 −4 Original line number Diff line number Diff line Loading @@ -100,14 +100,17 @@ void Curl_httpchunk_init(struct connectdata *conn) */ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap, ssize_t length, ssize_t *wrote) ssize_t datalen, ssize_t *wrotep) { CURLcode result=CURLE_OK; struct Curl_chunker *ch = &conn->proto.http->chunk; struct Curl_transfer_keeper *k = &conn->keep; int piece; *wrote = 0; /* nothing yet */ size_t piece; size_t length = (size_t)datalen; size_t *wrote = (size_t *)wrotep; *wrote = 0; /* nothing's written yet */ while(length) { switch(ch->state) { Loading Loading @@ -212,6 +215,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, if(result) return CHUNKE_WRITE_ERROR; *wrote += piece; ch->datasize -= piece; /* decrease amount left to expect */ Loading lib/http_chunks.h +2 −2 Original line number Diff line number Diff line Loading @@ -81,8 +81,8 @@ struct Curl_chunker { char hexbuffer[ MAXNUM_SIZE + 1]; int hexindex; ChunkyState state; ssize_t datasize; ssize_t dataleft; /* untouched data amount at the end of the last buffer */ size_t datasize; size_t dataleft; /* untouched data amount at the end of the last buffer */ }; #endif Loading
lib/http_chunks.c +8 −4 Original line number Diff line number Diff line Loading @@ -100,14 +100,17 @@ void Curl_httpchunk_init(struct connectdata *conn) */ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap, ssize_t length, ssize_t *wrote) ssize_t datalen, ssize_t *wrotep) { CURLcode result=CURLE_OK; struct Curl_chunker *ch = &conn->proto.http->chunk; struct Curl_transfer_keeper *k = &conn->keep; int piece; *wrote = 0; /* nothing yet */ size_t piece; size_t length = (size_t)datalen; size_t *wrote = (size_t *)wrotep; *wrote = 0; /* nothing's written yet */ while(length) { switch(ch->state) { Loading Loading @@ -212,6 +215,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, if(result) return CHUNKE_WRITE_ERROR; *wrote += piece; ch->datasize -= piece; /* decrease amount left to expect */ Loading
lib/http_chunks.h +2 −2 Original line number Diff line number Diff line Loading @@ -81,8 +81,8 @@ struct Curl_chunker { char hexbuffer[ MAXNUM_SIZE + 1]; int hexindex; ChunkyState state; ssize_t datasize; ssize_t dataleft; /* untouched data amount at the end of the last buffer */ size_t datasize; size_t dataleft; /* untouched data amount at the end of the last buffer */ }; #endif