Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/boost/http_proto/request.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class request
@endcode

@par Complexity
Linear in `obsolete_reason(s).size()`.
Linear in `to_string(s).size()`.

@par Exception Safety
Calls to allocate may throw.
Expand Down
4 changes: 2 additions & 2 deletions include/boost/http_proto/response.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class response
@endcode

@par Complexity
Linear in `obsolete_reason(s).size()`.
Linear in `to_string(s).size()`.

@par Exception Safety
Calls to allocate may throw.
Expand Down Expand Up @@ -195,7 +195,7 @@ class response
@endcode

@par Complexity
Linear in `obsolete_reason(s).size()`.
Linear in `to_string(s).size()`.

@par Exception Safety
Calls to allocate may throw.
Expand Down
4 changes: 2 additions & 2 deletions include/boost/http_proto/response_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class response_base
{
set_start_line_impl(sc,
static_cast<unsigned short>(sc),
obsolete_reason(sc), v);
to_string(sc), v);
}

/** Set the HTTP version of the response
Expand Down Expand Up @@ -173,7 +173,7 @@ class response_base
detail::throw_invalid_argument();
set_start_line_impl(sc,
static_cast<unsigned short>(sc),
obsolete_reason(sc),
to_string(sc),
version());
}

Expand Down
2 changes: 1 addition & 1 deletion include/boost/http_proto/status.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ to_status_class(status v);
*/
BOOST_HTTP_PROTO_DECL
core::string_view
obsolete_reason(status v);
to_string(status v);

/** Outputs the reason-phrase of a status code to a stream.

Expand Down
4 changes: 2 additions & 2 deletions src/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ to_status_class(status v)
}

core::string_view
obsolete_reason(
to_string(
status v)
{
switch(static_cast<status>(v))
Expand Down Expand Up @@ -210,7 +210,7 @@ obsolete_reason(
std::ostream&
operator<<(std::ostream& os, status v)
{
return os << obsolete_reason(v);
return os << to_string(v);
}

} // http_proto
Expand Down
2 changes: 1 addition & 1 deletion test/unit/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class status_test
auto const good =
[&](status v)
{
BOOST_TEST(obsolete_reason(v) != "Unknown Status");
BOOST_TEST(to_string(v) != "Unknown Status");
};
good(status::continue_);
good(status::switching_protocols);
Expand Down
Loading