From 1519408e4ce2f110d317044054a1a43d2aeeadeb Mon Sep 17 00:00:00 2001 From: Talyx Date: Sun, 20 Feb 2022 16:56:03 +0300 Subject: [PATCH] add: upload accept --- src/Client/Response.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Client/Response.cpp b/src/Client/Response.cpp index 6ffb65a..8dac10e 100644 --- a/src/Client/Response.cpp +++ b/src/Client/Response.cpp @@ -464,6 +464,12 @@ void Response::methodPost(void) void Response::methodPut(void) { _code = 201; + if (!_location->uploadAccept) + { + _code = 403; + invalidClient(); + return; + } if (_request.isFile(_upload_dir) == 0) _code = 204; std::ofstream file(_upload_dir.c_str(), std::ios::out | std::ios::binary);