fix erase field

fixes #1828
closes #1829
This commit is contained in:
Richard Hodges committed 2020-02-04 18:36:50 +01:00
1 parent c9d5049307
commit 6d10adf936
3 files changed
+24 -1

No files matched your search

+17
View File
@@ -988,6 +988,21 @@ public:
BEAST_EXPECT(res[field::transfer_encoding] == "chunked, foo");
}
void
testIssue1828()
{
beast::http::fields req;
req.insert("abc", "1");
req.insert("abc", "2");
req.insert("abc", "3");
BEAST_EXPECT(req.count("abc") == 3);
auto iter = req.find("abc");
BEAST_EXPECT(iter->value() == "1");
req.insert("abc", "4");
req.erase(iter);
BEAST_EXPECT(req.count("abc") == 3);
}
void
run() override
{
@@ -1002,6 +1017,8 @@ public:
testKeepAlive();
testContentLength();
testChunked();
testIssue1828();
}
};