curl / Mailing Lists / curl-library / Single Mail


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

From: Daniel Stenberg via curl-library <>
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):
> 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]).

Received on 2019-04-30