mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 15:30:52 +01:00
ircd::http: Support HTTP/1.0.
This commit is contained in:
parent
34e35d97fe
commit
14c32a2075
1 changed files with 8 additions and 2 deletions
10
ircd/http.cc
10
ircd/http.cc
|
@ -284,12 +284,18 @@ ircd::http::request::head::head(parse::capstan &pc,
|
|||
}
|
||||
,headers{[this, &pc, &c]
|
||||
{
|
||||
if(this->version != "HTTP/1.1")
|
||||
const bool version_compatible
|
||||
{
|
||||
this->version == "HTTP/1.0" ||
|
||||
this->version == "HTTP/1.1"
|
||||
};
|
||||
|
||||
if(!version_compatible)
|
||||
throw error
|
||||
{
|
||||
HTTP_VERSION_NOT_SUPPORTED, fmt::snstringf
|
||||
{
|
||||
128, "Sorry, I don't speak '%s' only HTTP/1.1 here.",
|
||||
128, "Sorry, no speak '%s'. Try HTTP/1.1 here.",
|
||||
this->version
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue