Added a session pointer to request.

This commit is contained in:
Relintai 2021-08-04 20:33:21 +02:00
parent 2521c28a9a
commit 9e6645bad6
2 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,8 @@
#include "core/http/cookie.h"
#include "web_application.h"
#include "http_session.h"
const std::string &Request::get_cookie(const std::string &key) {
}
@ -73,6 +75,7 @@ void Request::send_error(int error_code) {
}
void Request::reset() {
session = nullptr;
application = nullptr;
current_middleware_index = 0;
middleware_stack = nullptr;

View File

@ -11,6 +11,7 @@
class WebApplication;
class Cookie;
class HTTPSession;
class Request {
public:
@ -33,6 +34,7 @@ public:
bool connection_closed;
HTTPSession *session;
std::map<std::string, Object*> data;
virtual const std::string &get_cookie(const std::string &key);