--- parser3/src/include/pa_request_info.h 2020/12/15 17:10:32 1.16 +++ parser3/src/include/pa_request_info.h 2026/09/30 16:44:20 1.21 @@ -1,20 +1,25 @@ /** @file Parser: request info class decl. - Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ #ifndef PA_REQUEST_INFO_H #define PA_REQUEST_INFO_H -#define IDENT_PA_REQUEST_INFO_H "$Id: pa_request_info.h,v 1.16 2020/12/15 17:10:32 moko Exp $" +#define IDENT_PA_REQUEST_INFO_H "$Id: pa_request_info.h,v 1.21 2026/09/30 16:44:20 moko Exp $" + +// include + +#include "pa_config_includes.h" /// some information from web server class Request_info { public: //@{ these filled by Request class user const char* document_root; + const char* document_root_path; // normalized: '/' separated, without the trailing '/' const char* path_translated; const char* method; const char* query_string; @@ -54,6 +59,12 @@ public: for(; *auri && *auri != '/'; auri++); return auri; } + + void set_document_root(const char* adocument_root); + + Request_info() { + memset(this, 0, sizeof(*this)); // OK as Request_info is POD + } }; #endif