From 591c019988e39716600efcc1f034e88e6ddea676 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Wed, 22 Jan 2003 17:52:27 +0000 Subject: A negative offset means "get it all". --- lib/libfetch/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libfetch') diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index 00f28e8768c5..8eebb8310b5a 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -887,7 +887,7 @@ _http_request(struct url *URL, const char *op, struct url_stat *us, _http_cmd(conn, "User-Agent: %s", p); else _http_cmd(conn, "User-Agent: %s " _LIBFETCH_VER, getprogname()); - if (url->offset) + if (url->offset > 0) _http_cmd(conn, "Range: bytes=%lld-", (long long)url->offset); _http_cmd(conn, "Connection: close"); _http_cmd(conn, ""); @@ -1059,7 +1059,7 @@ _http_request(struct url *URL, const char *op, struct url_stat *us, } /* too far? */ - if (offset > URL->offset) { + if (URL->offset > 0 && offset > URL->offset) { _http_seterr(HTTP_PROTOCOL_ERROR); goto ouch; } -- cgit v1.3