Correct an off-by-one error in HTTP range handling.
Patch obtained from: gatling CVS PR: ports/76913 Submitted by: Thomas-Martin Seck (maintainer)
This commit is contained in:
parent
0271a27d96
commit
e4cd173d8b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=127842
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= gatling
|
||||
PORTVERSION= 0.5
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= www benchmarks ftp ipv6
|
||||
MASTER_SITES= http://dl.fefe.de/
|
||||
|
||||
|
19
www/gatling/files/patch-gatling.c
Normal file
19
www/gatling/files/patch-gatling.c
Normal file
@ -0,0 +1,19 @@
|
||||
--- gatling.c.orig Wed Jul 28 15:23:51 2004
|
||||
+++ gatling.c Mon Jan 31 18:42:03 2005
|
||||
@@ -1261,6 +1261,7 @@ e404:
|
||||
++c;
|
||||
if ((i=scan_ulonglong(c,&range_last))) {
|
||||
if (!i) goto rangeerror;
|
||||
+ ++range_last;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1311,7 +1312,7 @@ rangeerror:
|
||||
c+=fmt_str(c,"\r\nContent-Range: bytes ");
|
||||
c+=fmt_ulonglong(c,range_first);
|
||||
c+=fmt_str(c,"-");
|
||||
- c+=fmt_ulonglong(c,range_last);
|
||||
+ c+=fmt_ulonglong(c,range_last-1);
|
||||
c+=fmt_str(c,"/");
|
||||
c+=fmt_ulonglong(c,ss.st_size);
|
||||
}
|
Loading…
Reference in New Issue
Block a user