forked from boostorg/beast
basic_fields refactor (API Change):
* Container interface more closely matches std::vector * While preserving the invariant that duplicate fields with the same case-insensitive name have their order preserved.
This commit is contained in:
1 parent
d8d3562c0f
commit
a71bb2b710
11 files changed
+692
-493
No files matched your search
@@ -204,26 +204,10 @@ private:
|
||||
}
|
||||
|
||||
void
|
||||
on_field(field f, string_view name,
|
||||
on_field(field name, string_view name_string,
|
||||
string_view value, error_code&)
|
||||
{
|
||||
if(f != field::unknown)
|
||||
{
|
||||
#if 1
|
||||
// This preserves capitalization of field names
|
||||
if(to_string(f) == name)
|
||||
m_.insert(f, value);
|
||||
else
|
||||
m_.insert(name, value);
|
||||
#else
|
||||
// This doesn't.
|
||||
m_.insert(f, value);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
m_.insert(name, value);
|
||||
}
|
||||
m_.insert(name, name_string, value);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in new issue
Block a user