forked from boostorg/beast
Refactor HTTP identifier names (API Change):
fix #171 Several names and HTTP identifiers are renamed to be more consistent, self-explanatory, and concise: * "Fields" is a collection of HTTP header fields (rfc7230 section 3.2) * "Header" is the Start Line plus Fields. Another way to look at it is, the HTTP message minus the body. * `basic_fields` replaces `basic_headers` * `fields` replaces `headers` * `Fields` replaces `Headers` in template parameter lists * `header` replaces `message_headers` * `header::fields` replaces `message_headers::fields` The changes are cosmetic and do not affect run-time behavior.
This commit is contained in:
+7
-7
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "fail_parser.hpp"
|
||||
|
||||
#include <beast/http/headers.hpp>
|
||||
#include <beast/http/fields.hpp>
|
||||
#include <beast/http/streambuf_body.hpp>
|
||||
#include <beast/test/fail_stream.hpp>
|
||||
#include <beast/test/string_stream.hpp>
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
sb.prepare(len), buffer(s, len)));
|
||||
test::fail_counter fc{n};
|
||||
test::string_stream ss{ios_, s};
|
||||
parser_v1<isRequest, fail_body, headers> p{fc};
|
||||
parser_v1<isRequest, fail_body, fields> p{fc};
|
||||
error_code ec;
|
||||
parse(ss, sb, p, ec);
|
||||
if(! ec)
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
{
|
||||
streambuf sb;
|
||||
test::string_stream ss(ios_, "GET / X");
|
||||
parser_v1<true, streambuf_body, headers> p;
|
||||
parser_v1<true, streambuf_body, fields> p;
|
||||
parse(ss, sb, p);
|
||||
fail();
|
||||
}
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
"Content-Length: 5\r\n"
|
||||
"\r\n"
|
||||
};
|
||||
request_headers m;
|
||||
request_header m;
|
||||
try
|
||||
{
|
||||
streambuf sb;
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
"Content-Length: 0\r\n"
|
||||
"\r\n"
|
||||
);
|
||||
request_headers m;
|
||||
request_header m;
|
||||
error_code ec;
|
||||
streambuf sb;
|
||||
async_read(fs, sb, m, do_yield[ec]);
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
{
|
||||
streambuf sb;
|
||||
test::string_stream ss(ios_, "");
|
||||
parser_v1<true, streambuf_body, headers> p;
|
||||
parser_v1<true, streambuf_body, fields> p;
|
||||
error_code ec;
|
||||
parse(ss, sb, p, ec);
|
||||
BEAST_EXPECT(ec == boost::asio::error::eof);
|
||||
@@ -367,7 +367,7 @@ public:
|
||||
{
|
||||
streambuf sb;
|
||||
test::string_stream ss(ios_, "");
|
||||
parser_v1<true, streambuf_body, headers> p;
|
||||
parser_v1<true, streambuf_body, fields> p;
|
||||
error_code ec;
|
||||
async_parse(ss, sb, p, do_yield[ec]);
|
||||
BEAST_EXPECT(ec == boost::asio::error::eof);
|
||||
|
||||
Reference in New Issue
Block a user