Fix some bugs, normalize code style, update documentation, add tests

Method needs to be public to be useful, updated return type to const
reference for efficiency
This commit is contained in:
Peter Thorson committed 2016-10-14 08:27:06 -05:00
1 parent e1f75756d1
commit abf927bb24
4 files changed
+26 -7

No files matched your search

+12
View File
@@ -506,6 +506,18 @@ BOOST_AUTO_TEST_CASE( basic_request_with_body ) {
BOOST_CHECK_EQUAL( r.get_header("Host"), "www.example.com" );
BOOST_CHECK_EQUAL( r.get_header("Content-Length"), "5" );
BOOST_CHECK_EQUAL( r.get_body(), "abcde" );
BOOST_CHECK_EQUAL( r.get_headers().size(), 2);
websocketpp::http::parser::header_list::const_iterator it = r.get_headers().begin();
BOOST_CHECK_EQUAL( it->first, "Content-Length");
BOOST_CHECK_EQUAL( it->second, "5");
it++;
BOOST_CHECK_EQUAL( it->first, "Host");
BOOST_CHECK_EQUAL( it->second, "www.example.com");
}
BOOST_AUTO_TEST_CASE( basic_request_with_body_split ) {