mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-06-25 09:33:36 +02:00
「🏗️」 wip: started working on cgi finally
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/10 13:43:54 by adjoly #+# #+# */
|
||||
/* Updated: 2025/05/08 12:05:38 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/05/15 12:02:30 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -18,5 +18,6 @@
|
||||
#define SAMPLE_CONF_PATH "/etc/webserv/default.conf"
|
||||
#endif
|
||||
#define WEBSRV_VERSION "v0.2"
|
||||
#define WEBSRV_NAME "webserv"
|
||||
|
||||
bool help(int, char **);
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/03 17:23:00 by mmoussou #+# #+# */
|
||||
/* Updated: 2025/05/02 13:58:52 by mmoussou ### ########.fr */
|
||||
/* Updated: 2025/05/15 12:12:47 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -3,29 +3,32 @@
|
||||
/* ::: :::::::: */
|
||||
/* Cgi.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* By: gadelbes <gadelbes@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/24 14:17:34 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/30 09:36:02 by adjoly ### ########.fr */
|
||||
/* Created: 2025/04/24 13:46:34 by gadelbes #+# #+# */
|
||||
/* Updated: 2025/05/15 13:45:20 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <requests/ARequest.hpp>
|
||||
#include "server/AResource.hpp"
|
||||
#include <config/Route.hpp>
|
||||
#include <config/default.hpp>
|
||||
#include <requests/ARequest.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace webserv {
|
||||
|
||||
class Cgi {
|
||||
class Cgi : public server::AClientResource {
|
||||
public:
|
||||
Cgi(http::ARequest *, config::Server *);
|
||||
Cgi(http::ARequest *, config::Route *);
|
||||
~Cgi(void);
|
||||
|
||||
std::string getEnv(std::string &);
|
||||
void setEnv(std::string &, std::string);
|
||||
void setEnv(const std::string, std::string);
|
||||
|
||||
void process(void);
|
||||
|
||||
@ -33,8 +36,11 @@ class Cgi {
|
||||
private:
|
||||
void _initEnvp(void);
|
||||
|
||||
char **_genEnv(void);
|
||||
|
||||
std::map<std::string, std::string> _envp;
|
||||
config::Server *_conf;
|
||||
http::IMessage *_request;
|
||||
config::Route *_conf;
|
||||
http::ARequest *_request;
|
||||
};
|
||||
|
||||
}; // namespace webserv
|
||||
|
Reference in New Issue
Block a user