[Bug 23348] The loaded property doesn't make sense when the body is compressed

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23348

--- Comment #13 from Boris Zbarsky <bzbarsky@mit.edu> ---
Marcelo,

> So, either the specifications are not clear,

The specification used to say something somewhat different from what it does
now.  It was changed, for exactly the reason you describe somewhat recently
(last year?).  Updating to the current spec draft for XHR doesn't seem like a
high priority for browsers, for various reasons.

Note also that reporting the length of uncompressed data received is an obvious
consequence of the HTTP library handling decompression, so it could in fact
happen easily in different browsers, because having the HTTP library handle
decompression is a very reasonable design decision.

> And I believe that is what needs to be clarified on the specifications.

It's already very clear in the specification as it is today.

> but loaded is wrong. Why?

Because getting the number of entity-body bytes processed so far is not trivial
with most HTTP libraries?

Glenn,

> My test case is here: https://zewt.org/~glenn/test-xhr-progress-events.html.

In Gecko this testcase is fundamentally not doing what you'd think because
Gecko uses progress notifications from the HTTP library to drive its "total"
reporting, but it needs to ask for those at send() time.  Try adding you
onprogress listener before you call send()...

Yes, it's broken.  It's all very broken.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 26 September 2013 02:07:25 UTC