[Webkit-unassigned] [Bug 171552] New: [Fetch API] Response disturbed when trying to clone before consuming

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 2 09:05:31 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=171552

            Bug ID: 171552
           Summary: [Fetch API] Response disturbed when trying to clone
                    before consuming
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Macintosh
                OS: OS X 10.11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: peleg3 at gmail.com

In latest nightly (r216067), evaluation of `response.body` leads to the response being "disturbed" when trying to clone it despite `body.locked` and `bodyUsed` being false.

Steps to reproduce: 
1. open safari
2. go to https://google.com
3. open devtools
4. run the following:

fetch('/').then(r => { r.body; r.clone() })

What happens?
"TypeError: Cannot clone a disturbed Response" is thrown.

What's expected to happen?
Both FF and Chrome clone the response correctly if it hasn't been consumed yet.


JSBin here http://jsbin.com/marogokuna/1/edit?js,output

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170502/00b2bba0/attachment.html>


More information about the webkit-unassigned mailing list