NCBI C++ ToolKit
Classes | Macros | Functions | Variables
ncbicgi.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbienv.hpp>
#include <corelib/ncbitime.hpp>
#include <corelib/ncbi_param.hpp>
#include <corelib/ncbiapp.hpp>
#include <corelib/ncbi_safe_static.hpp>
#include <corelib/request_ctx.hpp>
#include <corelib/ncbi_strings.h>
#include <cgi/cgi_exception.hpp>
#include <cgi/ncbicgi.hpp>
#include <cgi/cgi_serial.hpp>
#include <cgi/cgi_session.hpp>
#include <cgi/error_codes.hpp>
#include <cgi/impl/cgi_entry_reader.hpp>
#include <util/checksum.hpp>
#include <util/ncbi_url.hpp>
#include <algorithm>
#include <stdio.h>
#include <time.h>
+ Include dependency graph for ncbicgi.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CTrackingEnvHolder
 
class  CCgiEntries_Parser
 
class  CStringEntryCollector
 

Macros

#define STDIN_FILENO   0
 
#define NCBI_USE_ERRCODE_X   Cgi_API
 

Functions

 NCBI_PARAM_ENUM_DECL (EDiagSev, CGI, Cookie_Error_Severity)
 
 NCBI_PARAM_ENUM_ARRAY (EDiagSev, CGI, Cookie_Error_Severity)
 
 NCBI_PARAM_ENUM_DEF_EX (EDiagSev, CGI, Cookie_Error_Severity, eDiag_Error, eParam_NoThread, CGI_COOKIE_ERROR_SEVERITY)
 
typedef NCBI_PARAM_TYPE (CGI, Cookie_Error_Severity) TCookieErrorSeverity
 
 NCBI_PARAM_ENUM_DECL (CCgiCookie::ECookieEncoding, CGI, Cookie_Encoding)
 
 NCBI_PARAM_ENUM_ARRAY (CCgiCookie::ECookieEncoding, CGI, Cookie_Encoding)
 
 NCBI_PARAM_ENUM_DEF_EX (CCgiCookie::ECookieEncoding, CGI, Cookie_Encoding, CCgiCookie::eCookieEnc_Url, eParam_NoThread, CGI_COOKIE_ENCODING)
 
typedef NCBI_PARAM_TYPE (CGI, Cookie_Encoding) TCookieEncoding
 
bool s_IsZeroTime (const tm &date)
 
static bool s_CookieLess (const string &name1, const string &domain1, const string &path1, const string &name2, const string &domain2, const string &path2)
 
 NCBI_PARAM_DECL (string, CGI, Cookie_Name_Banned_Symbols)
 
 NCBI_PARAM_DEF_EX (string, CGI, Cookie_Name_Banned_Symbols," ,;=", eParam_NoThread, CGI_COOKIE_NAME_BANNED_SYMBOLS)
 
typedef NCBI_PARAM_TYPE (CGI, Cookie_Name_Banned_Symbols) TCookieNameBannedSymbols
 
const char * s_GetCookieNameBannedSymbols (void)
 
static void s_AddEntry (TCgiEntries &entries, const string &name, const string &value, unsigned int position, const string &filename=kEmptyStr, const string &type=kEmptyStr)
 
 NCBI_PARAM_ENUM_ARRAY (CCgiCookies::EOnBadCookie, CGI, On_Bad_Cookie)
 
 NCBI_PARAM_ENUM_DEF_EX (CCgiCookies::EOnBadCookie, CGI, On_Bad_Cookie, CCgiCookies::eOnBadCookie_Store, eParam_NoThread, CGI_ON_BAD_COOKIE)
 
typedef NCBI_PARAM_TYPE (CGI, On_Bad_Cookie) TOnBadCookieParam
 
