On 4/28/2019 1:27 PM, Christopher Head via curl-library wrote:
> I’m trying to PUT a sub-interval of a file. In simple terms, for the
> sake of example, let’s say I have a 4-byte file and I want to PUT the
> middle two bytes.


That's not allowed. To PUT is to completely replace a resource. PATCH
[1] was created to modify an existing resource but the problem is race
conditions and support. In other words you go to modify a resource and
someone else could also be modifying the resource (solution If-Match I
think), or the server may not support it (check OPTIONS on the resource
for supported types). Though libcurl doesn't have native support for it,
you could probably build a custom request. I really don't know a lot
about it, hopefully others here know more. I'd read the RFC if you have
a chance it looks like a short read.

[1]: https://tools.ietf.org/html/rfc5789



Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to