git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] http.c: use CURLOPT_RANGE for range requests

From
Jeff King <peff@peff.net>
Date
Nov 2, 2015, 21:53 UTC
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:
Show 16 quoted lines
> 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 <dturner@twopensource.com>
> ---
> 
> 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
Previous: David Turner
Message 2 of 2 in “http.c: use CURLOPT_RANGE for range requests”
  1. http.c: use CURLOPT_RANGE for range requestsDavid Turner, Nov 2, 2015
  2. Jeff KingNov 2, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.