Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.13k
stars
92
forks
source link
http_header_fields_t::remove_field is not convenient for deleting all occurrences of a field #113
There is no simple and efficient way of deleting all occurrences of a HTTP-field. Now we can do something like:
but that requires two lookups on every iteration of such
while
. The better way could be:and that way requires that
remove_field
returns boolean flag (is field actually removed or not).Another way is to add
remove_all_of
:and
remove_all_of
can return the number of deleted field occurrences.