[hackers] [quark] Fix Content-Length calculation || Quentin Rameau

From: <git_AT_suckless.org>
Date: Sat, 22 Jul 2017 13:32:10 +0200 (CEST)

commit 64e7dc3fdaabb47446eeb04e2d7849f91add26e5
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sat Jul 22 00:07:00 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Sat Jul 22 13:32:06 2017 +0200

    Fix Content-Length calculation

diff --git a/quark.c b/quark.c
index f2014c2..07cec1e 100644
--- a/quark.c
+++ b/quark.c
_AT_@ -695,7 +695,7 @@ sendresponse(int fd, struct request *r)
 
         /* range */
         lower = 0;
- upper = st.st_size;
+ upper = st.st_size - 1;
 
         if (r->field[REQ_RANGE][0]) {
                 /* parse field */
Received on Sat Jul 22 2017 - 13:32:10 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 22 2017 - 13:38:01 CEST