Distinguish HTTP/1 messages from general HTTP messages:

The version field is moved into message_v1, all public interfaces
are reworked to identify HTTP/1 wire format operations (suffix "_v1")
versus general HTTP.
This commit is contained in:
Vinnie Falco committed 2017-07-20 08:12:05 -07:00
1 parent cdde9b5ef1
commit c309f53ed2
42 files changed
+724 -697

No files matched your search

+3 -2
View File
@@ -9,6 +9,7 @@
#define BEAST_WEBSOCKET_IMPL_RESPONSE_OP_HPP
#include <beast/handler_alloc.hpp>
#include <beast/http/message_v1.hpp>
#include <beast/http/string_body.hpp>
#include <beast/http/write.hpp>
#include <memory>
@@ -27,7 +28,7 @@ class stream<NextLayer>::response_op
struct data
{
stream<NextLayer>& ws;
http::response<http::string_body> resp;
http::response_v1<http::string_body> resp;
Handler h;
error_code final_ec;
bool cont;
@@ -36,7 +37,7 @@ class stream<NextLayer>::response_op
template<class DeducedHandler,
class Body, class Headers>
data(DeducedHandler&& h_, stream<NextLayer>& ws_,
http::message<true, Body, Headers> const& req,
http::request_v1<Body, Headers> const& req,
bool cont_)
: ws(ws_)
, resp(ws_.build_response(req))