Tests and fixes for remove_entry and remove_entry_mult#449
Merged
seanmonstar merged 7 commits intohyperium:masterfrom Dec 11, 2020
Merged
Tests and fixes for remove_entry and remove_entry_mult#449seanmonstar merged 7 commits intohyperium:masterfrom
seanmonstar merged 7 commits intohyperium:masterfrom
Conversation
This is just a self contained test case, currently reproducing the panic of hyperium#446.
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
Also note that if I backport these tests to v0.1.19 (immediately before 82d53db, the seemingly most relevant change), the tests fail in a similar fashion, so this is a long standing bug. |
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 <sean@seanmonstar.com>
AuthorDate: Mon Nov 25 17:34:30 2019 -0800
Commit: Sean McArthur <sean@seanmonstar.com>
CommitDate: Tue Nov 26 10:03:09 2019 -0800
Make ValueDrain eagerly collect its extra values
...which was reverted in 6c2b789.
340ee18 to
e419939
Compare
Contributor
Author
Contributor
Author
|
Comparing Fixes #446 |
Merged
BenxiangGe
pushed a commit
to BenxiangGe/http
that referenced
this pull request
Jul 26, 2021
* 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 <sean@seanmonstar.com> AuthorDate: Mon Nov 25 17:34:30 2019 -0800 Commit: Sean McArthur <sean@seanmonstar.com> CommitDate: Tue Nov 26 10:03:09 2019 -0800 Make ValueDrain eagerly collect its extra values ...which was reverted in 6c2b789. Closes hyperium#446
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initially this just adds test coverage for
header::OccupiedEntry::remove_entry_mult, reproducing #446 and will fail CI.