You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling .clone() on a Response instance, the highWaterMark is persisted in the cloned body, but not in the cloned Request itself. This means that cloning the clone results in a lost highWaterMark.
Reproduction
Steps to reproduce the behavior:
constres=awaitfetch('https://httpbin.org/bytes/200',{highWaterMark: 1024*1024})console.log(res.highWaterMark)// Is set correctlyconstcloneOne=res.clone()console.log(cloneOne.highWaterMark)// Is undefinedconstcloneTwo=cloneOne.clone()console.log(cloneTwo.highWaterMark)// Is undefined
Expected behavior
constres=awaitfetch('https://httpbin.org/bytes/200',{highWaterMark: 1024*1024})console.log(res.highWaterMark)// Is set correctlyconstcloneOne=res.clone()console.log(cloneOne.highWaterMark)// Is set correctlyconstcloneTwo=cloneOne.clone()console.log(cloneTwo.highWaterMark)// Is set correctly
software
version
node-fetch
3.0.0-beta.9
node
14.16.1
npm
6.14.12
Operating System
Ubuntu 20.04.2 LTS
The text was updated successfully, but these errors were encountered:
When calling
.clone()
on aResponse
instance, thehighWaterMark
is persisted in the cloned body, but not in the clonedRequest
itself. This means that cloning the clone results in a losthighWaterMark
.Reproduction
Steps to reproduce the behavior:
Expected behavior
The text was updated successfully, but these errors were encountered: