[whatwg/fetch] Request.headers is shared across Requests. Is it OK? (#1075)

```
const r1 = new Request('/');
const r2 = new Request(r1);
```

Because _r2_ is created without _init_ argument, _r2_'s associated request's header list is _r1_'s associated request's header list. Hence modification is shared.

```
r1.headers.set('x', 'y');
r2.headers.get('x') // => returns 'y'.
```

Is it OK? Or should we clone the header list?

This was introduced at #560 I think.

@youennf @annevk @jakearchibald 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1075

Received on Tuesday, 18 August 2020 08:23:47 UTC