Rework the client error handling

This commit is contained in:
Chunting Gu
2019-06-10 12:00:57 +08:00
parent c2a009f68a
commit 8c09189b14
16 changed files with 158 additions and 199 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ void Request::CreateStartLine() {
}
if (url_.host().empty()) {
throw Exception(kSchemaError, "Invalid request: host is missing.");
throw Error{ Error::kSyntaxError, "Host is missing" };
}
std::string target = "/" + url_.path();