--- parser3/src/include/pa_request.h 2010/09/16 23:35:04 1.206 +++ parser3/src/include/pa_request.h 2012/03/16 09:24:10 1.210 @@ -1,14 +1,14 @@ /** @file Parser: request class decl. - Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_REQUEST_H #define PA_REQUEST_H -static const char * const IDENT_REQUEST_H="$Date: 2010/09/16 23:35:04 $"; +#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.210 2012/03/16 09:24:10 moko Exp $" #include "pa_pool.h" #include "pa_hash.h" @@ -186,8 +186,7 @@ public: #endif Request(SAPI_Info& asapi_info, Request_info& arequest_info, - String::Language adefault_lang, ///< all tainted data default untainting lang - bool status_allowed ///< status class allowed + String::Language adefault_lang ///< all tainted data default untainting lang ); ~Request(); @@ -224,13 +223,14 @@ public: anti_endless_execute_recoursion--; } - void json_string_recoursion_go_down(){ + uint json_string_recoursion_go_down(){ if(++anti_endless_json_string_recoursion==ANTI_ENDLESS_JSON_STRING_RECOURSION){ anti_endless_json_string_recoursion=0; throw Exception(PARSER_RUNTIME, 0, "call canceled - endless json recursion detected"); } + return anti_endless_json_string_recoursion; } void json_string_recoursion_go_up(){ @@ -319,6 +319,9 @@ public: /// returns an absolute @a path to relative @a name const String& absolute(const String& relative_name); + /// returns the mime type of 'user_file_name' + const String& mime_type_of(const String* file_name); + /// returns the mime type of 'user_file_name_cstr' const String& mime_type_of(const char* user_file_name_cstr);