mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 05:17:26 +02:00
bad_target replaces bad_path (API Change):
Actions Required: * Replace references to http::error::bad_path with http::error::bad_target
This commit is contained in:
@ -8,12 +8,15 @@ API Changes:
|
||||
|
||||
* Change BodyReader, BodyWriter requirements
|
||||
* Remove BodyReader::is_deferred
|
||||
* http::error::bad_target replaces bad_path
|
||||
|
||||
Actions Required:
|
||||
|
||||
* Change user defined instances of BodyReader and BodyWriter
|
||||
to meet the new requirements.
|
||||
|
||||
* Replace references to http::error::bad_path with http::error::bad_target
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Version 67:
|
||||
|
@ -98,7 +98,7 @@ enum class error
|
||||
bad_method,
|
||||
|
||||
/// The request-target is invalid.
|
||||
bad_path,
|
||||
bad_target,
|
||||
|
||||
/// The HTTP-version is invalid.
|
||||
bad_version,
|
||||
|
@ -318,12 +318,12 @@ parse_header(char const*& p, char const* term,
|
||||
auto const target = parse_target(p);
|
||||
if(target.empty())
|
||||
{
|
||||
ec = error::bad_path;
|
||||
ec = error::bad_target;
|
||||
return;
|
||||
}
|
||||
if(*p++ != ' ')
|
||||
{
|
||||
ec = error::bad_path;
|
||||
ec = error::bad_target;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
case error::bad_alloc: return "bad alloc";
|
||||
case error::bad_line_ending: return "bad line ending";
|
||||
case error::bad_method: return "bad method";
|
||||
case error::bad_path: return "bad path";
|
||||
case error::bad_target: return "bad target";
|
||||
case error::bad_version: return "bad version";
|
||||
case error::bad_status: return "bad status";
|
||||
case error::bad_reason: return "bad reason";
|
||||
|
@ -360,9 +360,9 @@ public:
|
||||
|
||||
bad<true>("\tGET / HTTP/1.0\r\n" "\r\n", error::bad_method);
|
||||
bad<true>("GET\x01 / HTTP/1.0\r\n" "\r\n", error::bad_method);
|
||||
bad<true>("GET / HTTP/1.0\r\n" "\r\n", error::bad_path);
|
||||
bad<true>("GET \x01 HTTP/1.0\r\n" "\r\n", error::bad_path);
|
||||
bad<true>("GET /\x01 HTTP/1.0\r\n" "\r\n", error::bad_path);
|
||||
bad<true>("GET / HTTP/1.0\r\n" "\r\n", error::bad_target);
|
||||
bad<true>("GET \x01 HTTP/1.0\r\n" "\r\n", error::bad_target);
|
||||
bad<true>("GET /\x01 HTTP/1.0\r\n" "\r\n", error::bad_target);
|
||||
// VFALCO TODO various forms of bad request-target (uri)
|
||||
bad<true>("GET / HTTP/1.0\r\n" "\r\n", error::bad_version);
|
||||
bad<true>("GET / _TTP/1.0\r\n" "\r\n", error::bad_version);
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
|
||||
check("beast.http", error::bad_line_ending);
|
||||
check("beast.http", error::bad_method);
|
||||
check("beast.http", error::bad_path);
|
||||
check("beast.http", error::bad_target);
|
||||
check("beast.http", error::bad_version);
|
||||
check("beast.http", error::bad_status);
|
||||
check("beast.http", error::bad_reason);
|
||||
|
Reference in New Issue
Block a user