forked from boostorg/beast
header::version is unsigned (API Change)
This commit is contained in:
@@ -135,12 +135,12 @@ public:
|
||||
template<class String>
|
||||
void
|
||||
prepare(String& s, basic_fields const& f,
|
||||
int version, verb v);
|
||||
unsigned version, verb v);
|
||||
|
||||
template<class String>
|
||||
void
|
||||
prepare(String&s, basic_fields const& f,
|
||||
int version, int code);
|
||||
unsigned version, int code);
|
||||
|
||||
basic_fields const& f_;
|
||||
static_string<max_static_start_line> ss_;
|
||||
@@ -154,9 +154,11 @@ public:
|
||||
field_range,
|
||||
boost::asio::const_buffers_1>;
|
||||
|
||||
reader(basic_fields const& f, int version, verb v);
|
||||
reader(basic_fields const& f,
|
||||
unsigned version, verb v);
|
||||
|
||||
reader(basic_fields const& f, int version, int code);
|
||||
reader(basic_fields const& f,
|
||||
unsigned version, int code);
|
||||
|
||||
const_buffers_type
|
||||
get() const
|
||||
@@ -173,7 +175,7 @@ template<class String>
|
||||
void
|
||||
basic_fields<Allocator>::reader::
|
||||
prepare(String& s, basic_fields const& f,
|
||||
int version, verb v)
|
||||
unsigned version, verb v)
|
||||
{
|
||||
if(v == verb::unknown)
|
||||
{
|
||||
@@ -214,7 +216,7 @@ template<class String>
|
||||
void
|
||||
basic_fields<Allocator>::reader::
|
||||
prepare(String& s,basic_fields const& f,
|
||||
int version, int code)
|
||||
unsigned version, int code)
|
||||
{
|
||||
if(version == 11)
|
||||
{
|
||||
@@ -253,7 +255,8 @@ prepare(String& s,basic_fields const& f,
|
||||
|
||||
template<class Allocator>
|
||||
basic_fields<Allocator>::reader::
|
||||
reader(basic_fields const& f, int version, verb v)
|
||||
reader(basic_fields const& f,
|
||||
unsigned version, verb v)
|
||||
: f_(f)
|
||||
{
|
||||
try
|
||||
@@ -270,7 +273,8 @@ reader(basic_fields const& f, int version, verb v)
|
||||
|
||||
template<class Allocator>
|
||||
basic_fields<Allocator>::reader::
|
||||
reader(basic_fields const& f, int version, int code)
|
||||
reader(basic_fields const& f,
|
||||
unsigned version, int code)
|
||||
: f_(f)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -63,13 +63,13 @@ struct header<true, Fields> : Fields
|
||||
This holds both the major and minor version numbers,
|
||||
using these formulas:
|
||||
@code
|
||||
int major = version / 10;
|
||||
int minor = version % 10;
|
||||
unsigned major = version / 10;
|
||||
unsigned minor = version % 10;
|
||||
@endcode
|
||||
|
||||
Newly constructed headers will use HTTP/1.1 by default.
|
||||
*/
|
||||
int version = 11;
|
||||
unsigned version = 11;
|
||||
|
||||
/// Default constructor
|
||||
header() = default;
|
||||
@@ -207,13 +207,13 @@ struct header<false, Fields> : Fields
|
||||
This holds both the major and minor version numbers,
|
||||
using these formulas:
|
||||
@code
|
||||
major = version / 10;
|
||||
minor = version % 10;
|
||||
unsigned major = version / 10;
|
||||
unsigned minor = version % 10;
|
||||
@endcode
|
||||
|
||||
Newly constructed headers will use HTTP/1.1 by default.
|
||||
*/
|
||||
int version = 11;
|
||||
unsigned version = 11;
|
||||
|
||||
/// Default constructor.
|
||||
header() = default;
|
||||
|
||||
Reference in New Issue
Block a user