NCBI C++ ToolKit
|
Classes | |
class | CCgiEntryReader |
class | CCgiEntryReaderContext |
class | CCgiCookie |
CCgiCookie:: More... | |
struct | CCgiCookie::PLessCPtr |
class | CCgiCookies |
CCgiCookies:: More... | |
class | CCgiEntry |
struct | CCgiEntry::SData |
class | CEntryCollector_Base |
class | CExtraEntryCollector |
class | CCgiRequest |
CCgiRequest:: More... | |
class | CCgiResponse |
class | CRefArgs |
CRefArgs:: More... | |
Typedefs | |
typedef CCgiEntryReaderContext | CCgiEntryReader::TContext |
typedef int | CCgiEntryReader::TState |
typedef CCgiEntryReader | CCgiEntryReaderContext::TReader |
typedef const CCgiCookie * | CCgiCookie::TCPtr |
Predicate for the cookie comparison. More... | |
typedef int | CCgiCookie::TInvalidFlag |
typedef set< CCgiCookie *, CCgiCookie::PLessCPtr > | CCgiCookies::TSet |
typedef TSet::iterator | CCgiCookies::TIter |
typedef TSet::const_iterator | CCgiCookies::TCIter |
typedef pair< TIter, TIter > | CCgiCookies::TRange |
typedef pair< TCIter, TCIter > | CCgiCookies::TCRange |
typedef map< string, string > | TCgiProperties |
typedef multimap< string, CCgiEntry, PNocase_Conditional > | TCgiEntries |
typedef TCgiEntries::iterator | TCgiEntriesI |
typedef TCgiEntries::const_iterator | TCgiEntriesCI |
typedef list< string > | TCgiIndexes |
typedef int | CCgiRequest::TFlags |
Startup initialization. More... | |
typedef map< string, string, PNocase > | CCgiResponse::TMap |
typedef multimap< string, string > | CRefArgs::THostMap |
Friends | |
class | CCgiEntryReader::CCgiEntryReaderContext |
class | CCgiEntryReaderContext::CCgiEntryReader |
class | CCgiCookie::CCgiCookies |
class | CCgiResponse::CCgiContext |
class | CCgiResponse::CCgiApplication |
typedef multimap<string, CCgiEntry, PNocase_Conditional> TCgiEntries |
Definition at line 638 of file ncbicgi.hpp.
Definition at line 640 of file ncbicgi.hpp.
typedef TCgiEntries::iterator TCgiEntriesI |
Definition at line 639 of file ncbicgi.hpp.
typedef list<string> TCgiIndexes |
Definition at line 641 of file ncbicgi.hpp.
typedef map<string, string> TCgiProperties |
Definition at line 637 of file ncbicgi.hpp.
Definition at line 223 of file ncbicgi.hpp.
Definition at line 52 of file cgi_entry_reader.hpp.
typedef const CCgiCookie* CCgiCookie::TCPtr |
Predicate for the cookie comparison.
Definition at line 136 of file ncbicgi.hpp.
typedef pair<TCIter, TCIter> CCgiCookies::TCRange |
Definition at line 225 of file ncbicgi.hpp.
typedef int CCgiRequest::TFlags |
Startup initialization.
If "$REQUEST_METHOD" == "POST" and "$CONTENT_TYPE" is empty or either "application/x-www-form-urlencoded" or "multipart/form-data", and "fDoNotParseContent" flag is not set, then retrieve and parse entries from the input stream "istr". If "$CONTENT_TYPE" is empty, the contents is not stripped from the stream but remains available (pushed back) whether or not the form parsing was successful.
If "$REQUEST_METHOD" is undefined then try to retrieve the request's entries from the 1st cmd.-line argument, and do not use "$QUERY_STRING" and "istr" at all.
Definition at line 703 of file ncbicgi.hpp.
|
private |
Definition at line 86 of file ref_args.hpp.
typedef int CCgiCookie::TInvalidFlag |
Definition at line 149 of file ncbicgi.hpp.
typedef TSet::iterator CCgiCookies::TIter |
Definition at line 222 of file ncbicgi.hpp.
|
protected |
Definition at line 267 of file ncbicgir.hpp.
typedef pair<TIter, TIter> CCgiCookies::TRange |
Definition at line 224 of file ncbicgi.hpp.
|
private |
Definition at line 99 of file cgi_entry_reader.hpp.
typedef set<CCgiCookie*, CCgiCookie::PLessCPtr> CCgiCookies::TSet |
Definition at line 221 of file ncbicgi.hpp.
|
private |
Definition at line 65 of file cgi_entry_reader.hpp.
enum ECgiProp |
Set of "standard" HTTP request properties.
Definition at line 378 of file ncbicgi.hpp.
|
private |
Enumerator | |
---|---|
eCheck_Valid | |
eCheck_SkipInvalid | |
eCheck_StoreInvalid |
Definition at line 331 of file ncbicgi.hpp.
|
private |
Enumerator | |
---|---|
eCT_Null | |
eCT_URLEncoded | |
eCT_Multipart |
Definition at line 100 of file cgi_entry_reader.hpp.
Enumerator | |
---|---|
eCookieEnc_Url | |
eCookieEnc_Quote |
Definition at line 185 of file ncbicgi.hpp.
|
private |
Enumerator | |
---|---|
eField_Name | |
eField_Value | |
eField_Other |
Definition at line 165 of file ncbicgi.hpp.
Enumerator | |
---|---|
fValid | |
fInvalid_Name | |
fInvalid_Value | |
fInvalid_Any |
Definition at line 143 of file ncbicgi.hpp.
Enumerator | |
---|---|
eMultipart_none | |
eMultipart_mixed | |
eMultipart_related | |
eMultipart_replace |
Definition at line 98 of file ncbicgir.hpp.
How to handle badly formed cookies.
Definition at line 228 of file ncbicgi.hpp.
Action to perform if the explicit charset is not supported.
Enumerator | |
---|---|
eCharsetError_Ignore | Ignore unknown charset (try to autodetect) |
eCharsetError_Throw | Throw exception if charset is not supported. |
Definition at line 499 of file ncbicgi.hpp.
|
private |
Enumerator | |
---|---|
eRT_Delimiter | |
eRT_EOF | |
eRT_LengthBound | |
eRT_PartialDelimiter |
Definition at line 105 of file cgi_entry_reader.hpp.
Standard request methods.
Enumerator | |
---|---|
eMethod_GET | |
eMethod_POST | |
eMethod_HEAD | |
eMethod_PUT | |
eMethod_DELETE | |
eMethod_OPTIONS | |
eMethod_TRACE | |
eMethod_CONNECT | |
eMethod_Other | Unknown method, use GetRequestMethodName to read. |
Definition at line 905 of file ncbicgi.hpp.
Definition at line 835 of file ncbicgi.hpp.
|
private |
Enumerator | |
---|---|
fUnread | |
fHitCR | |
fHitLF | |
fHitCRLF | |
fHitBoundary |
Definition at line 58 of file cgi_entry_reader.hpp.
Whether the cookie is sent as a part of HTTP request or HTTP response.
Enumerator | |
---|---|
eHTTPResponse | |
eHTTPRequest |
Definition at line 85 of file ncbicgi.hpp.
enum CCgiRequest::Flags |
Enumerator | |
---|---|
fIndexesNotEntries | do not handle indexes as regular FORM entries with empty value |
fIgnoreQueryString | do not parse $QUERY_STRING (or cmd.line if $REQUEST_METHOD not def) |
fOwnEnvironment | own the passed "env" (and destroy it in the destructor) |
fDoNotParseContent | do not automatically parse the request's content body (from "istr") |
fCaseInsensitiveArgs | use case insensitive CGI arguments |
fCookies_Unencoded | Do not use URL-encoding/decoding for cookies. |
fCookies_SpaceAsHex | Use hex code for encoding spaces rather than '+'. |
fSaveRequestContent | Save request content (available through GetContent()) |
fIgnorePageHitId | Do not check if page hit id is present, do not generate one if it's missing. |
fSkipDiagProperties | Set client-ip and session-id properties for logging. |
fSetDiagProperties | Old (deprecated) flag controlling diag properties. |
fParseInputOnDemand | Enable on-demand parsing via GetNextEntry() |
fSemicolonIsNotArgDelimiter | Do not treat semicolon as query string argument separator. |
fDisableTrackingCookie | Do not set outgoing tracking cookie. This can also be done per-request using CCgiResponce::DisableTrackingCookie(). |
fIncludePreparsedEntries | When parsing input on demand iterate all existing entries (e.g. those read from QUERY_STRING) before parsing POST data.
|
fDisableParsingAsIndex | Disable parsing input as 'indexed' query (RFC3875) even if no '=' is present. |
Definition at line 704 of file ncbicgi.hpp.
void CCgiResponse::AbortChunkedTransfer | ( | void | ) |
Abort chunked transfer, block any writes to the output stream.
Definition at line 689 of file ncbicgir.cpp.
References CCgiStreamWrapper::AbortChunkedTransfer(), CCgiStreamWrapper::eChunkedWrites, CCgiStreamWrapper::GetWriterMode(), and CCgiResponse::m_Output.
bool CCgiResponse::AcceptRangesBytes | ( | void | ) | const |
Check if 'Accept-Ranges' header is set to 'bytes'.
Definition at line 579 of file ncbicgir.cpp.
References NStr::EqualNocase(), CCgiResponse::GetHeaderValue(), CCgiResponse::sm_AcceptRanges, CCgiResponse::sm_AcceptRangesBytes, and NStr::TruncateSpaces().
Referenced by CCgiResponse::GetOutput(), and CCgiApplication::x_OnEvent().
CCgiCookie * CCgiCookies::Add | ( | const CCgiCookie & | cookie | ) |
Update with a copy of "cookie".
Definition at line 429 of file ncbicgi.cpp.
References _VERIFY, CCgiCookie::CopyAttributes(), CCgiCookies::Find(), CCgiCookie::GetDomain(), CCgiCookie::GetName(), CCgiCookie::GetPath(), set< Key, Compare >::insert(), and CCgiCookies::m_Cookies.
void CCgiCookies::Add | ( | const CCgiCookies & | cookies | ) |
Update by a set of cookies.
Definition at line 443 of file ncbicgi.cpp.
References CCgiCookies::Add(), ITERATE, and CCgiCookies::m_Cookies.
CCgiCookie * CCgiCookies::Add | ( | const string & | name, |
const string & | value, | ||
const string & | domain = kEmptyStr , |
||
const string & | path = kEmptyStr , |
||
EOnBadCookie | on_bad_cookie = eOnBadCookie_SkipAndError |
||
) |
All Add() functions: if the added cookie has the same {name, domain, path} as an already existing one then the new cookie will override the old one.
Definition at line 383 of file ncbicgi.cpp.
References _TROUBLE, _VERIFY, CCgiCookies::eOnBadCookie_Skip, CCgiCookies::eOnBadCookie_SkipAndError, CCgiCookies::eOnBadCookie_Store, CCgiCookies::eOnBadCookie_StoreAndError, CCgiCookies::eOnBadCookie_ThrowException, ERR_POST_X, CCgiCookies::Find(), set< Key, Compare >::insert(), CCgiCookies::m_Cookies, NULL, CCgiCookie::SetDomain(), CCgiCookie::SetPath(), CCgiCookie::SetValue(), and rapidjson::value.
Referenced by CCgiCookies::Add(), CCgiApplication::AddLBCookie(), CCgiCookies::CCgiCookies(), ReadCgiCookies(), CCgiResponse::WriteHeader(), and CCgiRequest::x_Init().
CCgiCookie * CCgiCookies::Add | ( | const string & | name, |
const string & | value, | ||
EOnBadCookie | on_bad_cookie | ||
) |
Definition at line 421 of file ncbicgi.cpp.
References CCgiCookies::Add(), kEmptyStr, and rapidjson::value.
void CCgiCookies::Add | ( | const string & | str, |
EOnBadCookie | on_bad_cookie = eOnBadCookie_SkipAndError |
||
) |
Update with a HTTP request like string: "name1=value1; name2=value2; ...".
Definition at line 504 of file ncbicgi.cpp.
References _ASSERT, _TROUBLE, CCgiCookies::Add(), CCgiCookies::eCheck_SkipInvalid, CCgiCookies::eCheck_StoreInvalid, CCgiCookies::eCheck_Valid, CCgiCookie::eField_Name, CCgiCookie::eField_Value, CCgiCookies::eOnBadCookie_Skip, CCgiCookies::eOnBadCookie_SkipAndError, CCgiCookies::eOnBadCookie_Store, CCgiCookies::eOnBadCookie_StoreAndError, CCgiCookies::eOnBadCookie_ThrowException, ERR_POST_X, NStr::eTrunc_End, NStr::eUrlDec_All, NStr::eUrlDec_Percent, NStr::eUrlEnc_PercentOnly, CCgiCookie::fInvalid_Name, CCgiCookie::fInvalid_Value, kEmptyStr, CCgiCookies::m_EncodeFlag, msg(), NCBI_THROW2, NPOS, NStr::PrintableString(), NStr::Replace(), s_GetCookieNameBannedSymbols(), CCgiCookie::SetInvalid(), str(), NStr::TruncateSpacesInPlace(), NStr::URLDecode(), val, and CCgiCookies::x_CheckField().
Add mappings between host mask and CGI argument name for query string.
Definition at line 72 of file ref_args.cpp.
References NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, ITERATE, NStr::Split(), and NStr::SplitInTwo().
Referenced by CRefArgs::CRefArgs().
Definition at line 87 of file ref_args.cpp.
References NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, multimap_checker< Container >::insert(), ITERATE, CRefArgs::m_HostMap, NStr::Split(), and NStr::TruncateSpaces().
|
overridevirtual |
Implements CEntryCollector_Base.
Definition at line 1953 of file ncbicgi.cpp.
References _ASSERT, CExtraEntryCollector::m_Args, and rapidjson::value.
|
pure virtual |
Implemented in CExtraEntryCollector, and CStringEntryCollector.
Referenced by CCgiRequest::GetCGIEntries().
Prepare to send trailer.
This must be called before WriteHeader() to allow the trailer value to be set later. Some fields are not allowed to be sent as trailers - see RFC7230: https://tools.ietf.org/html/rfc7230#section-4.1.2
Definition at line 717 of file ncbicgir.cpp.
References CCgiResponse::CanSendTrailer(), and CCgiResponse::m_TrailerValues.
void CCgiResponse::BeginPart | ( | const string & | name, |
const string & | type, | ||
CNcbiOstream & | os, | ||
size_t | size = 0 |
||
) |
Definition at line 481 of file ncbicgir.cpp.
References _ASSERT, CCgiResponse::eMultipart_none, CCgiResponse::eMultipart_replace, ERR_POST_X, CCgiResponse::GetHeaderValue(), HTTP_EOL, CCgiResponse::m_BetweenParts, CCgiResponse::m_Boundary, CCgiResponse::m_IsMultipart, Printable(), ncbi::grid::netcache::search::fields::size, CCgiResponse::sm_ContentDispoName, CCgiResponse::sm_ContentTypeDefault, CCgiResponse::sm_ContentTypeName, CCgiResponse::sm_FilenamePrefix, type, and Warning().
Definition at line 365 of file ncbicgir.hpp.
References CCgiResponse::out().
|
inline |
Definition at line 539 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 1771 of file ncbicgi.cpp.
References CChecksum::AddLine(), AStrEquiv(), eCgi_QueryString, eCgi_RequestMethod, eCgi_ScriptName, eCgi_ServerName, eCgi_ServerPort, CChecksum::eMD5, entries, CNcbiApplicationAPI::GetProgramDisplayName(), CCgiRequest::GetProperty(), CNcbiApplication::Instance(), ITERATE, CCgiRequest::ParseEntries(), and CChecksum::WriteChecksumData().
Referenced by CCgiApplication::GetResultFromCache(), and CCgiApplication::SaveResultToCache().
bool CCgiResponse::CanSendTrailer | ( | void | ) | const |
Check if trailer can be sent: chunked transfer must be enabled and the request's TE header must include 'trailers'.
All trailer getters/setters are no-op if this condition is false. This will always return false after FinishChunkedTransfer() has been called.
Definition at line 698 of file ncbicgir.cpp.
References NStr::EqualNocase(), NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CCgiResponse::GetChunkedTransferEnabled(), CCgiRequest::GetRandomProperty(), ITERATE, CCgiResponse::m_HeaderWritten, CCgiResponse::m_Request, CCgiResponse::m_TrailerEnabled, and NStr::Split().
Referenced by CCgiResponse::AddTrailer().
CCgiCookie::CCgiCookie | ( | const CCgiCookie & | cookie | ) |
Copy constructor.
Definition at line 146 of file ncbicgi.cpp.
References CCgiCookie::m_Expires, CCgiCookie::m_HttpOnly, and CCgiCookie::m_Secure.
CCgiCookie::CCgiCookie | ( | const string & | name, |
const string & | value, | ||
const string & | domain = NcbiEmptyString , |
||
const string & | path = NcbiEmptyString |
||
) |
Throw the "invalid_argument" if "name" or "value" have invalid format.
Definition at line 159 of file ncbicgi.cpp.
References kZeroTime, CCgiCookie::m_Expires, CCgiCookie::m_HttpOnly, CCgiCookie::m_Name, CCgiCookie::m_Secure, NCBI_THROW2, CCgiCookie::SetDomain(), CCgiCookie::SetPath(), CCgiCookie::SetValue(), and rapidjson::value.
|
private |
prohibit default initialization and assignment
|
inline |
Format of the string: "name1=value1; name2=value2; ...".
Definition at line 1088 of file ncbicgi.hpp.
References CCgiCookies::Add(), and str().
|
inline |
Use the specified method of string encoding.
Definition at line 1078 of file ncbicgi.hpp.
|
inline |
Empty set of cookies.
Definition at line 1068 of file ncbicgi.hpp.
Definition at line 453 of file ncbicgi.hpp.
|
inline |
Definition at line 448 of file ncbicgi.hpp.
|
inline |
Definition at line 442 of file ncbicgi.hpp.
|
inlineprivate |
Definition at line 67 of file cgi_entry_reader.hpp.
CCgiEntryReaderContext::CCgiEntryReaderContext | ( | CNcbiIstream & | in, |
TCgiEntries & | out, | ||
const string & | content_type, | ||
size_t | content_length = CCgiRequest::kContentLengthUnknown , |
||
string * | content_log = NULL |
||
) |
Definition at line 179 of file cgi_entry_reader.cpp.
References CCER, CT_EOF, CT_EQ_INT_TYPE, CT_INT_TYPE, CCgiEntryReaderContext::eCT_Multipart, CCgiEntryReaderContext::eCT_Null, CCgiEntryReaderContext::eCT_URLEncoded, NStr::eNocase, CCgiEntryReaderContext::eRT_EOF, NStr::FindNoCase(), kBoundaryTag, CCgiEntryReaderContext::m_Boundary, CCgiEntryReaderContext::m_ContentType, CCgiEntryReaderContext::m_In, NCBI_THROW, next(), NPOS, s_MatchesBoundary(), NStr::StartsWith(), and CCgiEntryReaderContext::x_DelimitedRead().
CCgiRequest::CCgiRequest | ( | CNcbiIstream & | is, |
TFlags | flags = 0 , |
||
size_t | errbuf_size = 256 |
||
) |
Definition at line 1056 of file ncbicgi.cpp.
References CCgiRequest::Deserialize(), flags, CCgiRequest::x_InitRequestContext(), and CCgiRequest::x_SetClientIpProperty().
|
private |
prohibit default initialization and assignment
CCgiRequest::CCgiRequest | ( | const CNcbiArguments * | args = 0 , |
const CNcbiEnvironment * | env = 0 , |
||
CNcbiIstream * | istr = 0 , |
||
TFlags | flags = 0 , |
||
int | ifd = -1 , |
||
size_t | errbuf_size = 256 |
||
) |
Definition at line 1005 of file ncbicgi.cpp.
References env, flags, and CCgiRequest::x_Init().
CCgiRequest::CCgiRequest | ( | int | argc, |
const char *const * | argv, | ||
const char *const * | envp = 0 , |
||
CNcbiIstream * | istr = 0 , |
||
TFlags | flags = 0 , |
||
int | ifd = -1 , |
||
size_t | errbuf_size = 256 |
||
) |
args := CNcbiArguments(argc,argv), env := CNcbiEnvironment(envp)
Definition at line 1027 of file ncbicgi.cpp.
References env, flags, CCgiRequest::fOwnEnvironment, and CCgiRequest::x_Init().
CCgiResponse::CCgiResponse | ( | CNcbiOstream * | os = NULL , |
int | ofd = -1 |
||
) |
Definition at line 85 of file ncbicgir.cpp.
References NcbiCout, CCgiResponse::SetOutput(), and STDOUT_FILENO.
|
protected |
|
inline |
Definition at line 662 of file ncbicgi.hpp.
void CCgiCookies::Clear | ( | void | ) |
Remove all stored cookies.
Definition at line 792 of file ncbicgi.cpp.
References set< Key, Compare >::clear(), ITERATE, and CCgiCookies::m_Cookies.
Referenced by ReadCgiCookies(), and CCgiCookies::~CCgiCookies().
Definition at line 541 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 540 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
|
inline |
Definition at line 386 of file ncbicgir.hpp.
References CCgiResponse::m_Cookies.
|
inline |
Definition at line 381 of file ncbicgir.hpp.
References CCgiResponse::m_Cookies.
Referenced by CCgiContext::x_InitSession().
void CCgiCookie::CopyAttributes | ( | const CCgiCookie & | cookie | ) |
Set all attribute values(but name!) to those from "cookie".
Definition at line 189 of file ncbicgi.cpp.
References CCgiCookie::fInvalid_Value, CCgiCookie::IsInvalid(), CCgiCookie::m_Domain, CCgiCookie::m_Expires, CCgiCookie::m_HttpOnly, CCgiCookie::m_Path, CCgiCookie::m_Secure, CCgiCookie::m_Value, CCgiCookie::ResetInvalid(), and CCgiCookie::SetInvalid().
Referenced by CCgiCookies::Add().
Create referrer parser from a set of definitions.
definitions | Multiple definitions should be separated by new line (' '). Host mask should be followed by space(s). Multiple argument names should be separated with commas. E.g. ".google. q, query\n.foo. bar". |
Definition at line 60 of file ref_args.cpp.
References CRefArgs::AddDefinitions().
void CCgiRequest::Deserialize | ( | CNcbiIstream & | is, |
TFlags | flags = 0 |
||
) |
Definition at line 1586 of file ncbicgi.cpp.
References flags, CCgiRequest::GetCookies(), CCgiRequest::GetEntries(), CCgiRequest::GetIndexes(), CCgiRequest::m_Env, CCgiRequest::m_OwnEnv, CCgiRequest::m_QueryStringParsed, NULL, ReadCgiCookies(), ReadContainer(), ReadEnvironment(), ReadMap(), true, CCgiRequest::x_ProcessInputStream(), and CCgiRequest::x_ProcessQueryString().
Referenced by CCgiRequest::CCgiRequest().
void CCgiResponse::DisableTrackingCookie | ( | void | ) |
Definition at line 557 of file ncbicgir.cpp.
References CCgiResponse::m_DisableTrackingCookie.
Referenced by CCgiContext::CCgiContext(), and CCgiContext::ProcessCORSRequest().
|
inline |
Definition at line 538 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Referenced by CCgiSessionSampleApplication::ProcessRequest(), ReportJSONVersion(), and TestDelay().
|
inline |
Return TRUE if this set contains no cookies.
Definition at line 1112 of file ncbicgi.hpp.
References set< Key, Compare >::empty(), and CCgiCookies::m_Cookies.
Referenced by CCgiResponse::WriteHeader().
void CCgiResponse::EndLastPart | ( | CNcbiOstream & | os | ) |
Definition at line 521 of file ncbicgir.cpp.
References _ASSERT, CCgiResponse::eMultipart_none, HTTP_EOL, CCgiResponse::m_Boundary, CCgiResponse::m_IsMultipart, and NcbiFlush.
|
inline |
Definition at line 376 of file ncbicgir.hpp.
References CCgiResponse::out().
void CCgiResponse::EndPart | ( | CNcbiOstream & | os | ) |
Definition at line 511 of file ncbicgir.cpp.
References _ASSERT, CCgiResponse::eMultipart_none, HTTP_EOL, CCgiResponse::m_BetweenParts, CCgiResponse::m_Boundary, CCgiResponse::m_IsMultipart, and NcbiFlush.
|
inline |
Definition at line 371 of file ncbicgir.hpp.
References CCgiResponse::out().
void CCgiResponse::Finalize | ( | void | ) | const |
Called by the CGI framework after a ProcessRequest(), unless the latter threw an exception.
Definition at line 458 of file ncbicgir.cpp.
References ERR_POST_X, CCgiResponse::m_HeaderWritten, CCgiResponse::m_JQuery_Callback, CCgiResponse::m_Output, and CCgiResponse::m_RequireWriteHeader.
Definition at line 548 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 544 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Referenced by CCgiApplication::ConfigureDiagDestination().
Return NULL if cannot find this exact cookie.
Definition at line 689 of file ncbicgi.cpp.
References _ASSERT, AStrEquiv(), set< Key, Compare >::begin(), set< Key, Compare >::end(), CCgiCookies::m_Cookies, and s_CookieLess().
Referenced by CCgiCookies::Add(), CCgiCookies::Find(), CCgiCookies::Remove(), CCgiSession::RetrieveSessionId(), CCgiContext::RetrieveTrackingId(), s_CheckCookieForTID(), CHttpRequest::x_GetCookieValue(), CCgiRequest::x_InitRequestContext(), and CCgiApplication::x_OnEvent().
const CCgiCookie * CCgiCookies::Find | ( | const string & | name, |
const string & | domain, | ||
const string & | path | ||
) | const |
Definition at line 712 of file ncbicgi.cpp.
References CCgiCookies::Find().
const CCgiCookie * CCgiCookies::Find | ( | const string & | name, |
TCRange * | range = 0 |
||
) | const |
Definition at line 746 of file ncbicgi.cpp.
References CCgiCookies::Find(), and compile_time_bits::range().
CCgiCookie * CCgiCookies::Find | ( | const string & | name, |
TRange * | range = 0 |
||
) |
Return the first matched cookie with name "name", or NULL if there is no such cookie(s).
Also, if "range" is non-NULL then assign its "first" and "second" fields to the beginning and the end of the range of cookies matching the name "name". NOTE: if there is a cookie with empty domain and path then this cookie is guaranteed to be returned.
Definition at line 720 of file ncbicgi.cpp.
References set< Key, Compare >::begin(), set< Key, Compare >::end(), CCgiCookies::m_Cookies, and compile_time_bits::range().
Definition at line 546 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 552 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 550 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
void CCgiResponse::FinishChunkedTransfer | ( | void | ) |
Finish chunked transfer, append zero chunk and trailers, if any.
All trailers must be set before calling this method.
Definition at line 676 of file ncbicgir.cpp.
References CCgiStreamWrapper::eBlockWrites, CCgiStreamWrapper::eChunkedWrites, CCgiStreamWrapper::FinishChunkedTransfer(), CCgiStreamWrapper::GetWriterMode(), CCgiResponse::m_Output, CCgiResponse::m_TrailerValues, and CCgiStreamWrapper::SetWriterMode().
void CCgiResponse::Flush | ( | void | ) | const |
Flush output stream.
Definition at line 529 of file ncbicgir.cpp.
References CCgiResponse::GetOutput(), and NcbiFlush.
Referenced by CPsgCgiApp::Help(), main(), CSoapServerApplication::ProcessRequest(), and s_Demo().
CCgiCookies::TCRange CCgiCookies::GetAll | ( | void | ) | const |
Return the full range [begin():end()] on the underlying container.
Definition at line 763 of file ncbicgi.cpp.
References set< Key, Compare >::begin(), set< Key, Compare >::end(), and CCgiCookies::m_Cookies.
|
inline |
Definition at line 328 of file ncbicgi.hpp.
References CCgiCookies::m_AllHttpOnly.
Referenced by CCgiResponse::WriteHeader().
|
inline |
Definition at line 324 of file ncbicgi.hpp.
References CCgiCookies::m_AllSecure.
Referenced by CCgiResponse::WriteHeader().
|
inline |
Definition at line 670 of file ncbicgi.hpp.
References CExtraEntryCollector::m_Args.
Referenced by CCgiApplication::x_OnEvent().
void CCgiRequest::GetCGIEntries | ( | CEntryCollector_Base & | collector | ) | const |
Get full set of arguments (both GET and POST), URL-encoded.
A &-separated list of exclusions can be set in CGI_LOG_EXCLUDE_ARGS variable or [CGI] LOG_EXCLUDE_ARGS value in ini file.
Definition at line 1648 of file ncbicgi.cpp.
References CEntryCollector_Base::AddEntry(), ERR_POST, Error(), NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, if(), ITERATE, kEmptyStr, CCgiRequest::m_Entries, CCgiRequest::m_Indexes, NStr::Split(), NStr::SplitInTwo(), string, NStr::StringToInt(), and val.
Referenced by CCgiRequest::GetCGIEntriesStr(), and CCgiApplication::x_OnEvent().
string CCgiRequest::GetCGIEntriesStr | ( | void | ) | const |
Shortcut for collecting arguments into a URL-style string.
Definition at line 1763 of file ncbicgi.cpp.
References CStringEntryCollector::GetArgs(), and CCgiRequest::GetCGIEntries().
bool CCgiResponse::GetChunkedTransferEnabled | ( | void | ) | const |
Check/change chunked transfer encoding status.
This flag is used only if CGI_CHUNKED_TRANSFER is not set.
Definition at line 647 of file ncbicgir.cpp.
References eChunked_Default, eChunked_Disable, CCgiRequest::GetEnvironment(), CCgiResponse::m_ChunkedTransfer, CCgiResponse::m_Request, and CCgiResponse::x_ClientSupportsChunkedTransfer().
Referenced by CCgiResponse::CanSendTrailer(), and CCgiResponse::WriteHeader().
|
static |
Definition at line 633 of file ncbicgir.cpp.
Referenced by CCgiStreamWrapperWriter::SetMode().
Return client tracking environment variables These variables are stored in the form "name=value".
The last element in the returned array is 0.
Definition at line 1557 of file ncbicgi.cpp.
References CCgiRequest::m_Env, and CCgiRequest::m_TrackingEnvHolder.
Get request content.
The content is saved only when fSaveRequestContent flag is set. Otherwise the method will throw an exception.
Definition at line 1416 of file ncbicgi.cpp.
References eRead, CCgiRequest::m_Content, and NCBI_THROW.
Referenced by CCgi2RCgiApp::SubmitJob().
size_t CCgiRequest::GetContentLength | ( | void | ) | const |
Definition at line 1494 of file ncbicgi.cpp.
References eCgi_ContentLength, CCgiRequest::GetProperty(), CCgiRequest::kContentLengthUnknown, NCBI_RETHROW, str(), and NStr::StringToUInt().
Referenced by CCgiRequest::x_ProcessInputStream().
May be available for some fields of POSTed forms.
Definition at line 525 of file ncbicgi.hpp.
References CCgiEntry::m_Data.
Referenced by CCgiEntry::operator=(), CCgiEntry::operator==(), CContElemConverter< CCgiEntry >::ToString(), and CCgiEntry::x_GetCharset().
|
inline |
Get content type.
Definition at line 342 of file ncbicgir.hpp.
References CCgiResponse::GetHeaderValue(), and CCgiResponse::sm_ContentTypeName.
|
inline |
Definition at line 1176 of file ncbicgi.hpp.
References CCgiRequest::m_Cookies.
|
inline |
Retrieve the request cookies.
Definition at line 1173 of file ncbicgi.hpp.
References CCgiRequest::m_Cookies.
Referenced by CCgiRequest::Deserialize(), CCgiSession::RetrieveSessionId(), CCgiRequest::Serialize(), and CCgiApplication::x_OnEvent().
|
static |
Get default set of search engine definitions.
Definition at line 45 of file ref_args.cpp.
Definition at line 1037 of file ncbicgi.hpp.
References CCgiCookie::m_Domain.
Referenced by CCgiCookies::Add().
|
inline |
Definition at line 1184 of file ncbicgi.hpp.
References CCgiRequest::m_Entries.
|
inline |
Get a set of entries(decoded) received from the client.
Also includes "indexes" if "indexes_as_entries" in the constructor was TRUE (default). NOTE: In the "fParseInputOnDemand" mode not all of the entries may be loaded at the time of the call.
Definition at line 1181 of file ncbicgi.hpp.
References CCgiRequest::m_Entries.
Referenced by CCgiContext::AddRequestValue(), CPager::CPager(), CSelection::CSelection(), CCgiRequest::Deserialize(), CPager::GetDisplayedPage(), CCgiRequest::GetEntry(), CPager::GetPageSize(), CGridCgiContext::GetRequestEntryValue(), CCgiContext::GetRequestValue(), CPager::IsPagerCommand(), main(), CCgi2RCgiApp::ProcessRequest(), CCgiRedirectApplication::RemapEntries(), CCgiContext::RemoveRequestValues(), CGlTestApplication::Render(), CSeqTestApplication::Render(), CCgiRequest::Serialize(), CBlastHitMatrixCGIApplication::x_GetCGIContextParams(), CAlnMultiCGIApplication::x_PreProcess(), and CSoapServerApplication::x_ProcessWsdlRequest().
Get entry value by name.
NOTE 1: There can be more than one entry with the same name; only one of these entry will be returned. To get all matches use GetEntries() and "multimap::" member functions. NOTE 2: In the "fParseInputOnDemand" mode not all of the entries may be loaded at the time of the call, so – use GetPossiblyUnparsedEntry() instead.
Definition at line 1449 of file ncbicgi.cpp.
References multimap_checker< Container >::end(), multimap_checker< Container >::find(), CSafeStatic< T, Callbacks >::Get(), and CCgiRequest::GetEntries().
Referenced by CCgiStatistics::Compose_Entries(), CCgiApplication::ConfigureDiagDestination(), CCgiApplication::ConfigureDiagFormat(), CCgiApplication::ConfigureDiagThreshold(), CCgiContext::ProcessCORSRequest(), CFastCgiMTSampleRequestProcessor::ProcessRequest(), CNetCacheBlobFetchApp::ProcessRequest(), CCgiSampleApplication::ProcessRequest(), CCgiSessionSampleApplication::ProcessRequest(), CCgiFontTestApp::Render(), ReportJSONVersion(), CCgiSession::RetrieveSessionId(), s_CheckRequestEntryForTID(), s_WriteHeader(), TestDelay(), CCgiApplication::x_ProcessAdminRequest(), CCgiApplication::x_ProcessHelpRequest(), and CCgiApplication::x_ProcessVersionRequest().
|
inline |
Definition at line 891 of file ncbicgi.hpp.
References CCgiRequest::m_Env.
Referenced by CCgiResponse::GetChunkedTransferEnabled(), and SRemoteCgi::Input().
bool CCgiCookie::GetExpDate | ( | tm * | exp_date | ) | const |
If exp.date is not set then return FALSE and dont assign "*exp_date".
Definition at line 221 of file ncbicgi.cpp.
References eUnknown, CCgiCookie::m_Expires, NCBI_THROW, and s_IsZeroTime().
string CCgiCookie::GetExpDate | ( | void | ) | const |
Day, dd-Mon-yyyy hh:mm:ss GMT (return empty string if not set)
Definition at line 206 of file ncbicgi.cpp.
References kEmptyStr, CCgiCookie::m_Expires, NCBI_THROW, s_IsZeroTime(), str(), and string.
Referenced by CCgiCookie::Write().
Only available for certain fields of POSTed forms.
Definition at line 508 of file ncbicgi.hpp.
References CCgiEntry::m_Data.
Referenced by CCgiEntry::operator=(), CCgiEntry::operator==(), and CContElemConverter< CCgiEntry >::ToString().
Definition at line 117 of file ncbicgir.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), kEmptyStr, and CCgiResponse::m_HeaderValues.
Referenced by CCgiResponse::AcceptRangesBytes(), CCgiResponse::BeginPart(), CCgiResponse::GetContentType(), and CCgiResponse::WriteHeader().
|
inline |
Definition at line 1046 of file ncbicgi.hpp.
References CCgiCookie::m_HttpOnly.
|
inline |
Definition at line 1189 of file ncbicgi.hpp.
References CCgiRequest::m_Indexes.
|
inline |
Get a set of indexes(decoded) received from the client.
It will always be empty if "indexes_as_entries" in the constructor was TRUE (default).
Definition at line 1192 of file ncbicgi.hpp.
References CCgiRequest::m_Indexes.
Referenced by CCgiRequest::Deserialize(), and CCgiRequest::Serialize().
|
inline |
Returns file descriptor of input stream, or -1 if unavailable.
Definition at line 1200 of file ncbicgi.hpp.
References CCgiRequest::m_InputFD.
|
inline |
Return pointer to the input stream.
Return NULL if the input stream is absent, or if it has been automagically read and parsed already (the "POST" method, and "application/x-www-form-urlencoded" or "multipart/form-data" type, and "fDoNotParseContent" flag was not passed to the constructor).
Definition at line 1196 of file ncbicgi.hpp.
References CCgiRequest::m_Input.
Referenced by CCgiRequest::Serialize(), and CSoapServerApplication::x_ProcessSoapRequest().
|
inline |
Definition at line 360 of file ncbicgir.hpp.
References CCgiResponse::m_IsMultipart.
The cookie name cannot be changed during its whole timelife.
Definition at line 1031 of file ncbicgi.hpp.
References CCgiCookie::m_Name.
Referenced by CCgiCookies::Add().
TCgiEntriesI CCgiEntryReaderContext::GetNextEntry | ( | void | ) |
Definition at line 233 of file cgi_entry_reader.cpp.
References _ASSERT, CCgiEntryReaderContext::CCgiEntryReader, CCgiEntryReaderContext::eCT_Multipart, CCgiEntryReaderContext::eCT_Null, CCgiEntryReaderContext::eCT_URLEncoded, multimap_checker< Container >::end(), multimap_checker< Container >::insert(), CCgiEntryReaderContext::m_ContentType, CCgiEntryReaderContext::m_CurrentEntry, CCgiEntryReaderContext::m_CurrentReader, CCgiEntryReaderContext::m_Out, CCgiEntryReaderContext::m_OutIter, CCgiEntryReaderContext::m_OutIterated, CCgiEntryReaderContext::m_Position, CCgiEntry::SetValue(), rapidjson::value, CCgiEntryReaderContext::x_FlushCurrentEntry(), CCgiEntryReaderContext::x_ReadMultipartHeaders(), and CCgiEntryReaderContext::x_ReadURLEncodedEntry().
Referenced by CCgiRequest::GetNextEntry().
TCgiEntriesI CCgiRequest::GetNextEntry | ( | void | ) |
Get next entry when parsing input on demand.
Returns GetEntries().end() when all entries have been parsed.
Definition at line 1462 of file ncbicgi.cpp.
References multimap_checker< Container >::end(), CCgiEntryReaderContext::GetNextEntry(), CCgiRequest::m_Entries, and CCgiRequest::m_EntryReaderContext.
Referenced by CCgiRequest::GetPossiblyUnparsedEntry(), and CCgiRequest::ParseRemainingContent().
CNcbiOstream * CCgiResponse::GetOutput | ( | void | ) | const |
Get output stream (NULL here means "no output stream").
Definition at line 239 of file ncbicgir.cpp.
References CCgiResponse::AcceptRangesBytes(), CCgiRequest::eMethod_HEAD, ERR_POST_X, CCgiResponse::HaveContentRange(), CCgiResponse::m_HeaderWritten, CCgiResponse::m_Output, CCgiResponse::m_RequestMethod, CCgiResponse::m_ThrowOnBadOutput, and CCgiResponse::SetThrowOnBadOutput().
Referenced by CCgiResponse::Flush(), CCgiResponse::out(), CCgiRequestProcessor::ProcessHelpRequest(), CCgiRequestProcessor::ProcessVersionRequest(), and CCgiApplication::x_OnEvent().
|
inline |
Get file descriptor of the output stream (-1 if not applicable)
Definition at line 391 of file ncbicgir.hpp.
References CCgiResponse::m_OutputFD.
Referenced by CCgiContext::GetStreamStatus().
Definition at line 1040 of file ncbicgi.hpp.
References CCgiCookie::m_Path.
Referenced by CCgiCookies::Add().
|
inline |
CGI parameter number – automatic image name parameter is #0, explicit parameters start at #1.
Definition at line 517 of file ncbicgi.hpp.
References CCgiEntry::m_Data.
Referenced by CCgiEntry::operator=(), and CContElemConverter< CCgiEntry >::ToString().
Get entry value by name, calling GetNextEntry() as needed.
NOTE: There can be more than one entry with the same name; only one of these entry will be returned.
To get all matches, use GetEntries() and "multimap::" member functions. If there is no such entry, this method will parse (and save) any remaining input and return NULL.
Definition at line 1469 of file ncbicgi.cpp.
References multimap_checker< Container >::end(), multimap_checker< Container >::find(), CCgiRequest::GetNextEntry(), CCgiRequest::m_Entries, and NULL.
Get value of a "standard" property (return empty string if not defined)
Definition at line 1432 of file ncbicgi.cpp.
References CCgiRequest::GetPropertyName(), and CCgiRequest::x_GetPropertyByName().
Referenced by CCgiRequest::CalcChecksum(), CCgiUserAgent::CCgiUserAgent(), CGridCgiContext::CGridCgiContext(), CCgiRequest::GetContentLength(), CCgiRequest::GetRequestMethodName(), CCgiContext::GetSelfURL(), CGridCgiApplication::IsCachingNeeded(), CCgiRequestProcessor::ParseAcceptHeader(), s_GetCgiTunnel2GridUrl(), CCgiRequest::x_Init(), CCgiApplication::x_OnEvent(), CCgiApplication::x_ProcessAdminRequest(), CCgiRequest::x_ProcessInputStream(), and CCgiRequest::x_ProcessQueryString().
Get name (not value!) of a "standard" property.
Definition at line 949 of file ncbicgi.cpp.
References _TROUBLE, eCgi_NProperties, eUnknown, NCBI_THROW, and s_PropName.
Referenced by CCgi2RCgiApp::CreateContextWithFlags(), CCgiApplication::CreateContextWithFlags_Default(), CCgiRequest::GetProperty(), CCgi2RCgiApp::ProcessRequest(), CCgiRequest::x_Init(), and CCgiRequest::x_SetClientIpProperty().
Find query string in the referrer.
referrer | Full HTTP referrer |
Definition at line 101 of file ref_args.cpp.
References ERR_POST_X, NStr::FindNoCase(), CUrl::GetArgs(), CUrl::GetHost(), CUrlArgs::GetValue(), CUrl::HaveArgs(), CUrlArgs::IsSetValue(), ITERATE, kEmptyStr, CRefArgs::m_HostMap, NPOS, and Warning().
Get value of a random client property; if "http" is TRUE then add prefix "HTTP_" to the property name.
NOTE: usually, the value is extracted from the environment variable named "$[HTTP]_<key>". Be advised, however, that in the case of FastCGI application, the set (and values) of env.variables change from request to request, and they differ from those returned by CNcbiApplication::GetEnvironment()!
Definition at line 1438 of file ncbicgi.cpp.
References ncbi::grid::netcache::search::fields::key, and CCgiRequest::x_GetPropertyByName().
Referenced by CCgiResponse::CanSendTrailer(), CGridCgiContext::CGridCgiContext(), CCgiContext::GetSelfURL(), CCgiContext::ProcessCORSRequest(), CCgiRequestProcessor::ValidateSynchronizationToken(), CCgiRequest::x_InitRequestContext(), CCgiContext::x_IsSecure(), and CCgiApplication::x_OnEvent().
CCgiRequest::ERequestMethod CCgiRequest::GetRequestMethod | ( | void | ) | const |
Get request method.
Definition at line 1810 of file ncbicgi.cpp.
References AStrEquiv(), CCgiRequest::eMethod_CONNECT, CCgiRequest::eMethod_DELETE, CCgiRequest::eMethod_GET, CCgiRequest::eMethod_HEAD, CCgiRequest::eMethod_OPTIONS, CCgiRequest::eMethod_Other, CCgiRequest::eMethod_POST, CCgiRequest::eMethod_PUT, CCgiRequest::eMethod_TRACE, CCgiRequest::GetRequestMethodName(), and i.
Referenced by CCgiContext::ProcessCORSRequest(), CCgiSampleApplication::ProcessPrintEnvironment(), CFastCgiMTSampleRequestProcessor::ProcessRequest(), CCgiSampleApplication::ProcessRequest(), CCgiApplication::x_DoneHeadRequest(), CCgiApplication::x_ProcessAdminRequest(), CCgiApplication::x_ProcessHelpRequest(), and CCgiApplication::x_ProcessVersionRequest().
Get request method name.
Definition at line 1804 of file ncbicgi.cpp.
References eCgi_RequestMethod, and CCgiRequest::GetProperty().
Referenced by CCgiRequest::GetRequestMethod(), and SRemoteCgi::Input().
|
inline |
Definition at line 1043 of file ncbicgi.hpp.
References CCgiCookie::m_Secure.
CCgiSession & CCgiRequest::GetSession | ( | ESessionCreateMode | mode = eCreateIfNotExist | ) | const |
Get session.
Definition at line 1605 of file ncbicgi.cpp.
References _ASSERT, CCgiSession::CreateNewSession(), CCgiRequest::eCreateIfNotExist, CCgiRequest::eDontLoad, CCgiSessionException::eSessionId, CCgiSession::Exists(), CCgiSession::Load(), CCgiRequest::m_Session, NCBI_RETHROW, and NCBI_THROW.
Referenced by CCgiSessionSampleApplication::ProcessRequest().
Definition at line 926 of file ncbicgi.hpp.
References CCgiRequest::m_TrackingCookie.
Referenced by CCgiRequestProcessor::ValidateSynchronizationToken().
Get current trailer value.
Definition at line 736 of file ncbicgir.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), kEmptyStr, and CCgiResponse::m_TrailerValues.
|
inline |
Definition at line 1101 of file ncbicgi.hpp.
References CCgiCookies::m_EncodeFlag.
Get the value as a string, (necessarily) prefetching it all if applicable; the result remains available for future calls to GetValue and relatives.
Definition at line 470 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceComplete().
Referenced by CCgiEntry::c_str(), CCgiEntry::compare(), CCgiStatistics::Compose_Entries(), CCgiEntry::empty(), CCgiEntry::find(), CCgiEntry::find_first_of(), CCgiEntry::GetValueAsUTF8(), CCgiEntry::GetValueStream(), CCgiEntry::operator const CTempStringEx(), CCgiEntry::operator const string &(), operator+(), operator<<(), CCgiEntry::operator=(), CCgiEntry::operator==(), CCgiSession::RetrieveSessionId(), CCgiContext::RetrieveTrackingId(), s_CheckRequestEntryForTID(), CCgiEntry::size(), CCgiEntry::substr(), CContElemConverter< CCgiEntry >::ToString(), CDisplaySeqalign::x_DisplayAlignSortInfo(), CDisplaySeqalign::x_FormatAlignSortInfo(), CDisplaySeqalign::x_MapDefLine(), and CDisplaySeqalign::x_ShowAlnvecInfoTemplate().
All "const string& GetXXX(...)" methods beneath return reference to "NcbiEmptyString" if the requested attributre is not set.
Definition at line 1034 of file ncbicgi.hpp.
References CCgiCookie::m_Value.
Referenced by CCgiSession::RetrieveSessionId(), CCgiContext::RetrieveTrackingId(), s_CheckCookieForTID(), and CHttpRequest::x_GetCookieValue().
CStringUTF8 CCgiEntry::GetValueAsUTF8 | ( | EOnCharsetError | on_error = eCharsetError_Ignore | ) | const |
Definition at line 1935 of file ncbicgi.cpp.
References CCgiEntry::eCharsetError_Throw, GetCharsetEncodingForm(), CCgiEntry::GetValue(), ReadIntoUtf8(), and CCgiEntry::x_GetCharset().
|
inline |
Get the value via a reader, potentially on the fly – in which case the caller takes ownership of the source, and subsequent calls to GetValue and relatives will yield NO data.
(In either case, the caller owns the resulting object.)
Definition at line 1136 of file ncbicgi.hpp.
References CCgiEntry::m_Data.
|
inline |
Get the value as a stream, potentially on the fly – in which case the caller takes ownership of the source, and subsequent calls to GetValue and relatives will yield NO data.
(In either case, the caller owns the resulting object.)
Definition at line 1147 of file ncbicgi.hpp.
References CRWStreambuf::fOwnReader, CCgiEntry::GetValue(), and CCgiEntry::m_Data.
bool CCgiResponse::HaveContentRange | ( | void | ) | const |
Check if 'Content-Range' header is set.
Definition at line 586 of file ncbicgir.cpp.
References CCgiResponse::HaveHeaderValue(), and CCgiResponse::sm_ContentRange.
Referenced by CCgiResponse::GetOutput(), and CCgiApplication::x_OnEvent().
Definition at line 111 of file ncbicgir.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), and CCgiResponse::m_HeaderValues.
Referenced by CCgiResponse::HaveContentRange(), and CCgiResponse::WriteHeader().
Check if trailer has been added and its value can be set.
Definition at line 730 of file ncbicgir.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), and CCgiResponse::m_TrailerValues.
Referenced by CCgiResponse::SetTrailerValue().
void CCgiEntryReaderContext::IncludePreparsedEntries | ( | void | ) |
Definition at line 279 of file cgi_entry_reader.cpp.
References multimap_checker< Container >::end(), CCgiEntryReaderContext::m_Out, CCgiEntryReaderContext::m_OutIter, and CCgiEntryReaderContext::m_OutIterated.
Referenced by CCgiRequest::x_ProcessInputStream().
void CCgiResponse::InitCORSHeaders | ( | const string & | origin, |
const string & | jquery_callback = kEmptyStr |
||
) |
This method is called automatically by CCgiContext.
Initialize cross-origin resource sharing (CORS) headers.
origin | Must match allowed origins for the CORS to be enabled. |
jquery_callback | Used to enable JQuery JSONP hack to allow cross-origin resource sharing for browsers that don't support CORS (e.g. IE versions earlier than 11). For more info about this (hopefully temporary) hack see the sources. |
Definition at line 592 of file ncbicgir.cpp.
|
inline |
Definition at line 406 of file ncbicgir.hpp.
References CCgiResponse::m_HeaderWritten.
Referenced by CAsBodyDiagFactory::New(), and CCgiApplication::x_DoneHeadRequest().
|
inline |
Definition at line 1050 of file ncbicgi.hpp.
References CCgiCookie::m_InvalidFlag.
Referenced by CCgiCookie::CopyAttributes().
Check if the host from the referrer string is listed in definitions.
Definition at line 120 of file ref_args.cpp.
References NStr::Find(), NStr::FindNoCase(), ITERATE, CRefArgs::m_HostMap, and NPOS.
|
inline |
Definition at line 332 of file ncbicgir.hpp.
References CCgiResponse::m_IsRawCgi.
Referenced by CCgiResponse::WriteHeader().
|
private |
|
private |
|
inline |
Definition at line 534 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 532 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
|
inline |
Definition at line 533 of file ncbicgi.hpp.
References CCgiEntry::SetValue().
Definition at line 565 of file ncbicgi.hpp.
Definition at line 585 of file ncbicgi.hpp.
Definition at line 575 of file ncbicgi.hpp.
Definition at line 138 of file ncbicgi.hpp.
Definition at line 611 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 617 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
bool CCgiCookie::operator< | ( | const CCgiCookie & | cookie | ) | const |
Compare two cookies.
Definition at line 355 of file ncbicgi.cpp.
References CCgiCookie::m_Domain, CCgiCookie::m_Name, CCgiCookie::m_Path, and s_CookieLess().
|
inline |
Definition at line 623 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
|
inline |
Definition at line 195 of file ncbicgi.hpp.
References CCgiCookie::Write().
|
inline |
Definition at line 364 of file ncbicgi.hpp.
References CCgiCookies::Write().
|
private |
|
private |
Definition at line 456 of file ncbicgi.hpp.
References CCgiEntry::GetContentType(), CCgiEntry::GetFilename(), CCgiEntry::GetPosition(), CCgiEntry::GetValue(), CCgiEntry::SetContentType(), CCgiEntry::SetFilename(), CCgiEntry::SetPosition(), and CCgiEntry::SetValue().
|
private |
|
protected |
Definition at line 556 of file ncbicgi.hpp.
References CCgiEntry::GetContentType(), CCgiEntry::GetFilename(), and CCgiEntry::GetValue().
Definition at line 580 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 570 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
CNcbiOstream & CCgiResponse::out | ( | void | ) | const |
Get output stream. Throw exception if GetOutput() is NULL.
Definition at line 257 of file ncbicgir.cpp.
References CCgiResponse::GetOutput(), CCgiResponse::m_Output, and THROW1_TRACE.
Referenced by CCgiResponse::BeginPart(), CCgiResponse::EndLastPart(), CCgiResponse::EndPart(), CCgi2RCgiApp::ListenJobs(), main(), CAsBodyDiagFactory::New(), CCgiSampleApplication::ProcessPrintEnvironment(), CFastCgiMTSampleRequestProcessor::ProcessRequest(), CGlCgiImageApplication::ProcessRequest(), CCgiRedirectApplication::ProcessRequest(), CGridCgiApplication::ProcessRequest(), CNetCacheBlobFetchApp::ProcessRequest(), CBlastHitMatrixCGIApplication::ProcessRequest(), CCgiSampleApplication::ProcessRequest(), CCgiSessionSampleApplication::ProcessRequest(), CCgi2RCgiApp::ReadJob(), CCgi2RCgiApp::RenderPage(), ReportJSONVersion(), s_Demo(), CGridCgiContext::SetCompleteResponse(), CCgiResponse::WriteHeader(), CGlCgiImageApplication::x_HandleError(), CSoapServerApplication::x_ProcessSoapRequest(), CSoapServerApplication::x_ProcessWsdlRequest(), and CCgiSessionSampleApplication::x_ShowConfigFile().
|
static |
Decode the URL-encoded(FORM or ISINDEX) string "str" into a set of entries <"name", "value"> and add them to the "entries" set.
The new entries are added without overriding the original ones, even if they have the same names. FORM format: "name1=value1&.....", ('=' and 'value' are optional) ISINDEX format: "val1+val2+val3+....." If the "str" is in ISINDEX format then the entry "value" will be empty. On success, return zero; otherwise return location(1-based) of error
Definition at line 1530 of file ncbicgi.cpp.
References entries, CParseTemplException< TBase >::GetPos(), CUrlArgs_Parser::SetQueryString(), and str().
Referenced by CCgiRequest::CalcChecksum(), CFactory< Type >::CgiFactory(), CGridCgiContext::CGridCgiContext(), and CGridCgiApplication::IsCachingNeeded().
|
static |
Decode the URL-encoded string "str" into a set of ISINDEX-like entries and add them to the "indexes" set.
Definition at line 1543 of file ncbicgi.cpp.
References CCgiRequest::fIndexesNotEntries, CParseTemplException< TBase >::GetPos(), CUrlArgs_Parser::SetQueryString(), and str().
void CCgiRequest::ParseRemainingContent | ( | void | ) |
Parse any remaining POST content for use by GetEntries() et al.
Definition at line 1484 of file ncbicgi.cpp.
References multimap_checker< Container >::end(), CCgiRequest::GetNextEntry(), and CCgiRequest::m_Entries.
Referenced by CCgiRequest::x_ProcessInputStream().
|
virtual |
Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking.
Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.
Implements IReader.
Definition at line 91 of file cgi_entry_reader.cpp.
References _ASSERT, count, CT_EQ_INT_TYPE, CT_TO_INT_TYPE, eRW_Eof, eRW_NotImplemented, eRW_Success, CCgiEntryReader::fHitBoundary, CCgiEntryReader::fHitCRLF, CCgiEntryReader::m_Buffer, CCgiEntryReader::m_Context, CCgiEntryReaderContext::m_In, and CCgiEntryReader::m_State.
|
virtual |
Read as many as "count" bytes into a buffer pointed to by the "buf" argument.
Always store the number of bytes actually read (0 if read none) via the pointer "bytes_read", if provided non-NULL. Return non-eRW_Success code if EOF / error condition has been encountered during the operation (some data may have been read, nevertheless, and reflected in "*bytes_read"). Special case: if "count" is passed as 0, then the value of "buf" must be ignored, and no change should be made to the state of the input device (but may return non-eRW_Success to indicate that the input device has already been in an error condition).
Implements IReader.
Definition at line 67 of file cgi_entry_reader.cpp.
References _ASSERT, buf, count, CCgiEntryReaderContext::eCT_Multipart, eRW_Eof, eRW_Success, CCgiEntryReader::fHitBoundary, CCgiEntryReader::m_Buffer, CCgiEntryReaderContext::m_ContentType, CCgiEntryReader::m_Context, CCgiEntryReader::m_State, min(), n, and CCgiEntryReader::x_FillBuffer().
bool CCgiCookies::Remove | ( | CCgiCookie * | cookie, |
bool | destroy = true |
||
) |
Remove "cookie" from this set; deallocate it if "destroy" is true Return FALSE if can not find "cookie" in this set.
Definition at line 770 of file ncbicgi.cpp.
References destroy(), set< Key, Compare >::erase(), and CCgiCookies::m_Cookies.
Referenced by CCgiCookies::Remove().
Remove (and destroy if "destroy" is true) all cookies with the given "name".
Return # of found and removed cookies.
Definition at line 1117 of file ncbicgi.hpp.
References destroy(), CCgiCookies::Find(), compile_time_bits::range(), and CCgiCookies::Remove().
Remove (and destroy if "destroy" is true) all cookies belonging to range "range".
Return # of found and removed cookies.
Definition at line 780 of file ncbicgi.cpp.
References count, destroy(), set< Key, Compare >::erase(), CCgiCookies::m_Cookies, and compile_time_bits::range().
Definition at line 125 of file ncbicgir.cpp.
References map_checker< Container >::erase(), and CCgiResponse::m_HeaderValues.
Referenced by CCgiContext::ProcessCORSRequest(), and CCgiResponse::SetHeaderValue().
Remove trailer. Must be called before WriteHeader().
Definition at line 724 of file ncbicgir.cpp.
References map_checker< Container >::erase(), and CCgiResponse::m_TrailerValues.
|
inline |
Define if WriteHeader() must be called or can be skipped.
require | true - report (to application log) if WriteHeader has not been called by the end of ProcessRequest(); false - allow to skip WriteHeader call (e.g when the user writes custom HTTP header directly to the output stream). The default setting is 'true'. |
Definition at line 401 of file ncbicgir.hpp.
References CCgiResponse::m_RequireWriteHeader.
Referenced by CCgi2RCgiApp::ProcessRequest().
void CCgiCookie::Reset | ( | void | ) |
Reset everything but name to default state like CCgiCookie(m_Name, "")
Definition at line 177 of file ncbicgi.cpp.
References CCgiCookie::fInvalid_Any, kZeroTime, CCgiCookie::m_Domain, CCgiCookie::m_Expires, CCgiCookie::m_HttpOnly, CCgiCookie::m_Path, CCgiCookie::m_Secure, CCgiCookie::m_Value, and CCgiCookie::ResetInvalid().
|
inline |
Definition at line 1058 of file ncbicgi.hpp.
References CCgiCookie::m_InvalidFlag.
Referenced by CCgiCookie::CopyAttributes(), and CCgiCookie::Reset().
Definition at line 429 of file ncbicgi.hpp.
|
inline |
Definition at line 425 of file ncbicgi.hpp.
void CCgiRequest::Serialize | ( | CNcbiOstream & | os | ) | const |
Serialize/Deserialize a request to/from a stream.
Definition at line 1566 of file ncbicgi.cpp.
References buf, env, CCgiRequest::GetCookies(), CCgiRequest::GetEntries(), CCgiRequest::GetIndexes(), CCgiRequest::GetInputStream(), int, CCgiRequest::m_QueryStringParsed, WriteCgiCookies(), WriteContainer(), WriteEnvironment(), and WriteMap().
Referenced by CGI2GRID_ComposeHtmlPage(), CCgiApplication::SaveRequest(), and CCgi2RCgiApp::SubmitJob().
void CCgiCookies::SetAllCookiesHttpOnly | ( | bool | value | ) |
Mark all cookies as HTTP_ONLY.
Definition at line 810 of file ncbicgi.cpp.
References CCgiCookies::m_AllHttpOnly, CCgiCookies::m_Cookies, NON_CONST_ITERATE, and rapidjson::value.
void CCgiCookies::SetAllCookiesSecure | ( | bool | value | ) |
Mark all cookies as secure.
Definition at line 801 of file ncbicgi.cpp.
References CCgiCookies::m_AllSecure, CCgiCookies::m_Cookies, NON_CONST_ITERATE, and rapidjson::value.
|
inline |
Definition at line 411 of file ncbicgir.hpp.
References CCgiResponse::m_Request.
Referenced by CCgiContext::CCgiContext().
void CCgiResponse::SetChunkedTransferEnabled | ( | bool | value | ) |
Definition at line 663 of file ncbicgir.cpp.
References ERR_POST_X, CCgiResponse::m_ChunkedTransfer, CCgiResponse::m_HeaderWritten, and rapidjson::value.
|
inline |
Definition at line 527 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
Referenced by CCgiEntry::operator=().
Definition at line 529 of file ncbicgi.hpp.
References f, CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
Set content type (text/html by default if not provided)
Definition at line 337 of file ncbicgir.hpp.
References CCgiResponse::SetHeaderValue(), and CCgiResponse::sm_ContentTypeName.
Referenced by CPsgCgiApp::Help(), CAsBodyDiagFactory::New(), CCgiRequestProcessor::ProcessAdminRequest_Base(), CCgiRequestProcessor::ProcessHelpRequest(), CGlCgiImageApplication::ProcessRequest(), CSoapServerApplication::ProcessRequest(), CCgi2RCgiApp::ProcessRequest(), CBlastHitMatrixCGIApplication::ProcessRequest(), CCgiRequestProcessor::ProcessVersionRequest(), ReportJSONVersion(), s_WriteHeader(), and CGlCgiImageApplication::x_HandleError().
Definition at line 1011 of file ncbicgi.hpp.
References CCgiCookie::eField_Other, CCgiCookie::m_Domain, CCgiCookie::m_Name, str(), and CCgiCookie::x_CheckField().
Referenced by CCgiCookies::Add(), and CCgiCookie::CCgiCookie().
void CCgiResponse::SetExceptionAfterHEAD | ( | bool | expt_after_head | ) |
Definition at line 573 of file ncbicgir.cpp.
References CCgiResponse::m_ExceptionAfterHEAD.
|
inline |
Definition at line 1019 of file ncbicgi.hpp.
References CCgiCookie::m_Expires.
Definition at line 363 of file ncbicgi.cpp.
References _ASSERT, CTime::Day(), CTime::DayOfWeek(), CTime::Hour(), CTime::IsGmtTime(), CCgiCookie::m_Expires, CTime::Minute(), CTime::Month(), CTime::Second(), and CTime::Year().
Referenced by CCgiApplication::AddLBCookie().
|
inline |
Definition at line 510 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
Referenced by CCgiEntry::operator=().
Definition at line 512 of file ncbicgi.hpp.
References f, CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
Definition at line 470 of file ncbicgir.cpp.
References NStr::PrintableString(), CCgiResponse::SetHeaderValue(), ncbi::grid::netcache::search::fields::size, NStr::SizetToString(), CCgiResponse::sm_ContentDispoName, and CCgiResponse::sm_FilenamePrefix.
Definition at line 186 of file ncbicgir.cpp.
References CTime::AsString(), CTime::GetGmtTime(), CTime::IsEmpty(), CCgiResponse::RemoveHeaderValue(), and CCgiResponse::SetHeaderValue().
Definition at line 151 of file ncbicgir.cpp.
References CCgiResponse::m_HeaderValues, NCBI_THROW, CCgiResponse::RemoveHeaderValue(), rapidjson::value, and CCgiResponse::x_ValidateHeader().
Referenced by CCgi2RCgiApp::CheckIfJobDone(), CCgi2RCgiApp::DefineRefreshTags(), CCgi2RCgiApp::PopulatePage(), CCgiContext::ProcessCORSRequest(), CGridCgiApplication::RenderRefresh(), s_WriteHeader(), CCgiResponse::SetContentType(), CCgiResponse::SetFilename(), CCgiResponse::SetHeaderValue(), CCgiResponse::SetLocation(), CCgiResponse::SetRetryContext(), CCgiResponse::SetStatus(), and CCgiResponse::WriteHeader().
Definition at line 169 of file ncbicgir.cpp.
References NCBI_THROW, CCgiResponse::RemoveHeaderValue(), s_ZeroTime(), and CCgiResponse::SetHeaderValue().
|
inline |
Definition at line 1025 of file ncbicgi.hpp.
References CCgiCookie::m_HttpOnly.
Referenced by CCgiResponse::WriteHeader().
void CCgiRequest::SetInputStream | ( | CNcbiIstream * | is, |
bool | own = false , |
||
int | fd = -1 |
||
) |
Set input stream to "is".
If "own" is set to TRUE then this stream will be destroyed as soon as SetInputStream() gets called with another stream pointer. NOTE: SetInputStream(0) will be called in ::~CCgiRequest().
Definition at line 1513 of file ncbicgi.cpp.
References CCgiRequest::m_EntryReaderContext, CCgiRequest::m_Input, CCgiRequest::m_InputFD, CCgiRequest::m_OwnInput, and NULL.
Referenced by CCgiRequest::~CCgiRequest().
|
inline |
Definition at line 1054 of file ncbicgi.hpp.
References CCgiCookie::m_InvalidFlag.
Referenced by CCgiCookies::Add(), and CCgiCookie::CopyAttributes().
|
inline |
Set the "Location:" HTTP header.
Definition at line 347 of file ncbicgir.hpp.
References CUrl::ComposeUrl(), CUrlArgs::eAmp_Char, CCgiResponse::SetHeaderValue(), and CCgiResponse::sm_LocationName.
|
inline |
Definition at line 354 of file ncbicgir.hpp.
References GetDiagContext(), CDiagContext::GetStringUID(), CCgiResponse::m_Boundary, CCgiResponse::m_IsMultipart, and CCgiResponse::sm_BoundaryPrefix.
void CCgiResponse::SetOutput | ( | CNcbiOstream * | os, |
int | fd = -1 |
||
) |
Set output stream (NULL here means "no output stream").
This does not flush the previous stream (if any), so some data may be lost.
Definition at line 223 of file ncbicgir.cpp.
References CCgiResponse::m_HeaderWritten, CCgiResponse::m_Output, CCgiResponse::m_OutputExpt, CCgiResponse::m_OutputFD, CCgiResponse::m_ThrowOnBadOutput, output, and CCgiResponse::x_RestoreOutputExceptions().
Referenced by CCgiResponse::CCgiResponse(), and CAsBodyDiagFactory::New().
Definition at line 1015 of file ncbicgi.hpp.
References CCgiCookie::eField_Other, CCgiCookie::m_Name, CCgiCookie::m_Path, str(), and CCgiCookie::x_CheckField().
Referenced by CCgiCookies::Add(), and CCgiCookie::CCgiCookie().
|
inline |
Definition at line 519 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
Referenced by CCgiEntry::operator=().
|
inline |
Definition at line 521 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
|
inline |
Definition at line 327 of file ncbicgir.hpp.
References CCgiResponse::m_IsRawCgi.
|
inline |
Set HTTP request method.
Definition at line 422 of file ncbicgir.hpp.
References CCgiResponse::m_RequestMethod.
Referenced by CCgiContext::CCgiContext().
void CCgiResponse::SetRetryContext | ( | const CRetryContext & | ctx | ) |
Set retry headers from the context.
Definition at line 600 of file ncbicgir.cpp.
References ctx, ITERATE, and CCgiResponse::SetHeaderValue().
|
inline |
Definition at line 1022 of file ncbicgi.hpp.
References CCgiCookie::m_Secure.
Referenced by CCgiApplication::AddLBCookie(), and CCgiResponse::WriteHeader().
|
inline |
Set secure connection flag.
Affects printing of cookies: secure cookies can be sent only trough secure connections.
Definition at line 320 of file ncbicgi.hpp.
References CCgiCookies::m_Secure.
Referenced by CCgiContext::x_InitSession().
Definition at line 197 of file ncbicgir.cpp.
References CDiagContext::GetRequestContext(), CCgiException::GetStdStatusMessage(), CCgiResponse::SetHeaderValue(), CRequestContext::SetRequestStatus(), CCgiResponse::sm_HTTPStatusName, THROW1_TRACE, and NStr::UIntToString().
Referenced by CCgiContext::ProcessCORSRequest(), CCgiSampleApplication::ProcessPrintEnvironment(), CCgi2RCgiApp::RenderPage(), and CSoapServerApplication::x_ProcessSoapRequest().
void CCgiResponse::SetThrowOnBadOutput | ( | bool | throw_on_bad_output | ) |
If set to TRUE then the writes to a "bad" output stream will throw exceptions of type std::ios_base::failure.
Definition at line 563 of file ncbicgir.cpp.
References CCgiResponse::m_Output, CCgiResponse::m_OutputExpt, and CCgiResponse::m_ThrowOnBadOutput.
Referenced by CCgiResponse::GetOutput().
Store/retrieve tracking cookie value.
Unlike CCgiResponse or CRequestContext, this value is not empty only if the tracking ID was actually received in the request.
Definition at line 925 of file ncbicgi.hpp.
References CCgiRequest::m_TrackingCookie.
void CCgiResponse::SetTrackingCookie | ( | const string & | name, |
const string & | value, | ||
const string & | domain, | ||
const string & | path, | ||
const CTime & | exp_time = CTime() |
||
) |
Definition at line 539 of file ncbicgir.cpp.
References CTime::AddYear(), CTime::eCurrent, CTime::eGmt, CTime::IsEmpty(), CCgiResponse::m_TrackingCookie, and rapidjson::value.
Referenced by CCgiContext::x_InitSession().
Set trailer value.
The trailer should have been added using AddTrailer().
Definition at line 743 of file ncbicgir.cpp.
References ERR_POST_X, CCgiResponse::HaveTrailer(), CCgiResponse::m_TrailerValues, NCBI_THROW, rapidjson::value, and CCgiResponse::x_ValidateHeader().
|
inline |
Definition at line 1107 of file ncbicgi.hpp.
References CCgiCookies::m_EncodeFlag.
Referenced by CCgiRequest::x_Init().
|
inline |
Definition at line 475 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
Referenced by CCgiEntryReaderContext::GetNextEntry(), CCgiEntry::operator string &(), and CCgiEntry::operator=().
|
inline |
Definition at line 481 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
All SetXXX(const string&) methods beneath:
Definition at line 1007 of file ncbicgi.hpp.
References CCgiCookie::fInvalid_Value, CCgiCookie::m_InvalidFlag, CCgiCookie::m_Value, and str().
Referenced by CCgiCookies::Add(), and CCgiCookie::CCgiCookie().
Definition at line 477 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceUnique().
|
inline |
Definition at line 479 of file ncbicgi.hpp.
References CCgiEntry::m_Data, r(), and CCgiEntry::x_ForceUnique().
|
inline |
commonly-requested string:: operations...
Definition at line 537 of file ncbicgi.hpp.
References CCgiEntry::GetValue().
Definition at line 542 of file ncbicgi.hpp.
References CCgiEntry::GetValue(), i, and n.
Referenced by CCgiStatistics::Compose_Entries().
CNcbiOstream & CCgiCookies::Write | ( | CNcbiOstream & | os, |
CCgiCookie::EWriteMethod | wmethod = CCgiCookie::eHTTPResponse |
||
) | const |
Printout all cookies into the stream "os".
Definition at line 670 of file ncbicgi.cpp.
References set< Key, Compare >::begin(), CCgiCookie::eHTTPRequest, CCgiCookie::eHTTPResponse, ITERATE, CCgiCookies::m_Cookies, CCgiCookies::m_EncodeFlag, and CCgiCookies::m_Secure.
Referenced by operator<<(), and WriteCgiCookies().
CNcbiOstream & CCgiCookie::Write | ( | CNcbiOstream & | os, |
EWriteMethod | wmethod = eHTTPResponse , |
||
EUrlEncode | flag = eUrlEncode_SkipMarkChars |
||
) | const |
Compose and write to output stream "os":
wmethod |
|
Definition at line 232 of file ncbicgi.cpp.
References CCgiCookie::eField_Name, CCgiCookie::eField_Value, CCgiCookie::eHTTPResponse, CCgiCookie::fInvalid_Name, CCgiCookie::fInvalid_Value, CCgiCookie::GetExpDate(), HTTP_EOL, CCgiCookie::m_Domain, CCgiCookie::m_HttpOnly, CCgiCookie::m_InvalidFlag, CCgiCookie::m_Name, CCgiCookie::m_Path, CCgiCookie::m_Secure, CCgiCookie::m_Value, NCBI_THROW2, NStr::PrintableString(), and CCgiCookie::x_EncodeCookie().
Referenced by operator<<().
CNcbiOstream & CCgiResponse::WriteHeader | ( | CNcbiOstream & | os | ) | const |
Definition at line 266 of file ncbicgir.cpp.
References CCgiCookies::Add(), CCgiException::e200_Ok, CRequestStatus::e204_NoContent, CCgiStreamWrapper::eBlockWrites, CCgiStreamWrapper::eChunkedWrites, CCgiUserAgent::eEngine_IE, CCgiRequest::eMethod_HEAD, map_checker< Container >::empty(), CCgiCookies::Empty(), CCgiResponse::eMultipart_mixed, CCgiResponse::eMultipart_none, CCgiResponse::eMultipart_related, CCgiResponse::eMultipart_replace, map_checker< Container >::end(), NStr::eNocase, NStr::EqualNocase(), ERR_POST_X_ONCE, failure, NStr::FindNoCase(), CCgiCookies::GetAllCookiesHttpOnly(), CCgiCookies::GetAllCookiesSecure(), CCgiResponse::GetChunkedTransferEnabled(), GetDiagContext(), CCgiResponse::GetHeaderValue(), CRequestContext::GetNextSubHitID(), CDiagContext::GetRequestContext(), CRequestContext::GetRequestStatus(), CCgiSession::GetSessionCookie(), CCgiResponse::HaveHeaderValue(), HTTP_EOL, i, CCgiResponse::IsRawCgi(), ITERATE, map_checker< Container >::lower_bound(), CCgiResponse::m_Boundary, CCgiResponse::m_Cookies, CCgiResponse::m_DisableTrackingCookie, CCgiResponse::m_ExceptionAfterHEAD, CCgiResponse::m_HeaderValues, CCgiResponse::m_HeaderWritten, CCgiResponse::m_IsMultipart, CCgiResponse::m_JQuery_Callback, CCgiResponse::m_Output, CCgiResponse::m_RequestMethod, CCgiResponse::m_Session, CCgiResponse::m_TrackingCookie, CCgiResponse::m_TrailerValues, NCBI_CGI_THROW_WITH_STATUS, NCBI_THROW, NPOS, NStr::ReplaceInPlace(), CCgiResponse::SetHeaderValue(), CCgiCookie::SetHttpOnly(), CCgiCookie::SetSecure(), CCgiStreamWrapper::SetWriterMode(), CCgiResponse::sm_CacheControl, CCgiResponse::sm_ContentTypeDefault, CCgiResponse::sm_ContentTypeMixed, CCgiResponse::sm_ContentTypeName, CCgiResponse::sm_ContentTypeRelated, CCgiResponse::sm_ContentTypeXMR, CCgiResponse::sm_HTTPStatusDefault, CCgiResponse::sm_HTTPStatusName, NStr::StartsWith(), and Warning().
|
inline |
Write HTTP response header to the output stream.
Definition at line 396 of file ncbicgir.hpp.
References CCgiResponse::out().
Referenced by CPsgCgiApp::Help(), main(), CAsBodyDiagFactory::New(), CCgiRequestProcessor::ProcessAdminRequest_Base(), CCgiContext::ProcessCORSRequest(), CCgiRequestProcessor::ProcessHelpRequest(), CCgiSampleApplication::ProcessPrintEnvironment(), CFastCgiMTSampleRequestProcessor::ProcessRequest(), CGlCgiImageApplication::ProcessRequest(), CCgiRedirectApplication::ProcessRequest(), CGridCgiApplication::ProcessRequest(), CBlastHitMatrixCGIApplication::ProcessRequest(), CCgiSampleApplication::ProcessRequest(), CCgiSessionSampleApplication::ProcessRequest(), CCgiRequestProcessor::ProcessVersionRequest(), CCgi2RCgiApp::RenderPage(), ReportJSONVersion(), s_Demo(), s_WriteHeader(), CGlCgiImageApplication::x_HandleError(), CSoapServerApplication::x_ProcessSoapRequest(), CSoapServerApplication::x_ProcessWsdlRequest(), and CCgiSessionSampleApplication::x_ShowConfigFile().
|
staticprivate |
Definition at line 453 of file ncbicgi.cpp.
References _TROUBLE, CCgiCookies::eCheck_SkipInvalid, CCgiCookies::eCheck_StoreInvalid, CCgiCookies::eCheck_Valid, CCgiCookies::eOnBadCookie_Skip, CCgiCookies::eOnBadCookie_SkipAndError, CCgiCookies::eOnBadCookie_Store, CCgiCookies::eOnBadCookie_StoreAndError, CCgiCookies::eOnBadCookie_ThrowException, ERR_POST_X, str(), and CCgiCookie::x_CheckField().
Referenced by CCgiCookies::Add().
|
staticprivate |
Definition at line 283 of file ncbicgi.cpp.
References CCgiCookie::eField_Name, CCgiCookie::eField_Value, isprint(), msg(), NCBI_THROW2, NPOS, NStr::PrintableString(), and str().
Referenced by CCgiCookie::SetDomain(), CCgiCookie::SetPath(), and CCgiCookies::x_CheckField().
|
staticprivate |
Definition at line 639 of file ncbicgir.cpp.
References NStr::eNocase, env, and NStr::StartsWith().
Referenced by CCgiApplication::CreateContextWithFlags_Default(), and CCgiResponse::GetChunkedTransferEnabled().
|
private |
Definition at line 298 of file cgi_entry_reader.cpp.
References _ASSERT, _TROUBLE, _VERIFY, buffer, CT_EOF, CT_EQ_INT_TYPE, CT_INT_TYPE, CT_TO_CHAR_TYPE, CT_TO_INT_TYPE, CCgiEntryReaderContext::eCT_Multipart, CCgiEntryReaderContext::eCT_URLEncoded, NStr::EndsWith(), CCgiEntryReaderContext::eRT_Delimiter, CCgiEntryReaderContext::eRT_EOF, CCgiEntryReaderContext::eRT_LengthBound, CCgiEntryReaderContext::eRT_PartialDelimiter, HTTP_EOL, CCgiRequest::kContentLengthUnknown, CCgiEntryReaderContext::m_Boundary, CCgiEntryReaderContext::m_BytePos, CCgiEntryReaderContext::m_ContentLength, CCgiEntryReaderContext::m_ContentLog, CCgiEntryReaderContext::m_ContentType, CCgiEntryReaderContext::m_In, min(), n, NcbiGetline(), next(), and NPOS.
Referenced by CCgiEntryReaderContext::CCgiEntryReaderContext(), CCgiEntryReader::x_FillBuffer(), CCgiEntryReaderContext::x_ReadMultipartHeaders(), and CCgiEntryReaderContext::x_ReadURLEncodedEntry().
|
staticprivate |
Definition at line 111 of file ncbicgi.cpp.
References CCgiCookie::eCookieEnc_Quote, CCgiCookie::eCookieEnc_Url, CCgiCookie::eField_Name, NStr::eUrlEnc_Cookie, NStr::eUrlEnc_SkipMarkChars, NStr::NeedsURLEncoding(), NStr::Replace(), str(), and NStr::URLEncode().
Referenced by CCgiCookie::Write().
|
private |
Definition at line 112 of file cgi_entry_reader.cpp.
References count, CCgiEntryReaderContext::eRT_Delimiter, CCgiEntryReaderContext::eRT_EOF, CCgiEntryReaderContext::eRT_LengthBound, CCgiEntryReaderContext::eRT_PartialDelimiter, CCgiEntryReader::fHitBoundary, CCgiEntryReader::fHitCR, CCgiEntryReader::fHitCRLF, CCgiEntryReader::fHitLF, CCgiEntryReader::fUnread, CCgiEntryReaderContext::m_Boundary, CCgiEntryReader::m_Buffer, CCgiEntryReader::m_Context, CCgiEntryReader::m_State, max(), min(), n, NPOS, s_MatchesBoundary(), CCgiEntryReaderContext::x_DelimitedRead(), and CCgiEntryReader::x_HitBoundary().
Referenced by CCgiEntryReader::Read(), and CCgiEntryReader::x_Flush().
|
inlineprivate |
Definition at line 73 of file cgi_entry_reader.hpp.
References NPOS, and CCgiEntryReader::x_FillBuffer().
Referenced by CCgiEntryReaderContext::x_FlushCurrentEntry(), and CCgiEntryReader::~CCgiEntryReader().
|
private |
Definition at line 287 of file cgi_entry_reader.cpp.
References _ASSERT, CCgiEntryReaderContext::m_CurrentEntry, CCgiEntryReaderContext::m_CurrentReader, NULL, and CCgiEntryReader::x_Flush().
Referenced by CCgiEntryReaderContext::GetNextEntry(), and CCgiEntryReaderContext::~CCgiEntryReaderContext().
|
inlineprivate |
Definition at line 1159 of file ncbicgi.hpp.
References _ASSERT, data, g_ExtractReaderContents(), and CCgiEntry::m_Data.
Referenced by CCgiEntry::GetValue(), and CCgiEntry::x_ForceUnique().
|
inlineprivate |
Definition at line 591 of file ncbicgi.hpp.
References CCgiEntry::m_Data, and CCgiEntry::x_ForceComplete().
Referenced by CCgiEntry::SetContentType(), CCgiEntry::SetFilename(), CCgiEntry::SetPosition(), and CCgiEntry::SetValue().
|
private |
Definition at line 1842 of file ncbicgi.cpp.
References NStr::FindNoCase(), CCgiEntry::GetContentType(), kEmptyStr, and NPOS.
Referenced by CCgiEntry::GetValueAsUTF8().
retrieve(and cache) a property of given name
Definition at line 1426 of file ncbicgi.cpp.
References CNcbiEnvironment::Get(), and CCgiRequest::m_Env.
Referenced by CCgiRequest::GetProperty(), CCgiRequest::GetRandomProperty(), CCgiRequest::x_Init(), CCgiRequest::x_InitRequestContext(), and CCgiRequest::x_SetClientIpProperty().
|
private |
Definition at line 167 of file cgi_entry_reader.cpp.
References CCgiEntryReaderContext::eCT_Null, CCgiEntryReader::fHitBoundary, CCgiEntryReaderContext::m_ContentType, CCgiEntryReader::m_Context, CCgiEntryReaderContext::m_CurrentReader, CCgiEntryReader::m_State, and NULL.
Referenced by CCgiEntryReader::x_FillBuffer(), and CCgiEntryReader::~CCgiEntryReader().
|
private |
the real constructor code
Definition at line 1094 of file ncbicgi.cpp.
References _ASSERT, CCgiCookies::Add(), eCgi_HttpCookie, eCgi_NProperties, multimap_checker< Container >::end(), NStr::EndsWith(), env, ERR_POST_X, eUrlEncode_None, eUrlEncode_PercentOnly, CCgiRequest::fCookies_SpaceAsHex, CCgiRequest::fCookies_Unencoded, multimap_checker< Container >::find(), flags, CCgiRequest::fOwnEnvironment, CCgiRequest::GetProperty(), CCgiRequest::GetPropertyName(), i, ITERATE, kEmptyStr, CCgiRequest::m_Cookies, CCgiRequest::m_Entries, CCgiRequest::m_Env, CCgiRequest::m_OwnEnv, NCBI_RETHROW, s_AddEntry(), CCgiCookies::SetUrlEncodeFlag(), Warning(), CCgiRequest::x_GetPropertyByName(), CCgiRequest::x_InitRequestContext(), CCgiRequest::x_ProcessInputStream(), CCgiRequest::x_ProcessQueryString(), and CCgiRequest::x_SetClientIpProperty().
Referenced by CCgiRequest::CCgiRequest().
|
private |
Set the properties of CRequestContext (HitId, Dtab etc.).
Definition at line 1258 of file ncbicgi.cpp.
References CRequestContext_PassThrough::Deserialize(), CRequestContext_PassThrough::eFormat_UrlEncoded, CRequestContext::eHitID_Request, eNcbiStrings_PHID, multimap_checker< Container >::equal_range(), CCgiRequest::fIgnorePageHitId, CCgiCookies::Find(), flags, g_GetNcbiString(), CCgiRequest::GetRandomProperty(), CDiagContext::GetRequestContext(), CRequestContext::IsSetDtab(), CRequestContext::IsSetHitID(), CRequestContext::IsSetProperty(), CCgiRequest::m_Cookies, CCgiRequest::m_Entries, CRequestContext::SelectLastHitID(), CRequestContext::SetDtab(), CRequestContext::SetHitID(), CRequestContext::SetProperty(), and CCgiRequest::x_GetPropertyByName().
Referenced by CCgiRequest::CCgiRequest(), and CCgiRequest::x_Init().
|
private |
Parse input stream if needed.
Definition at line 1332 of file ncbicgi.cpp.
References AStrEquiv(), buf, eCgi_ContentType, eCgi_RequestMethod, eRead, CCgiRequest::fDoNotParseContent, CCgiRequest::fIncludePreparsedEntries, flags, CCgiRequest::fParseInputOnDemand, CCgiRequest::fSaveRequestContent, CCgiRequest::GetContentLength(), CCgiRequest::GetProperty(), CCgiEntryReaderContext::IncludePreparsedEntries(), CCgiRequest::m_Content, CCgiRequest::m_Entries, CCgiRequest::m_EntryReaderContext, CCgiRequest::m_Input, CCgiRequest::m_InputFD, CCgiRequest::m_OwnInput, NCBI_CATCH_ALL_X, NCBI_THROW2, NcbiCin, NcbiStreamCopy(), CCgiRequest::ParseRemainingContent(), CStreamUtils::Pushback(), NStr::StartsWith(), and STDIN_FILENO.
Referenced by CCgiRequest::Deserialize(), and CCgiRequest::x_Init().
|
private |
Parse entries or indexes from "$QUERY_STRING" or cmd.-line args.
Definition at line 1307 of file ncbicgi.cpp.
References eCgi_QueryString, eCgi_RequestMethod, ctll::empty(), CCgiRequest::fIgnoreQueryString, flags, CCgiRequest::GetProperty(), CCgiRequest::m_Entries, CCgiRequest::m_Indexes, CCgiRequest::m_QueryStringParsed, NULL, CUrlArgs_Parser::SetQueryString(), and CNcbiArguments::Size().
Referenced by CCgiRequest::Deserialize(), and CCgiRequest::x_Init().
|
private |
Definition at line 470 of file cgi_entry_reader.cpp.
References _TROUBLE, CCER, NStr::CompareNocase(), eEntry, NStr::EqualNocase(), ERR_POST_X, CCgiEntryReaderContext::eRT_Delimiter, CCgiEntryReaderContext::eRT_EOF, CCgiEntryReaderContext::eRT_LengthBound, CCgiEntryReaderContext::eRT_PartialDelimiter, kContentDisposition, kContentType, CCgiEntryReaderContext::m_BytePos, NCBI_THROW2, NPOS, s_FindAttribute(), Warning(), and CCgiEntryReaderContext::x_DelimitedRead().
Referenced by CCgiEntryReaderContext::GetNextEntry().
Definition at line 417 of file cgi_entry_reader.cpp.
References CCgiEntryReaderContext::eCT_Null, ERR_POST, CCgiEntryReaderContext::eRT_EOF, ITERATE, CCgiEntryReaderContext::m_ContentType, CCgiEntryReaderContext::m_ContentTypeDeclared, CCgiEntryReaderContext::m_In, NPOS, NStr::PrintableString(), NStr::URLDecodeInPlace(), rapidjson::value, Warning(), and CCgiEntryReaderContext::x_DelimitedRead().
Referenced by CCgiEntryReaderContext::GetNextEntry().
|
private |
Definition at line 215 of file ncbicgir.cpp.
References CCgiResponse::m_Output, CCgiResponse::m_OutputExpt, and CCgiResponse::m_ThrowOnBadOutput.
Referenced by CCgiResponse::SetOutput(), and CCgiResponse::~CCgiResponse().
|
private |
|
private |
Set client-ip property for logging.
Definition at line 1220 of file ncbicgi.cpp.
References client, eCgi_RemoteAddr, flags, CCgiRequest::fSkipDiagProperties, CCgiRequest::GetPropertyName(), CDiagContext::GetRequestContext(), CRequestContext::SetClientIP(), x_FirstWord(), and CCgiRequest::x_GetPropertyByName().
Referenced by CCgiRequest::CCgiRequest(), and CCgiRequest::x_Init().
|
inline |
Definition at line 1204 of file ncbicgi.hpp.
References CCgiRequest::m_Session.
|
inline |
Definition at line 416 of file ncbicgir.hpp.
References CCgiResponse::m_Session.
Referenced by CCgiContext::x_InitSession().
Definition at line 131 of file ncbicgir.cpp.
References NPOS, and rapidjson::value.
Referenced by CCgiResponse::SetHeaderValue(), and CCgiResponse::SetTrailerValue().
|
inline |
|
private |
Definition at line 58 of file cgi_entry_reader.cpp.
References CCgiEntryReader::fHitBoundary, CCgiEntryReader::m_State, CCgiEntryReader::x_Flush(), and CCgiEntryReader::x_HitBoundary().
CCgiEntryReaderContext::~CCgiEntryReaderContext | ( | ) |
Definition at line 227 of file cgi_entry_reader.cpp.
References CCgiEntryReaderContext::x_FlushCurrentEntry().
CCgiRequest::~CCgiRequest | ( | void | ) |
CCgiResponse::~CCgiResponse | ( | void | ) |
Definition at line 105 of file ncbicgir.cpp.
References CCgiResponse::x_RestoreOutputExceptions().
|
inlinevirtual |
Definition at line 652 of file ncbicgi.hpp.
|
inlineoverride |
Definition at line 663 of file ncbicgi.hpp.
CRefArgs::~CRefArgs | ( | void | ) |
Definition at line 66 of file ref_args.cpp.
CGI |
Definition at line 359 of file ncbicgi.hpp.
|
static |
Get content length using value of the property 'eCgi_ContentLength'.
Return "kContentLengthUnknown" if Content-Length header is missing.
Definition at line 781 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetContentLength(), and CCgiEntryReaderContext::x_DelimitedRead().
|
private |
Definition at line 346 of file ncbicgi.hpp.
Referenced by CCgiCookies::GetAllCookiesHttpOnly(), and CCgiCookies::SetAllCookiesHttpOnly().
|
private |
Definition at line 345 of file ncbicgi.hpp.
Referenced by CCgiCookies::GetAllCookiesSecure(), and CCgiCookies::SetAllCookiesSecure().
|
private |
Definition at line 673 of file ncbicgi.hpp.
Referenced by CExtraEntryCollector::AddEntry(), and CExtraEntryCollector::GetArgs().
|
protected |
Definition at line 271 of file ncbicgir.hpp.
Referenced by CCgiResponse::BeginPart(), and CCgiResponse::EndPart().
|
private |
Definition at line 125 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::CCgiEntryReaderContext(), CCgiEntryReaderContext::x_DelimitedRead(), and CCgiEntryReader::x_FillBuffer().
|
protected |
Definition at line 272 of file ncbicgir.hpp.
Referenced by CCgiResponse::BeginPart(), CCgiResponse::EndLastPart(), CCgiResponse::EndPart(), CCgiResponse::SetMultipartMode(), and CCgiResponse::WriteHeader().
|
private |
Definition at line 77 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReader::PendingCount(), CCgiEntryReader::Read(), and CCgiEntryReader::x_FillBuffer().
|
private |
Definition at line 128 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::x_DelimitedRead(), and CCgiEntryReaderContext::x_ReadMultipartHeaders().
|
private |
Definition at line 306 of file ncbicgir.hpp.
Referenced by CCgiResponse::GetChunkedTransferEnabled(), and CCgiResponse::SetChunkedTransferEnabled().
|
private |
Original request content or NULL if fSaveRequestContent is not set.
Definition at line 933 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetContent(), and CCgiRequest::x_ProcessInputStream().
|
private |
Definition at line 124 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::x_DelimitedRead().
|
private |
Definition at line 126 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::x_DelimitedRead().
|
private |
Definition at line 122 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::CCgiEntryReaderContext(), CCgiEntryReaderContext::GetNextEntry(), CCgiEntryReader::Read(), CCgiEntryReaderContext::x_DelimitedRead(), CCgiEntryReader::x_HitBoundary(), and CCgiEntryReaderContext::x_ReadURLEncodedEntry().
string CCgiEntry::SData::m_ContentType |
Definition at line 436 of file ncbicgi.hpp.
|
private |
Definition at line 123 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::x_ReadURLEncodedEntry().
|
private |
Definition at line 76 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReader::PendingCount(), CCgiEntryReader::Read(), CCgiEntryReader::x_FillBuffer(), and CCgiEntryReader::x_HitBoundary().
|
private |
Definition at line 343 of file ncbicgi.hpp.
Referenced by CCgiCookies::Add(), CCgiCookies::Clear(), CCgiCookies::Empty(), CCgiCookies::Find(), CCgiCookies::GetAll(), CCgiCookies::Remove(), CCgiCookies::SetAllCookiesHttpOnly(), CCgiCookies::SetAllCookiesSecure(), and CCgiCookies::Write().
|
private |
set of the request cookies(already retrieved; cached)
Definition at line 939 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetCookies(), CCgiRequest::x_Init(), and CCgiRequest::x_InitRequestContext().
|
protected |
Definition at line 275 of file ncbicgir.hpp.
Referenced by CCgiResponse::Cookies(), and CCgiResponse::WriteHeader().
|
private |
Definition at line 129 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::GetNextEntry(), and CCgiEntryReaderContext::x_FlushCurrentEntry().
|
private |
Definition at line 130 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::GetNextEntry(), CCgiEntryReaderContext::x_FlushCurrentEntry(), and CCgiEntryReader::x_HitBoundary().
Definition at line 604 of file ncbicgi.hpp.
Referenced by CCgiEntry::GetContentType(), CCgiEntry::GetFilename(), CCgiEntry::GetPosition(), CCgiEntry::GetValue(), CCgiEntry::GetValueReader(), CCgiEntry::GetValueStream(), CCgiEntry::SetContentType(), CCgiEntry::SetFilename(), CCgiEntry::SetPosition(), CCgiEntry::SetValue(), CCgiEntry::x_ForceComplete(), and CCgiEntry::x_ForceUnique().
|
private |
Definition at line 295 of file ncbicgir.hpp.
Referenced by CCgiResponse::DisableTrackingCookie(), and CCgiResponse::WriteHeader().
|
private |
Definition at line 158 of file ncbicgi.hpp.
Referenced by CCgiCookie::CopyAttributes(), CCgiCookie::GetDomain(), CCgiCookie::operator<(), CCgiCookie::Reset(), CCgiCookie::SetDomain(), and CCgiCookie::Write().
|
private |
Definition at line 342 of file ncbicgi.hpp.
Referenced by CCgiCookies::Add(), CCgiCookies::GetUrlEncodeFlag(), CCgiCookies::SetUrlEncodeFlag(), and CCgiCookies::Write().
|
private |
set of the request FORM-like entries(already retrieved; cached)
Definition at line 935 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetCGIEntries(), CCgiRequest::GetEntries(), CCgiRequest::GetNextEntry(), CCgiRequest::GetPossiblyUnparsedEntry(), CCgiRequest::ParseRemainingContent(), CCgiRequest::x_Init(), CCgiRequest::x_InitRequestContext(), CCgiRequest::x_ProcessInputStream(), and CCgiRequest::x_ProcessQueryString().
|
private |
Definition at line 981 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetNextEntry(), CCgiRequest::SetInputStream(), and CCgiRequest::x_ProcessInputStream().
|
private |
set of environment variables
Definition at line 930 of file ncbicgi.hpp.
Referenced by CCgiRequest::Deserialize(), CCgiRequest::GetClientTrackingEnv(), CCgiRequest::GetEnvironment(), CCgiRequest::x_GetPropertyByName(), and CCgiRequest::x_Init().
|
private |
Request initialization error buffer size; when initialization code hits unexpected EOF it will try to add diagnostics and print out accumulated request buffer 0 in this variable means no buffer diagnostics.
Definition at line 949 of file ncbicgi.hpp.
|
private |
Definition at line 303 of file ncbicgir.hpp.
Referenced by CCgiResponse::SetExceptionAfterHEAD(), and CCgiResponse::WriteHeader().
|
private |
Definition at line 160 of file ncbicgi.hpp.
Referenced by CCgiCookie::CCgiCookie(), CCgiCookie::CopyAttributes(), CCgiCookie::GetExpDate(), CCgiCookie::Reset(), CCgiCookie::SetExpDate(), and CCgiCookie::SetExpTime().
string CCgiEntry::SData::m_Filename |
Definition at line 436 of file ncbicgi.hpp.
|
protected |
Definition at line 273 of file ncbicgir.hpp.
Referenced by CCgiResponse::GetHeaderValue(), CCgiResponse::HaveHeaderValue(), CCgiResponse::RemoveHeaderValue(), CCgiResponse::SetHeaderValue(), and CCgiResponse::WriteHeader().
|
mutableprotected |
Definition at line 278 of file ncbicgir.hpp.
Referenced by CCgiResponse::CanSendTrailer(), CCgiResponse::Finalize(), CCgiResponse::GetOutput(), CCgiResponse::IsHeaderWritten(), CCgiResponse::SetChunkedTransferEnabled(), CCgiResponse::SetOutput(), and CCgiResponse::WriteHeader().
|
private |
Definition at line 88 of file ref_args.hpp.
Referenced by CRefArgs::AddDefinitions(), CRefArgs::GetQueryString(), and CRefArgs::IsListedHost().
|
private |
Definition at line 162 of file ncbicgi.hpp.
Referenced by CCgiCookie::CCgiCookie(), CCgiCookie::CopyAttributes(), CCgiCookie::GetHttpOnly(), CCgiCookie::Reset(), CCgiCookie::SetHttpOnly(), and CCgiCookie::Write().
|
private |
Definition at line 118 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::CCgiEntryReaderContext(), CCgiEntryReader::PendingCount(), CCgiEntryReaderContext::x_DelimitedRead(), and CCgiEntryReaderContext::x_ReadURLEncodedEntry().
|
private |
set of the request ISINDEX-like indexes(already retrieved; cached)
Definition at line 937 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetCGIEntries(), CCgiRequest::GetIndexes(), and CCgiRequest::x_ProcessQueryString().
|
private |
input stream
Definition at line 941 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetInputStream(), CCgiRequest::SetInputStream(), and CCgiRequest::x_ProcessInputStream().
|
private |
input file descriptor, if available.
Definition at line 943 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetInputFD(), CCgiRequest::SetInputStream(), and CCgiRequest::x_ProcessInputStream().
|
private |
Definition at line 163 of file ncbicgi.hpp.
Referenced by CCgiCookie::IsInvalid(), CCgiCookie::ResetInvalid(), CCgiCookie::SetInvalid(), CCgiCookie::SetValue(), and CCgiCookie::Write().
|
protected |
Definition at line 270 of file ncbicgir.hpp.
Referenced by CCgiResponse::BeginPart(), CCgiResponse::EndLastPart(), CCgiResponse::EndPart(), CCgiResponse::GetMultipartMode(), CCgiResponse::SetMultipartMode(), and CCgiResponse::WriteHeader().
|
protected |
Definition at line 269 of file ncbicgir.hpp.
Referenced by CCgiResponse::IsRawCgi(), and CCgiResponse::SetRawCgi().
|
private |
Definition at line 312 of file ncbicgir.hpp.
Referenced by CCgiResponse::Finalize(), CCgiContext::ProcessCORSRequest(), and CCgiResponse::WriteHeader().
|
private |
Definition at line 156 of file ncbicgi.hpp.
Referenced by CCgiCookie::CCgiCookie(), CCgiCookie::GetName(), CCgiCookie::operator<(), CCgiCookie::SetDomain(), CCgiCookie::SetPath(), and CCgiCookie::Write().
|
private |
Definition at line 119 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::GetNextEntry(), and CCgiEntryReaderContext::IncludePreparsedEntries().
|
private |
Definition at line 120 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::GetNextEntry(), and CCgiEntryReaderContext::IncludePreparsedEntries().
|
private |
Definition at line 121 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::GetNextEntry(), and CCgiEntryReaderContext::IncludePreparsedEntries().
|
protected |
Definition at line 276 of file ncbicgir.hpp.
Referenced by CCgiResponse::AbortChunkedTransfer(), CCgiResponse::Finalize(), CCgiResponse::FinishChunkedTransfer(), CCgiResponse::GetOutput(), CCgiResponse::out(), CCgiResponse::SetOutput(), CCgiResponse::SetThrowOnBadOutput(), CCgiResponse::WriteHeader(), and CCgiResponse::x_RestoreOutputExceptions().
|
protected |
Definition at line 280 of file ncbicgir.hpp.
Referenced by CCgiResponse::SetOutput(), CCgiResponse::SetThrowOnBadOutput(), and CCgiResponse::x_RestoreOutputExceptions().
|
protected |
Definition at line 277 of file ncbicgir.hpp.
Referenced by CCgiResponse::GetOutputFD(), and CCgiResponse::SetOutput().
|
private |
Definition at line 931 of file ncbicgi.hpp.
Referenced by CCgiRequest::Deserialize(), and CCgiRequest::x_Init().
|
private |
Definition at line 944 of file ncbicgi.hpp.
Referenced by CCgiRequest::SetInputStream(), and CCgiRequest::x_ProcessInputStream().
|
private |
Definition at line 159 of file ncbicgi.hpp.
Referenced by CCgiCookie::CopyAttributes(), CCgiCookie::GetPath(), CCgiCookie::operator<(), CCgiCookie::Reset(), CCgiCookie::SetPath(), and CCgiCookie::Write().
|
private |
Definition at line 127 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::GetNextEntry().
unsigned int CCgiEntry::SData::m_Position |
Definition at line 437 of file ncbicgi.hpp.
|
private |
Definition at line 952 of file ncbicgi.hpp.
Referenced by CCgiRequest::Deserialize(), CCgiRequest::Serialize(), and CCgiRequest::x_ProcessQueryString().
unique_ptr<IReader> CCgiEntry::SData::m_Reader |
Definition at line 438 of file ncbicgi.hpp.
|
private |
Definition at line 305 of file ncbicgir.hpp.
Referenced by CCgiResponse::CanSendTrailer(), CCgiResponse::GetChunkedTransferEnabled(), and CCgiResponse::SetCgiRequest().
|
protected |
Definition at line 281 of file ncbicgir.hpp.
Referenced by CCgiResponse::GetOutput(), CCgiResponse::SetRequestMethod(), and CCgiResponse::WriteHeader().
|
protected |
Definition at line 279 of file ncbicgir.hpp.
Referenced by CCgiResponse::Finalize(), and CCgiResponse::RequireWriteHeader().
|
private |
Definition at line 161 of file ncbicgi.hpp.
Referenced by CCgiCookie::CCgiCookie(), CCgiCookie::CopyAttributes(), CCgiCookie::GetSecure(), CCgiCookie::Reset(), CCgiCookie::SetSecure(), and CCgiCookie::Write().
|
private |
Definition at line 344 of file ncbicgi.hpp.
Referenced by CCgiCookies::SetSecure(), and CCgiCookies::Write().
|
private |
Definition at line 980 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetSession(), and CCgiRequest::x_SetSession().
|
private |
Definition at line 293 of file ncbicgir.hpp.
Referenced by CCgiResponse::WriteHeader(), and CCgiResponse::x_SetSession().
|
private |
Definition at line 78 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReader::PendingCount(), CCgiEntryReader::Read(), CCgiEntryReader::x_FillBuffer(), CCgiEntryReader::x_HitBoundary(), and CCgiEntryReader::~CCgiEntryReader().
|
private |
Definition at line 299 of file ncbicgir.hpp.
Referenced by CCgiResponse::GetOutput(), CCgiResponse::SetOutput(), CCgiResponse::SetThrowOnBadOutput(), and CCgiResponse::x_RestoreOutputExceptions().
|
private |
Definition at line 950 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetTrackingCookie(), and CCgiRequest::SetTrackingCookie().
|
private |
Definition at line 294 of file ncbicgir.hpp.
Referenced by CCgiResponse::SetTrackingCookie(), and CCgiResponse::WriteHeader().
|
mutableprivate |
Definition at line 979 of file ncbicgi.hpp.
Referenced by CCgiRequest::GetClientTrackingEnv().
|
mutableprivate |
Definition at line 307 of file ncbicgir.hpp.
Referenced by CCgiResponse::CanSendTrailer().
|
protected |
Definition at line 274 of file ncbicgir.hpp.
Referenced by CCgiResponse::AddTrailer(), CCgiResponse::FinishChunkedTransfer(), CCgiResponse::GetTrailerValue(), CCgiResponse::HaveTrailer(), CCgiResponse::RemoveTrailer(), CCgiResponse::SetTrailerValue(), and CCgiResponse::WriteHeader().
|
private |
Definition at line 157 of file ncbicgi.hpp.
Referenced by CCgiCookie::CopyAttributes(), CCgiCookie::GetValue(), CCgiCookie::Reset(), CCgiCookie::SetValue(), and CCgiCookie::Write().
string CCgiEntry::SData::m_Value |
Definition at line 436 of file ncbicgi.hpp.
NCBI_XCGI_EXPORT |
Parameter to control error handling of incoming cookies.
Does not affect error handling of outgoing cookies set by the application.
Definition at line 357 of file ncbicgi.hpp.
On_Bad_Cookie |
Definition at line 359 of file ncbicgi.hpp.
|
staticprotected |
Definition at line 263 of file ncbicgir.hpp.
Referenced by CCgiResponse::AcceptRangesBytes().
|
staticprotected |
Definition at line 264 of file ncbicgir.hpp.
Referenced by CCgiResponse::AcceptRangesBytes().
|
staticprotected |
Definition at line 261 of file ncbicgir.hpp.
Referenced by CCgiResponse::SetMultipartMode().
|
staticprotected |
Definition at line 262 of file ncbicgir.hpp.
Referenced by CCgiResponse::WriteHeader().
|
staticprotected |
Definition at line 257 of file ncbicgir.hpp.
Referenced by CCgiResponse::BeginPart(), and CCgiResponse::SetFilename().
|
staticprotected |
Definition at line 265 of file ncbicgir.hpp.
Referenced by CCgiResponse::HaveContentRange().
|
staticprotected |
Definition at line 253 of file ncbicgir.hpp.
Referenced by CCgiResponse::BeginPart(), and CCgiResponse::WriteHeader().
|
staticprotected |
Definition at line 254 of file ncbicgir.hpp.
Referenced by CCgiResponse::WriteHeader().
Definition at line 251 of file ncbicgir.hpp.
Referenced by CCgiResponse::BeginPart(), CCgiResponse::GetContentType(), CCgiResponse::SetContentType(), and CCgiResponse::WriteHeader().
|
staticprotected |
Definition at line 255 of file ncbicgir.hpp.
Referenced by CCgiResponse::WriteHeader().
|
staticprotected |
Definition at line 256 of file ncbicgir.hpp.
Referenced by CCgiResponse::WriteHeader().
|
staticprotected |
Definition at line 258 of file ncbicgir.hpp.
Referenced by CCgiResponse::BeginPart(), and CCgiResponse::SetFilename().
|
staticprotected |
Definition at line 260 of file ncbicgir.hpp.
Referenced by CCgiResponse::WriteHeader().
|
staticprotected |
Definition at line 259 of file ncbicgir.hpp.
Referenced by CCgiResponse::SetStatus(), and CCgiResponse::WriteHeader().
|
staticprotected |
Definition at line 252 of file ncbicgir.hpp.
Referenced by CCgiResponse::SetLocation().
|
friend |
Definition at line 310 of file ncbicgir.hpp.
|
friend |
Definition at line 309 of file ncbicgir.hpp.
|
friend |
Definition at line 181 of file ncbicgi.hpp.
|
friend |
Definition at line 132 of file cgi_entry_reader.hpp.
Referenced by CCgiEntryReaderContext::GetNextEntry().
|
friend |
Definition at line 80 of file cgi_entry_reader.hpp.