On Tue, 30 Apr 2019 03:21:28 -0400 Ray Satiro via curl-library <curl-library@cool.haxx.se> wrote:
> CURLOPT_RANGE specifically as far as I know is only supposed to be > used for download, not upload (can anyone confirm?), which would > explain what you observed [1]. Anyway, I think what Amazon is doing > is unusual and you'd have to use CURLOPT_READFUNCTION and > CURLOPT_SEEKFUNCTION (adding in your offset) and set Content-Range > and amazon specific headers yourself. And yet, looking at the source code, there are explicit conditionals to check for CURLOPT_RANGE and turn it into a Content-Range header in an upload. So obviously this works, and not just by accident: someone intentionally took the time to write code that makes CURLOPT_RANGE (and CURLOPT_RESUME_FROM, for that matter) work for uploads as well. In current master (028126281901fb651819821f5c05caaf40976209), see the conditional in lib/http.c starting at line 2458. -- Christopher Head
pgpX_AfvC_N0X.pgp
Description: OpenPGP digital signature
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html