mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
add: upload accept
This commit is contained in:
@@ -464,6 +464,12 @@ void Response::methodPost(void)
|
|||||||
void Response::methodPut(void)
|
void Response::methodPut(void)
|
||||||
{
|
{
|
||||||
_code = 201;
|
_code = 201;
|
||||||
|
if (!_location->uploadAccept)
|
||||||
|
{
|
||||||
|
_code = 403;
|
||||||
|
invalidClient();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (_request.isFile(_upload_dir) == 0)
|
if (_request.isFile(_upload_dir) == 0)
|
||||||
_code = 204;
|
_code = 204;
|
||||||
std::ofstream file(_upload_dir.c_str(), std::ios::out | std::ios::binary);
|
std::ofstream file(_upload_dir.c_str(), std::ios::out | std::ios::binary);
|
||||||
|
|||||||
Reference in New Issue
Block a user