curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Ranged PUTs, Content-Range, and Content-Length

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 30 Apr 2019 16:43:12 +0200 (CEST)

On Tue, 30 Apr 2019, m brandenberg via curl-library wrote:

> Well, 2616 specifically defines some "MUST NOT" behavior around this case
> (PUT + "Content-*" headers):
>
> https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
>
> So being able to send that combination correctly may be a reasonable
> expectation.

RFC 2616 is obsoleted by RFC 7231 and its section 4.3.4 which says:

    An origin server that allows PUT on a given target resource MUST send
    a 400 (Bad Request) response to a PUT request that contains a
    Content-Range header field (Section 4.2 of [RFC7233]), since the
    payload is likely to be partial content that has been mistakenly PUT
    as a full representation. Partial content updates are possible by
    targeting a separately identified resource with state that overlaps a
    portion of the larger resource, or by using a different method that
    has been specifically defined for partial updates (for example, the
    PATCH method defined in [RFC5789]).

https://tools.ietf.org/html/rfc7231#section-4.3.4

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-04-30