Browse Source

added large-file support for Range-Requests again.

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@625 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.2
Jan Kneschke 17 years ago
parent
commit
54d03b905b
  1. 10
      src/mod_staticfile.c

10
src/mod_staticfile.c

@ -166,12 +166,12 @@ static int http_response_parse_range(server *srv, connection *con, plugin_data *
for (s = con->request.http_range, error = 0;
!error && *s && NULL != (minus = strchr(s, '-')); ) {
char *err;
long la, le;
off_t la, le;
if (s == minus) {
/* -<stop> */
le = strtol(s, &err, 10);
le = strtoll(s, &err, 10);
if (le == 0) {
/* RFC 2616 - 14.35.1 */
@ -197,7 +197,7 @@ static int http_response_parse_range(server *srv, connection *con, plugin_data *
} else if (*(minus+1) == '\0' || *(minus+1) == ',') {
/* <start>- */
la = strtol(s, &err, 10);
la = strtoll(s, &err, 10);
if (err == minus) {
/* ok */
@ -224,10 +224,10 @@ static int http_response_parse_range(server *srv, connection *con, plugin_data *
} 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