Closed l3ku closed 3 years ago
It does look like a bug in http
. However, I don't think the panic is inside remote_entry_mult()
, but rather happening during (after?) the call to collect()
, since the backtrace shows it's happening as part of the Iterator::next
. I'd have to look more to try to find why exactly, unless you wanted to try to follow the code and find the bug.
I had a related test case in flight, so I minimally reproduced this in 19e82f4. Note that it only panics with 2 or more header values for the same name; it doesn't panic on 0 or 1 header value.
I can try to look into it, but I'm not very familiar with the implementation of HeaderMap
so it might take me some time to find the root cause for the panic.
I believe #449 is now a reasonable fix. Note that tests added there show the bug extends to OccupiedEntry::remove_entry()
as well.
I am trying to remove all possible values for a
SET_COOKIE
header from aHeaderMap
, and extract them into a separate variable calledcookies
. My current code is the following:When I run this, I get the following panic:
Relevant parts of the backtrace when ran with
RUST_BACKTRACE=1
:Am I doing something wrong or is this a bug?
Thanks!