Re: Resumable Uploads

Julian Reschke <julian.reschke@gmx.de> Fri, 19 April 2013 11:29 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E562E21F8ED4 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 19 Apr 2013 04:29:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.449
X-Spam-Level:
X-Spam-Status: No, score=-10.449 tagged_above=-999 required=5 tests=[AWL=-0.150, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D1e2KkBNIOBj for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 19 Apr 2013 04:29:47 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 8771121F86CD for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 19 Apr 2013 04:29:40 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UT9Um-0006OM-IW for ietf-http-wg-dist@listhub.w3.org; Fri, 19 Apr 2013 11:28:48 +0000
Resent-Date: Fri, 19 Apr 2013 11:28:48 +0000
Resent-Message-Id: <E1UT9Um-0006OM-IW@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1UT9Uj-0006Nc-DF for ietf-http-wg@listhub.w3.org; Fri, 19 Apr 2013 11:28:45 +0000
Received: from mout.gmx.net ([212.227.17.22]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1UT9Ui-0002BY-6L for ietf-http-wg@w3.org; Fri, 19 Apr 2013 11:28:45 +0000
Received: from mailout-de.gmx.net ([10.1.76.27]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MUiSQ-1U1hWA1ZGO-00YDEP for <ietf-http-wg@w3.org>; Fri, 19 Apr 2013 13:28:18 +0200
Received: (qmail invoked by alias); 19 Apr 2013 11:28:18 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.105]) [217.91.35.233] by mail.gmx.net (mp027) with SMTP; 19 Apr 2013 13:28:18 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX18lfQpY2UslAfmJF00jFThqxg7A23tkWbJAAwmc0+ jlo12hAqbVaiA/
Message-ID: <51712A49.6000901@gmx.de>
Date: Fri, 19 Apr 2013 13:28:09 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
MIME-Version: 1.0
To: =?ISO-8859-1?Q?Felix_Geisend=F6rfer?= <felix@transloadit.com>
CC: Albert Lunde <atlunde@panix.com>, Kevin Swiber <kswiber@gmail.com>, Daniel Stenberg <daniel@haxx.se>, HTTP Working Group <ietf-http-wg@w3.org>, Yves Lafon <ylafon@w3.org>
References: <CADZbJ9dYFGyrceh03M3B0KdKto7160Dis_geh9um0BhVe1re0g@mail.gmail.com> <alpine.DEB.2.00.1304182006001.21288@tvnag.unkk.fr> <29DE6A70-E3B9-4DCE-8C7E-506F6A0ADC92@gmail.com> <51706F32.5030108@panix.com> <5170E2A3.6010706@gmx.de> <CADZbJ9dGEVq-fQmhjRsddYdcg459r_zLfrOddkzHLOprZM0dNg@mail.gmail.com>
In-Reply-To: <CADZbJ9dGEVq-fQmhjRsddYdcg459r_zLfrOddkzHLOprZM0dNg@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Received-SPF: pass client-ip=212.227.17.22; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-3.8
X-W3C-Hub-Spam-Report: AWL=-3.067, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1UT9Ui-0002BY-6L c762c9fc010deaef08f662b053ff401d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Resumable Uploads
Archived-At: <http://www.w3.org/mid/51712A49.6000901@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17358
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 2013-04-19 12:57, Felix Geisendörfer wrote:
> Thanks for the replies!
>
> Using PATCH with a custom media type is unfortunately not a viable
> solution for browser based clients.  The XHR2 send interface [1] and
> File API [2] are not flexible enough to perform the body wrapping
> without loading the entire request body into memory. There is no way to
> stream body data other than providing a file object (or a slice of it).
>
> This makes specifying the enclosed byte-range in the request header the
> most desirable option. So far we are abusing the "Content-Range" header
> for this (and so does the YouTube API [3]).
>
> So I'm wondering what you'd consider to be the lesser evil: Using
> Content-Range for this, or creating a custom header?

See 
<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-22.html#rfc.section.4.3.4.p.11>:

"An origin server SHOULD reject any PUT request that contains a 
Content-Range header field (Section 4.2 of [Part5]), since it might be 
misinterpreted as partial content (or might be partial content that is 
being 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])."

If you believe that this is unreasonable, now and here are the right 
place to discuss it.

With respect to browser constraints: can you generate a multipart body?

> ...

Best regards, Julian