Make sure MutableHeaders._list is actually a list#1917
Conversation
starlette/datastructures.py
Outdated
| scope: typing.Optional[typing.Mapping[str, typing.Any]] = None, | ||
| ) -> None: | ||
| super().__init__(headers, raw, scope) | ||
| self._list = list(self._list) |
There was a problem hiding this comment.
I think doing this (line 595) in the parent class is good enough.
There was a problem hiding this comment.
Also a test case covering the issue is wanted.
There was a problem hiding this comment.
Feel free to update the branch, I’m on my phone and AFK the rest of the day
There was a problem hiding this comment.
Same thing. Let's postpone it till morning.
|
Looks like the test revealed a very real issue: we assume that |
thank you! this was the problem I was alluding to in #1909 - this definitely fixes it. 💯 |
Fixed #1909