diff options
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r-- | src/daemon/daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 8854d2bd..dd22ce6d 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -890,7 +890,7 @@ MHD_handle_write(int connection_id, struct MHD_Daemon * daemon) { | |||
890 | return MHD_NO; | 890 | return MHD_NO; |
891 | } | 891 | } |
892 | } | 892 | } |
893 | sprintf(responseMessage, "Content-length: %i\r\n\r\n", response->size); | 893 | sprintf(responseMessage, "Content-length: %llu\r\n\r\n", (unsigned long long)response->size); |
894 | fprintf(stderr, "%s\n", responseMessage); | 894 | fprintf(stderr, "%s\n", responseMessage); |
895 | if(send(session->socket_fd, responseMessage, strlen(responseMessage),0)!= strlen(responseMessage)) { | 895 | if(send(session->socket_fd, responseMessage, strlen(responseMessage),0)!= strlen(responseMessage)) { |
896 | fprintf(stderr, "Error! could not send an entire header in one call to send! unable to handle this case as of this time.\n"); | 896 | fprintf(stderr, "Error! could not send an entire header in one call to send! unable to handle this case as of this time.\n"); |
@@ -902,7 +902,7 @@ MHD_handle_write(int connection_id, struct MHD_Daemon * daemon) { | |||
902 | i = send(session->socket_fd, response->data+response->bytesSentSoFar, response->size-response->bytesSentSoFar,0); | 902 | i = send(session->socket_fd, response->data+response->bytesSentSoFar, response->size-response->bytesSentSoFar,0); |
903 | response->bytesSentSoFar += i; | 903 | response->bytesSentSoFar += i; |
904 | 904 | ||
905 | fprintf(stderr, "Sent %i bytes of data\nTotal to send is %i bytes\n", i, response->size); | 905 | fprintf(stderr, "Sent %i bytes of data\nTotal to send is %llu bytes\n", i, (unsigned long long)response->size); |
906 | 906 | ||
907 | if(response->bytesSentSoFar == response->size) { | 907 | if(response->bytesSentSoFar == response->size) { |
908 | session->currentResponses[session->currentResponse] = NULL; | 908 | session->currentResponses[session->currentResponse] = NULL; |