mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 21:38:00 +03:00
add: CgiHandle class
This commit is contained in:
30
src/CGI/CgiHandle.hpp
Normal file
30
src/CGI/CgiHandle.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef CGIHANDLE_HPP
|
||||
#define CGIHANDLE_HPP
|
||||
|
||||
#include "webserv.hpp"
|
||||
#include "Request.hpp"
|
||||
#include "ServerConfig.hpp"
|
||||
#include "Response.hpp"
|
||||
|
||||
class Response;
|
||||
|
||||
class CgiHandle
|
||||
{
|
||||
private:
|
||||
Request &_request;
|
||||
Response &_response;
|
||||
std::map<std::string, std::string> _variable;
|
||||
std::string _scriptName;
|
||||
char **env;
|
||||
public:
|
||||
void printSSmap(std::map<std::string, std::string> &);
|
||||
CgiHandle(Request &request, Response &response);
|
||||
void initEnvVariables();
|
||||
void freeEnvVariables();
|
||||
char **mapToCharPtr();
|
||||
std::string executeCgi();
|
||||
~CgiHandle();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user