Re: Beacon feedback

On Fri, 2014-04-25 at 15:49 +0200, Anne van Kesteren wrote:
> On Fri, Apr 25, 2014 at 3:35 PM, Philippe Le Hegaret <plh@w3.org> wrote:
> > On Thu, 2014-02-13 at 18:25 +0000, Anne van Kesteren wrote:
> >> 2f) You don't deal with closed blobs (unclear yet how that should be done).
> >
> > The size attribute for the Blob would be 0 [1] after a close so I'd
> > expect the raw data to be empty for a closed Blob. Looking at the send
> > method for XHR or the Blob constructor itself, they don't seem to do
> > anything special in those cases, so they'd expect the same thing as well
> > I presume. A note could be added to step 6 in Beacon if needed but it's
> > not clear to me why we would need to do so in Beacon, while this is not
> > done in XHR or the Blob constructor definition.
> >
> > [1] http://www.w3.org/TR/FileAPI/#dfn-close
> 
> As I said, it's not clear yet how it should be done, but this is most
> definitely wrong in XMLHttpRequest.

Isn't the problem in the File API itself then? It's missing a definition
for "raw data", ie if size = 0, raw data is empty (or undefined?).
Looking further, I note that Blob.slice doesn't return an error when
invoked on a closed Blob either. It returns an empty Blob instead. So, I
still believe that sending a closed Blob on Beacon should succeed with
no data being sent instead of returning false.

Philippe

Received on Friday, 25 April 2014 14:21:09 UTC