void any_of_headers_full() { { vector<string> h1 = { "Foo: bar", "Content-type: application/json", "X-SuperPower: toestrength", "Accept: text/html,text/json,application/json" }; const HeaderData& hd = header_parse(h1, "X-SuperPower", "toestrength"); cout << "headers parse: " << hd << ", good " << hd.good_headers << ", bad " << hd.bad_headers; for_each(hd.found_headers.begin(), hd.found_headers.end(), [](const auto& val) { cout << "\n\t'" << val.first << "', '" << val.second << "'"; }); cout << endl; } { vector<string> h2 = { "Foo: bar", "Content-type: application/json", "X-SuperPower: supersmell", "Accept: text/ht ml,text/json,application/json" }; const HeaderData& hd = header_parse(h2, "X-SuperPower", "toestrength"); cout << "headers parse: " << hd << ", good " << hd.good_headers << ", bad " << hd.bad_headers; for_each(hd.found_headers.begin(), hd.found_headers.end(), [](const auto& val) { cout << "\n\t'" << val.first << "', '" << val.second << "'"; }); cout << endl; } { vector<string> h3 = { "Foo : bar", "Content-type: application/json", "X-Superpower: toestrength", "Accept: text/ html,text/json,application/json" }; const HeaderData& hd = header_parse(h3, "X-SuperPower", "toestrength"); cout << "headers parse: " << hd << ", good " << hd.good_headers << ", bad " << hd.bad_headers; for_each(hd.found_headers.begin(), hd.found_headers.end(), [](const auto& val) { cout << "\n\t'" << val.first << "', '" << val.second << "'"; }); cout << endl; } } Michael VanLoon - http://codeache.net - CPPcon 2015 36