mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
1008: increment http_post->uploaded in read_http_post()
This commit is contained in:
parent
2d2cc6c5f5
commit
fa51846f68
@ -98,7 +98,6 @@ send_more_post_data(struct socket *socket)
|
||||
} else if (got > 0) {
|
||||
write_to_socket(socket, buffer, got, S_TRANS,
|
||||
send_more_post_data);
|
||||
http->post.uploaded += got;
|
||||
} else { /* got == 0, meaning end of data */
|
||||
close_pipe_and_read(socket);
|
||||
}
|
||||
|
@ -610,7 +610,6 @@ send_more_post_data(struct socket *socket)
|
||||
} else if (got > 0) {
|
||||
write_to_socket(socket, buffer, got, S_TRANS,
|
||||
send_more_post_data);
|
||||
http->post.uploaded += got;
|
||||
} else { /* got == 0, meaning end of data */
|
||||
/* Can't use request_from_socket() because there's no
|
||||
* more data to write. */
|
||||
|
@ -285,9 +285,10 @@ read_http_post(struct http_post *http_post,
|
||||
max - total,
|
||||
error);
|
||||
|
||||
if (chunk > 0)
|
||||
if (chunk > 0) {
|
||||
total += chunk;
|
||||
else if (chunk != -2) {
|
||||
http_post->uploaded += chunk;
|
||||
} else if (chunk != -2) {
|
||||
assert(chunk == -1 || chunk == 0);
|
||||
/* If some data has already been successfully
|
||||
* read to buffer[], tell the caller about
|
||||
|
@ -20,7 +20,8 @@ struct http_post {
|
||||
/** Total size of the POST body to be uploaded */
|
||||
off_t total_upload_length;
|
||||
|
||||
/** Amount of POST body data uploaded so far */
|
||||
/** Amount of POST body data uploaded so far.
|
||||
* read_http_post() increments this. */
|
||||
off_t uploaded;
|
||||
|
||||
/** Points to the next byte to be read from connection.uri->post.
|
||||
|
Loading…
Reference in New Issue
Block a user