mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-12 16:50:26 +00:00
Preserve aliased keys when erasing entries (#2659)
Co-authored-by: astunm <astunm@users.noreply.github.com>
This commit is contained in:
1 parent
cdcd2ac6e6
commit
cc7a30f12f
2 files changed
+8
-1
No files matched your search
@@ -1344,7 +1344,7 @@ public:
|
||||
size_type erase(const std::string &key) {
|
||||
auto before = entries_.size();
|
||||
entries_.erase(std::remove_if(entries_.begin(), entries_.end(),
|
||||
[&](const value_type &entry) {
|
||||
[key](const value_type &entry) {
|
||||
return keys_equal(entry.first, key);
|
||||
}),
|
||||
entries_.end());
|
||||
|
||||
Reference in new issue
Block a user