diff options
author | tiptorrent development team <tiptorrent@soleta.eu> | 2022-02-12 12:54:34 +0100 |
---|---|---|
committer | tiptorrent development team <tiptorrent@soleta.eu> | 2022-02-12 12:58:44 +0100 |
commit | 86beaee6e6fc602f170dc4a7efd205253b37142a (patch) | |
tree | f50095b87fcc26bb5b6e81b9401cf1e4b369bc72 | |
parent | cc67335f13b62c177ab2c511a95d2bf31a986170 (diff) |
fix received data incorrect arithmetics
subtract HTTP header otherwise connection is closed before all data is
received.
-rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -191,7 +191,7 @@ static int tip_client_get_hdr(struct tip_client *cli) header_len = trailer - cli->buf; payload = cli->buf + header_len; payload_len = cli->buf_len - header_len; - cli->data_len += cli->buf_len; + cli->data_len += payload_len; cli->buf_len = 0; gettimeofday(&cli->tv_start, NULL); cli->tv_last = cli->tv_start; |