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:
Vinnie Falco
2017-06-10 15:05:32 -07:00
parent 0d70d90b75
commit 8c4136bb73
11 changed files with 692 additions and 493 deletions

View File

@@ -88,7 +88,7 @@ boost::asio::ip::tcp::socket sock{ios};
//[ws_snippet_10
response_type res;
ws.handshake(res, "localhost", "/");
if(! res.exists(http::field::sec_websocket_protocol))
if(! res.count(http::field::sec_websocket_protocol))
throw std::invalid_argument("missing subprotocols");
//]