reagent/http

Are you forget to increment request pointer?

shibormot opened this issue · 0 comments

Good day, reagent.
As I understand, you forget to increment request pointer in the loop that send request to server:

http/src/connect.c

Lines 58 to 67 in 5f4a15b

while (1) {
bytes_sent = send(sockfd, request, strlen(request), 0);
total_bytes_sent += bytes_sent;
debug("Bytes sent: %ld", bytes_sent);
if (total_bytes_sent >= bytes_to_send) {
break;
}
}

If for some reason a second iteration will be present, then client will try to send request from the beginning of request string, but sent bytes counters would have been incremented already.
Or I am missing something?