add support for OPTIONS http method

This commit is contained in:
2022-08-11 08:04:40 +02:00
parent f651df6e1f
commit ceb5336ca1
7 changed files with 41 additions and 10 deletions

View File

@@ -160,6 +160,13 @@ void FunctionBase::MakeDelete()
}
void FunctionBase::MakeOptions()
{
cur->request->http_status = Header::status_204_no_content;
cur->request->out_headers.add(Header::allow, L"OPTIONS, GET, HEAD, POST, DELETE");
}
void FunctionBase::Clear()
{
// do nothing by default
@@ -183,6 +190,10 @@ void FunctionBase::ContinueMakeDelete()
// do nothing by default
}
void FunctionBase::ContinueMakeOptions()
{
// do nothing by default
}
} // namespace Winix