- From: Yutaka Hirano <notifications@github.com>
- Date: Tue, 18 Aug 2020 01:23:34 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 18 August 2020 08:23:47 UTC
```
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