[fetch] Mark passed Request object as disturbed (#149)

Let `req` be a Request with a non-null body. When constructing a new Request
from it, it should be marked as disturbed so as not to confuse users. As a
Request with the null body cannot be disturbed, this change sets `req`'s body
to an empty byte stream.

This was discussed at #61. It is not yet decided whether we make it possible to disturb a Request with the null body or setting the body to a non-null stream in such cases, but they are indistinguishable until we expose Request.prototype.body. See https://github.com/yutakahirano/fetch-with-streams/issues/60.
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/fetch/pull/149

-- Commit Summary --

  * Mark passed Request object as disturbed

-- File Changes --

    M Overview.html (6)
    M Overview.src.html (2)

-- Patch Links --

https://github.com/whatwg/fetch/pull/149.patch
https://github.com/whatwg/fetch/pull/149.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/149

Received on Thursday, 29 October 2015 04:22:22 UTC