Browse Source

handle range requests for >2Gb correctly

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@357 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.3.14
Jan Kneschke 17 years ago
parent
commit
b90f231042
  1. 8
      src/response.c

8
src/response.c

@ -285,7 +285,7 @@ static int http_response_parse_range(server *srv, connection *con) {
if (s == minus) {
/* -<stop> */
le = strtol(s, &err, 10);
le = strtoll(s, &err, 10);
if (le == 0) {
/* RFC 2616 - 14.35.1 */
@ -311,7 +311,7 @@ static int http_response_parse_range(server *srv, connection *con) {
} else if (*(minus+1) == '\0' || *(minus+1) == ',') {
/* <start>- */
la = strtol(s, &err, 10);
la = strtoll(s, &err, 10);
if (err == minus) {
/* ok */
@ -338,10 +338,10 @@ static int http_response_parse_range(server *srv, connection *con) {
} else {
/* <start>-<stop> */
la = strtol(s, &err, 10);
la = strtoll(s, &err, 10);
if (err == minus) {
le = strtol(minus+1, &err, 10);
le = strtoll(minus+1, &err, 10);
/* RFC 2616 - 14.35.1 */
if (la > le) {

Loading…
Cancel
Save