From: Jeff King Date: Mon, 02 Nov 2015 21:53:24 GMT Subject: Re: [PATCH v4] http.c: use CURLOPT_RANGE for range requests Message-ID: <20151102215324.GA13765@sigill.intra.peff.net> In-Reply-To: <1446500398-12257-1-git-send-email-dturner@twopensource.com> On Mon, Nov 02, 2015 at 04:39:58PM -0500, David Turner wrote: > A HTTP server is permitted to return a non-range response to a HTTP > range request (and Apache httpd in fact does this in some cases). > While libcurl knows how to correctly handle this (by skipping bytes > before and after the requested range), it only turns on this handling > if it is aware that a range request is being made. By manually > setting the range header instead of using CURLOPT_RANGE, we were > hiding the fact that this was a range request from libcurl. This > could cause corruption. > > Signed-off-by: David Turner > --- > > This one incorporates Jeff's suggestions about off_t. It also > simplifies by removing the possiblity of a missing low-end of a range; > the entire point of this function is to add a range HEADER and a > range of - is nugatory. Thanks, looks good to me. And I learned a new vocabulary word. :) -Peff