Re: Resumable Uploads

Daniel Stenberg <> Sat, 20 April 2013 21:21 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 3A3CB21F8AE8 for <>; Sat, 20 Apr 2013 14:21:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id yWXwiufzbQDf for <>; Sat, 20 Apr 2013 14:21:41 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 4F2B421F86D3 for <>; Sat, 20 Apr 2013 14:21:41 -0700 (PDT)
Received: from lists by with local (Exim 4.72) (envelope-from <>) id 1UTfDj-0007xV-6y for; Sat, 20 Apr 2013 21:21:19 +0000
Resent-Date: Sat, 20 Apr 2013 21:21:19 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtp (Exim 4.72) (envelope-from <>) id 1UTfDg-0007wm-0u for; Sat, 20 Apr 2013 21:21:16 +0000
Received: from ([]) by with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <>) id 1UTfDd-0007Gj-95 for; Sat, 20 Apr 2013 21:21:15 +0000
Received: from (localhost.localdomain []) by (8.14.4/8.14.4/Debian-2) with ESMTP id r3KLKamH018494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 20 Apr 2013 23:20:36 +0200
Received: from localhost (dast@localhost) by (8.14.4/8.14.4/Submit) with ESMTP id r3KLKZYU018490; Sat, 20 Apr 2013 23:20:35 +0200
X-Authentication-Warning: dast owned process doing -bs
Date: Sat, 20 Apr 2013 23:20:35 +0200
From: Daniel Stenberg <>
To: Yoav Nir <>
cc: Felix Geisendörfer <>, Mark Nottingham <>, HTTP Working Group <>
In-Reply-To: <>
Message-ID: <>
References: <> <> <> <>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format="flowed"; charset="US-ASCII"
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.766, RP_MATCHES_RCVD=-0.702, SPF_PASS=-0.001
X-W3C-Scan-Sig: 1UTfDd-0007Gj-95 b2d28b4ab0172680789f8c8504f110d8
Subject: Re: Resumable Uploads
Archived-At: <>
X-Mailing-List: <> archive/latest/17436
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

On Sat, 20 Apr 2013, Yoav Nir wrote:

> How does the server know when the whole thing has been uploaded?  Wouldn't 
> we need some kind of "total-length" header, perhaps in the initial PUT?
> Or are we assuming that the initial PUT is trying to upload everything, and 
> only failure leads to sending the PATCH?

The initial upload could still send "everything" that is everything for that 
particular operation at that time, and then you'd set the expected size of the 
body like always with Content-Length: (or use chunked-encoding or ...).

If you then want to append data to the remote resource, which very well could 
happen without a failure anywhere. Let's for example imagine the case where 
host A just wants to append data to a logfile on host B. It could then append 
a chunk of data every now and then.

I agree with Fredrik's statement that a simple PUT + offset header would be 
easiest for a client (and possibly server too), but I just previously quoted 
the reasoning in the spec as to why it currently doesn't think that is a good 
idea. It would be more productive if we would instead counter that argument or 
present an alternative way.