static CTempString x_LastWord (const CTempStringEx &forward)
 
 NCBI_PARAM_DECL (string, CGI, LOG_EXCLUDE_ARGS)
 
 NCBI_PARAM_DEF_EX (string, CGI, LOG_EXCLUDE_ARGS, kEmptyStr, eParam_NoThread, CGI_LOG_EXCLUDE_ARGS)
 
typedef NCBI_PARAM_TYPE (CGI, LOG_EXCLUDE_ARGS) TCGI_LogExcludeArgs
 
 NCBI_PARAM_DECL (string, CGI, LOG_LIMIT_ARGS)
 
 NCBI_PARAM_DEF_EX (string, CGI, LOG_LIMIT_ARGS,"*:1000000", eParam_NoThread, CGI_LOG_LIMIT_ARGS)
 
typedef NCBI_PARAM_TYPE (CGI, LOG_LIMIT_ARGS) TCGI_LogLimitArgs
 
bool s_Is_ISO_8859_1 (const string &charset)
 
bool s_Is_Windows_1252 (const string &charset)
 
bool s_Is_UTF_8 (const string &charset)
 
EEncodingForm GetCharsetEncodingForm (const string &charset, CCgiEntry::EOnCharsetError on_error)
 

Variables

static const tm kZeroTime = { 0 }
 
static const char * s_TrackingVars []
 
static const char * s_PropName [eCgi_NProperties+1]
 

Macro Definition Documentation

#define NCBI_USE_ERRCODE_X   Cgi_API

Definition at line 64 of file ncbicgi.cpp.

#define STDIN_FILENO   0

Function Documentation

EEncodingForm GetCharsetEncodingForm ( const string charset,
CCgiEntry::EOnCharsetError  on_error 
)
NCBI_PARAM_DECL ( string  ,
CGI  ,
Cookie_Name_Banned_Symbols   
)
NCBI_PARAM_DECL ( string  ,
CGI  ,
LOG_EXCLUDE_ARGS   
)
NCBI_PARAM_DECL ( string  ,
CGI  ,
LOG_LIMIT_ARGS   
)
NCBI_PARAM_DEF_EX ( string  ,
CGI  ,
Cookie_Name_Banned_Symbols  ,
 
)
NCBI_PARAM_DEF_EX ( string  ,
CGI  ,
LOG_EXCLUDE_ARGS  ,
kEmptyStr  ,
eParam_NoThread  ,
CGI_LOG_EXCLUDE_ARGS   
)
NCBI_PARAM_DEF_EX ( string  ,
CGI  ,
LOG_LIMIT_ARGS  ,
"*:1000000"  ,
eParam_NoThread  ,
CGI_LOG_LIMIT_ARGS   
)
NCBI_PARAM_ENUM_ARRAY ( EDiagSev  ,
CGI  ,
Cookie_Error_Severity   
)

Definition at line 77 of file ncbicgi.cpp.

References eDiag_Critical, eDiag_Error, eDiag_Fatal, eDiag_Info, eDiag_Trace, and eDiag_Warning.

NCBI_PARAM_ENUM_ARRAY ( CCgiCookie::ECookieEncoding  ,
CGI  ,
Cookie_Encoding   
)

Definition at line 93 of file ncbicgi.cpp.

References CCgiCookie::eCookieEnc_Quote, and CCgiCookie::eCookieEnc_Url.

