mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-05-10 20:28:46 +02:00
「✨」 feat(Requests): now use the config :D
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/30 09:50:20 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/30 15:18:01 by mmoussou ### ########.fr */
|
||||
/* Updated: 2025/05/02 15:02:56 by mmoussou ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -70,7 +70,7 @@ void Post::parse(std::string const &data) {
|
||||
std::string extractFilename(const std::string &header) {
|
||||
size_t start = header.find("filename=\"") + 10;
|
||||
size_t end = header.find("\"", start);
|
||||
return header.substr(start, end - start);
|
||||
return this->_route->getUpRoot() + header.substr(start, end - start);
|
||||
}
|
||||
|
||||
void handleMultipartData(const std::string &body, const std::string &boundary) {
|
||||
@ -104,7 +104,7 @@ void handleMultipartData(const std::string &body, const std::string &boundary) {
|
||||
|
||||
Response Post::execute(void) {
|
||||
http::Response response;
|
||||
|
||||
|
||||
try {
|
||||
handleMultipartData(
|
||||
this->_body,
|
||||
|
Reference in New Issue
Block a user