mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 05:44:38 +02:00
status-codes is unsigned (API Change)
This commit is contained in:
@@ -9,6 +9,7 @@ Version 61:
|
|||||||
API Changes:
|
API Changes:
|
||||||
|
|
||||||
* header::version is unsigned
|
* header::version is unsigned
|
||||||
|
* status-codes is unsigned
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -140,7 +140,7 @@ public:
|
|||||||
template<class String>
|
template<class String>
|
||||||
void
|
void
|
||||||
prepare(String&s, basic_fields const& f,
|
prepare(String&s, basic_fields const& f,
|
||||||
unsigned version, int code);
|
unsigned version, unsigned code);
|
||||||
|
|
||||||
basic_fields const& f_;
|
basic_fields const& f_;
|
||||||
static_string<max_static_start_line> ss_;
|
static_string<max_static_start_line> ss_;
|
||||||
@@ -158,7 +158,7 @@ public:
|
|||||||
unsigned version, verb v);
|
unsigned version, verb v);
|
||||||
|
|
||||||
reader(basic_fields const& f,
|
reader(basic_fields const& f,
|
||||||
unsigned version, int code);
|
unsigned version, unsigned code);
|
||||||
|
|
||||||
const_buffers_type
|
const_buffers_type
|
||||||
get() const
|
get() const
|
||||||
@@ -216,7 +216,7 @@ template<class String>
|
|||||||
void
|
void
|
||||||
basic_fields<Allocator>::reader::
|
basic_fields<Allocator>::reader::
|
||||||
prepare(String& s,basic_fields const& f,
|
prepare(String& s,basic_fields const& f,
|
||||||
unsigned version, int code)
|
unsigned version, unsigned code)
|
||||||
{
|
{
|
||||||
if(version == 11)
|
if(version == 11)
|
||||||
{
|
{
|
||||||
@@ -274,7 +274,7 @@ reader(basic_fields const& f,
|
|||||||
template<class Allocator>
|
template<class Allocator>
|
||||||
basic_fields<Allocator>::reader::
|
basic_fields<Allocator>::reader::
|
||||||
reader(basic_fields const& f,
|
reader(basic_fields const& f,
|
||||||
unsigned version, int code)
|
unsigned version, unsigned code)
|
||||||
: f_(f)
|
: f_(f)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@@ -17,7 +17,7 @@ namespace detail {
|
|||||||
|
|
||||||
template<class = void>
|
template<class = void>
|
||||||
status
|
status
|
||||||
int_to_status(int v)
|
int_to_status(unsigned v)
|
||||||
{
|
{
|
||||||
switch(static_cast<status>(v))
|
switch(static_cast<status>(v))
|
||||||
{
|
{
|
||||||
@@ -106,7 +106,7 @@ int_to_status(int v)
|
|||||||
|
|
||||||
template<class = void>
|
template<class = void>
|
||||||
string_view
|
string_view
|
||||||
status_to_string(int v)
|
status_to_string(unsigned v)
|
||||||
{
|
{
|
||||||
switch(static_cast<status>(v))
|
switch(static_cast<status>(v))
|
||||||
{
|
{
|
||||||
@@ -189,7 +189,7 @@ status_to_string(int v)
|
|||||||
|
|
||||||
template<class = void>
|
template<class = void>
|
||||||
status_class
|
status_class
|
||||||
to_status_class(int v)
|
to_status_class(unsigned v)
|
||||||
{
|
{
|
||||||
switch(v / 100)
|
switch(v / 100)
|
||||||
{
|
{
|
||||||
@@ -208,14 +208,14 @@ to_status_class(int v)
|
|||||||
|
|
||||||
inline
|
inline
|
||||||
status
|
status
|
||||||
int_to_status(int v)
|
int_to_status(unsigned v)
|
||||||
{
|
{
|
||||||
return detail::int_to_status(v);
|
return detail::int_to_status(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
status_class
|
status_class
|
||||||
to_status_class(int v)
|
to_status_class(unsigned v)
|
||||||
{
|
{
|
||||||
return detail::to_status_class(v);
|
return detail::to_status_class(v);
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,7 @@ string_view
|
|||||||
obsolete_reason(status v)
|
obsolete_reason(status v)
|
||||||
{
|
{
|
||||||
return detail::status_to_string(
|
return detail::status_to_string(
|
||||||
static_cast<int>(v));
|
static_cast<unsigned>(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
namespace beast {
|
namespace beast {
|
||||||
namespace http {
|
namespace http {
|
||||||
|
|
||||||
enum class status : unsigned short
|
enum class status : unsigned
|
||||||
{
|
{
|
||||||
/** An unknown status-code.
|
/** An unknown status-code.
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ enum class status : unsigned short
|
|||||||
|
|
||||||
/** Represents the class of a status-code.
|
/** Represents the class of a status-code.
|
||||||
*/
|
*/
|
||||||
enum class status_class : int
|
enum class status_class : unsigned
|
||||||
{
|
{
|
||||||
/// Unknown status-class
|
/// Unknown status-class
|
||||||
unknown = 0,
|
unknown = 0,
|
||||||
@@ -123,7 +123,7 @@ enum class status_class : int
|
|||||||
@ref status::unknown is returned.
|
@ref status::unknown is returned.
|
||||||
*/
|
*/
|
||||||
status
|
status
|
||||||
int_to_status(int v);
|
int_to_status(unsigned v);
|
||||||
|
|
||||||
/** Convert an integer to a status_class.
|
/** Convert an integer to a status_class.
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ int_to_status(int v);
|
|||||||
a known status class, @ref status_class::unknown is returned.
|
a known status class, @ref status_class::unknown is returned.
|
||||||
*/
|
*/
|
||||||
status_class
|
status_class
|
||||||
to_status_class(int v);
|
to_status_class(unsigned v);
|
||||||
|
|
||||||
/** Convert a status_code to a status_class.
|
/** Convert a status_code to a status_class.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user