mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-05-10 19:38:45 +02:00
「🔨」 fix: fixed url
This commit is contained in:
@ -6,13 +6,14 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/14 14:14:39 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/30 09:37:38 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/30 14:51:39 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <config/default.hpp>
|
||||
#include <cstdio>
|
||||
#include <netinet/in.h>
|
||||
#include <requests/default.hpp>
|
||||
#include <server/Server.hpp>
|
||||
@ -30,7 +31,7 @@ class Client {
|
||||
void parse(void);
|
||||
void answer(void);
|
||||
|
||||
bool requestParsed(void);
|
||||
bool requestParsed(void);
|
||||
|
||||
struct pollfd *getPollfd(void) const { return _pfd; }
|
||||
|
||||
@ -43,11 +44,21 @@ class Client {
|
||||
private:
|
||||
void _getRequest(std::string);
|
||||
|
||||
std::string _sanitizeStr(std::string &str) {
|
||||
std::string newStr = str;
|
||||
|
||||
if (str[str.size() - 1] == '\r') {
|
||||
newStr.erase(str.size() - 1);
|
||||
}
|
||||
return newStr;
|
||||
}
|
||||
|
||||
struct pollfd *_pfd;
|
||||
struct sockaddr_in _client_addr;
|
||||
http::ARequest *_request;
|
||||
// http::Response *_response;
|
||||
config::Server *_conf;
|
||||
config::Route *_route;
|
||||
config::Config *_Gconf;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user