NCBI_PARAM_ENUM_ARRAY ( CCgiCookies::EOnBadCookie  ,
CGI  ,
On_Bad_Cookie   
)
NCBI_PARAM_ENUM_DECL ( EDiagSev  ,
CGI  ,
Cookie_Error_Severity   
)
NCBI_PARAM_ENUM_DECL ( CCgiCookie::ECookieEncoding  ,
CGI  ,
Cookie_Encoding   
)
NCBI_PARAM_ENUM_DEF_EX ( EDiagSev  ,
CGI  ,
Cookie_Error_Severity  ,
eDiag_Error  ,
eParam_NoThread  ,
CGI_COOKIE_ERROR_SEVERITY   
)
NCBI_PARAM_ENUM_DEF_EX ( CCgiCookie::ECookieEncoding  ,
CGI  ,
Cookie_Encoding  ,
CCgiCookie::eCookieEnc_Url  ,
eParam_NoThread  ,
CGI_COOKIE_ENCODING   
)
NCBI_PARAM_ENUM_DEF_EX ( CCgiCookies::EOnBadCookie  ,
CGI  ,
On_Bad_Cookie  ,
CCgiCookies::eOnBadCookie_Store  ,
eParam_NoThread  ,
CGI_ON_BAD_COOKIE   
)
typedef NCBI_PARAM_TYPE ( CGI  ,
Cookie_Error_Severity   
)
typedef NCBI_PARAM_TYPE ( CGI  ,
Cookie_Encoding   
)
typedef NCBI_PARAM_TYPE ( CGI  ,
Cookie_Name_Banned_Symbols   
)
typedef NCBI_PARAM_TYPE ( CGI  ,
On_Bad_Cookie   
)
typedef NCBI_PARAM_TYPE ( CGI  ,
LOG_EXCLUDE_ARGS   
)
typedef NCBI_PARAM_TYPE ( CGI  ,
LOG_LIMIT_ARGS   
)
static void s_AddEntry ( TCgiEntries entries,
const string name,
const string value,
unsigned int  position,
const string filename = kEmptyStr,
const string type = kEmptyStr 
)
static

Definition at line 937 of file ncbicgi.cpp.

References multimap_checker< Container >::insert().

Referenced by CCgiRequest::x_Init().

static bool s_CookieLess ( const string name1,
const string domain1,
const string path1,
const string name2,
const string domain2,
const string path2 
)
static

Definition at line 327 of file ncbicgi.cpp.

Referenced by CCgiCookies::Find(), and CCgiCookie::operator<().

const char* s_GetCookieNameBannedSymbols ( void  )

Definition at line 486 of file ncbicgi.cpp.

References CSafeStatic< T, Callbacks >::Get().

Referenced by CCgiCookies::Add().

bool s_Is_ISO_8859_1 ( const string charset)
inline

Definition at line 1818 of file ncbicgi.cpp.

References NStr::CompareNocase(), and i.

Referenced by GetCharsetEncodingForm().

bool s_Is_UTF_8 ( const string charset)
inline

Definition at line 1848 of file ncbicgi.cpp.

References NStr::CompareNocase().

Referenced by GetCharsetEncodingForm().

bool s_Is_Windows_1252 ( const string charset)
inline

Definition at line 1840 of file ncbicgi.cpp.

References NStr::CompareNocase().

Referenced by GetCharsetEncodingForm().

bool s_IsZeroTime ( const tm &  date)
inline

Definition at line 134 of file ncbicgi.cpp.

References kZeroTime.

Referenced by CCgiCookie::GetExpDate().

static CTempString x_LastWord ( const CTempStringEx forward)
static

Variable Documentation

const tm kZeroTime = { 0 }
static

Definition at line 132 of file ncbicgi.cpp.

Referenced by CCgiCookie::CCgiCookie(), CCgiCookie::Reset(), s_IsZeroTime(), and s_ZeroTime().

const char* s_PropName[eCgi_NProperties+1]
static

Definition at line 892 of file ncbicgi.cpp.

const char* s_TrackingVars[]
static
Initial value:
=
{
"HTTP_CAF_PROXIED_HOST",
"HTTP_X_FORWARDED_FOR",
"PROXIED_IP",
"HTTP_X_FWD_IP_ADDR",
"HTTP_CLIENT_HOST",
"REMOTE_HOST",
"REMOTE_ADDR",
"NI_CLIENT_IPADDR",
}
#define NULL
Definition: ncbistd.hpp:225

Definition at line 818 of file ncbicgi.cpp.

Referenced by CTrackingEnvHolder::CTrackingEnvHolder().

Modified on Wed Apr 26 17:45:55 2017 by modify_doxy.py rev. 533848