-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected panic when using header::OccupiedEntry::remove_entry_mult #446
Comments
It does look like a bug in |
This is just a self contained test case, currently reproducing the panic of hyperium#446.
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 |
I believe #449 is now a reasonable fix. Note that tests added there show the bug extends to |
* add test case for OccupiedEntry::remove_entry_mult This is just a self contained test case, currently reproducing the panic of hyperium#446. * expand test cases for remove_entry_mult * add multiple remove_entry_mult call tests to show more issues * test repeated HeaderMap::remove for comparison * tests showing similar problem with remove_entry on extra values * fix remove_entry by moving remove_found after remove_all_extra_values * fix remove_entry_mult by eager collection of extras before remove_found In order to remove extra values prior to remove_found, we must collect them eagerly. Eager collection is based on: commit 8ffe094 Author: Sean McArthur <[email protected]> AuthorDate: Mon Nov 25 17:34:30 2019 -0800 Commit: Sean McArthur <[email protected]> CommitDate: Tue Nov 26 10:03:09 2019 -0800 Make ValueDrain eagerly collect its extra values ...which was reverted in 6c2b789. Closes hyperium#446
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!
The text was updated successfully, but these errors were encountered: