Added a reference map to Request. Also fixed 2 warnings.

This commit is contained in:
Relintai 2021-08-22 22:17:32 +02:00
parent e5e1dfee8a
commit 8fa6548e44
2 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,7 @@ HTTPSession *Request::get_or_create_session() {
}
const std::string &Request::get_cookie(const std::string &key) {
return "";
}
void Request::add_cookie(const ::Cookie &cookie) {
@ -31,7 +32,8 @@ HTTPMethod Request::get_method() const {
}
const std::string &Request::get_parameter(const std::string &key) const {
return "";
static std::string str;
return str;
}
void Request::compile_body() {
@ -112,6 +114,7 @@ void Request::reset() {
compiled_body.clear();
data.clear();
reference_data.clear();
}
std::string Request::parser_get_path() {

View File

@ -6,6 +6,7 @@
#include <vector>
#include "core/object.h"
#include "core/reference.h"
#include "handler_instance.h"
@ -38,6 +39,7 @@ public:
HTTPSession *session;
std::map<std::string, Object *> data;
std::map<std::string, Ref<Reference> > reference_data;
HTTPSession *get_or_create_session();