A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__CGIReqRes.html below:

NCBI C++ ToolKit: CGI Request/Response APIs

enum   CCgiEntryReader::EState {
  CCgiEntryReader::fUnread = 0x1 , CCgiEntryReader::fHitCR = 0x2 , CCgiEntryReader::fHitLF = 0x4 , CCgiEntryReader::fHitCRLF = fHitCR | fHitLF ,
  CCgiEntryReader::fHitBoundary = 0x8
}   enum   CCgiEntryReaderContext::EContentType { CCgiEntryReaderContext::eCT_Null , CCgiEntryReaderContext::eCT_URLEncoded , CCgiEntryReaderContext::eCT_Multipart }   enum   CCgiEntryReaderContext::EReadTerminator { CCgiEntryReaderContext::eRT_Delimiter , CCgiEntryReaderContext::eRT_EOF , CCgiEntryReaderContext::eRT_LengthBound , CCgiEntryReaderContext::eRT_PartialDelimiter }   enum   CCgiCookie::EWriteMethod { CCgiCookie::eHTTPResponse , CCgiCookie::eHTTPRequest }   Whether the cookie is sent as a part of HTTP request or HTTP response. More...
  enum   CCgiCookie::EInvalidFlag { CCgiCookie::fValid = 0 , CCgiCookie::fInvalid_Name = 1<<0 , CCgiCookie::fInvalid_Value = 1<<1 , CCgiCookie::fInvalid_Any = fInvalid_Name | fInvalid_Value }   enum   CCgiCookie::EFieldType { CCgiCookie::eField_Name , CCgiCookie::eField_Value , CCgiCookie::eField_Other }   enum   CCgiCookie::ECookieEncoding { CCgiCookie::eCookieEnc_Url , CCgiCookie::eCookieEnc_Quote }   enum   CCgiCookies::EOnBadCookie {
  CCgiCookies::eOnBadCookie_ThrowException , CCgiCookies::eOnBadCookie_SkipAndError , CCgiCookies::eOnBadCookie_Skip , CCgiCookies::eOnBadCookie_StoreAndError ,
  CCgiCookies::eOnBadCookie_Store
}   How to handle badly formed cookies. More...
  enum   CCgiCookies::ECheckResult { CCgiCookies::eCheck_Valid , CCgiCookies::eCheck_SkipInvalid , CCgiCookies::eCheck_StoreInvalid }   enum   ECgiProp {
  eCgi_ServerSoftware = 0 , eCgi_ServerName , eCgi_GatewayInterface , eCgi_ServerProtocol ,
  eCgi_ServerPort , eCgi_RemoteHost , eCgi_RemoteAddr , eCgi_ContentType ,
  eCgi_ContentLength , eCgi_RequestMethod , eCgi_PathInfo , eCgi_PathTranslated ,
  eCgi_ScriptName , eCgi_QueryString , eCgi_AuthType , eCgi_RemoteUser ,
  eCgi_RemoteIdent , eCgi_HttpAccept , eCgi_HttpCookie , eCgi_HttpIfModifiedSince ,
  eCgi_HttpReferer , eCgi_HttpUserAgent , eCgi_NProperties
}   Set of "standard" HTTP request properties. More...
  enum   CCgiEntry::EOnCharsetError { CCgiEntry::eCharsetError_Ignore , CCgiEntry::eCharsetError_Throw }   Action to perform if the explicit charset is not supported. More...
  enum   CCgiRequest::Flags {
  CCgiRequest::fIndexesNotEntries = (1 << 0) , CCgiRequest::fIgnoreQueryString = (1 << 1) , CCgiRequest::fOwnEnvironment = (1 << 2) , CCgiRequest::fDoNotParseContent = (1 << 3) ,
  CCgiRequest::fCaseInsensitiveArgs = (1 << 4) , CCgiRequest::fCookies_Unencoded = (1 << 5) , CCgiRequest::fCookies_SpaceAsHex = (1 << 6) , CCgiRequest::fSaveRequestContent = (1 << 7) ,
  CCgiRequest::fIgnorePageHitId = (1 << 8) , CCgiRequest::fSkipDiagProperties = (1 << 9) , CCgiRequest::fSetDiagProperties = 0 , CCgiRequest::fParseInputOnDemand = (1 << 10) ,
  CCgiRequest::fSemicolonIsNotArgDelimiter = (1 << 11) , CCgiRequest::fDisableTrackingCookie = (1 << 12) , CCgiRequest::fIncludePreparsedEntries = (1 << 13) , CCgiRequest::fDisableParsingAsIndex = (1 << 14)
}   enum   CCgiRequest::ESessionCreateMode { CCgiRequest::eCreateIfNotExist , CCgiRequest::eDontCreateIfNotExist , CCgiRequest::eDontLoad }   enum   CCgiRequest::ERequestMethod {
  CCgiRequest::eMethod_GET , CCgiRequest::eMethod_POST , CCgiRequest::eMethod_HEAD , CCgiRequest::eMethod_PUT ,
  CCgiRequest::eMethod_DELETE , CCgiRequest::eMethod_OPTIONS , CCgiRequest::eMethod_TRACE , CCgiRequest::eMethod_CONNECT ,
  CCgiRequest::eMethod_Other
}   Standard request methods. More...
  enum   CCgiResponse::EMultipartMode { CCgiResponse::eMultipart_none , CCgiResponse::eMultipart_mixed , CCgiResponse::eMultipart_related , CCgiResponse::eMultipart_replace }   ERW_Result  CCgiEntryReader::Read (void *buf, size_t count, size_t *bytes_read)   Read as many as "count" bytes into a buffer pointed to by the "buf" argument. More...
  ERW_Result  CCgiEntryReader::PendingCount (size_t *count)   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. More...
    CCgiEntryReader::CCgiEntryReader (TContext &context)     CCgiEntryReader::~CCgiEntryReader ()   void  CCgiEntryReader::x_FillBuffer (SIZE_TYPE count)   void  CCgiEntryReader::x_Flush (void)   void  CCgiEntryReader::x_HitBoundary (bool final)     CCgiEntryReaderContext::CCgiEntryReaderContext (CNcbiIstream &in, TCgiEntries &out, const string &content_type, size_t content_length=CCgiRequest::kContentLengthUnknown, string *content_log=NULL)     CCgiEntryReaderContext::~CCgiEntryReaderContext ()   TCgiEntriesI  CCgiEntryReaderContext::GetNextEntry (void)   void  CCgiEntryReaderContext::IncludePreparsedEntries (void)   void  CCgiEntryReaderContext::x_FlushCurrentEntry (void)   EReadTerminator  CCgiEntryReaderContext::x_DelimitedRead (string &s, SIZE_TYPE n=NPOS)   void  CCgiEntryReaderContext::x_ReadURLEncodedEntry (string &name, string &value)   void  CCgiEntryReaderContext::x_ReadMultipartHeaders (string &name, string &filename, string &content_type)     CCgiCookie::CCgiCookie (const CCgiCookie &cookie)   Copy constructor. More...
    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. More...
  const stringCCgiCookie::GetName (void) const   The cookie name cannot be changed during its whole timelife. More...
  CNcbiOstreamCCgiCookie::Write (CNcbiOstream &os, EWriteMethod wmethod=eHTTPResponse, EUrlEncode flag=eUrlEncode_SkipMarkChars) const   Compose and write to output stream "os": More...
  void  CCgiCookie::Reset (void)   Reset everything but name to default state like CCgiCookie(m_Name, "") More...
  void  CCgiCookie::CopyAttributes (const CCgiCookie &cookie)   Set all attribute values(but name!) to those from "cookie". More...
  void  CCgiCookie::SetValue (const string &str)   All SetXXX(const string&) methods beneath: More...
  void  CCgiCookie::SetDomain (const string &str)   void  CCgiCookie::SetPath (const string &str)   void  CCgiCookie::SetExpDate (const tm &exp_date)   void  CCgiCookie::SetExpTime (const CTime &exp_time)   void  CCgiCookie::SetSecure (bool secure)   void  CCgiCookie::SetHttpOnly (bool http_only)   const stringCCgiCookie::GetValue (void) const   All "const string& GetXXX(...)" methods beneath return reference to "NcbiEmptyString" if the requested attributre is not set. More...
  const stringCCgiCookie::GetDomain (void) const   const stringCCgiCookie::GetPath (void) const   string  CCgiCookie::GetExpDate (void) const   Day, dd-Mon-yyyy hh:mm:ss GMT (return empty string if not set) More...
  bool  CCgiCookie::GetExpDate (tm *exp_date) const   If exp.date is not set then return FALSE and dont assign "*exp_date". More...
  bool  CCgiCookie::GetSecure (void) const   bool  CCgiCookie::GetHttpOnly (void) const   bool  CCgiCookie::operator< (const CCgiCookie &cookie) const   Compare two cookies. More...
  bool  CCgiCookie::PLessCPtr::operator() (const TCPtr &c1, const TCPtr &c2) const   TInvalidFlag  CCgiCookie::IsInvalid (void) const   void  CCgiCookie::SetInvalid (TInvalidFlag flag)   void  CCgiCookie::ResetInvalid (TInvalidFlag flag)   static void  CCgiCookie::x_CheckField (const string &str, EFieldType ftype, const char *banned_symbols, const string *cookie_name=NULL)   static string  CCgiCookie::x_EncodeCookie (const string &str, EFieldType ftype, NStr::EUrlEncode flag)   static bool  CCgiCookie::x_GetString (string *str, const string &val)   CCgiCookieCCgiCookie::operator= (const CCgiCookie &)   CNcbiOstreamoperator<< (CNcbiOstream &os, const CCgiCookie &cookie)     CCgiCookies::CCgiCookies (void)   Empty set of cookies. More...
    CCgiCookies::CCgiCookies (EUrlEncode encode_flag)   Use the specified method of string encoding. More...
    CCgiCookies::CCgiCookies (const string &str, EOnBadCookie on_bad_cookie=eOnBadCookie_SkipAndError, EUrlEncode encode_flag=eUrlEncode_SkipMarkChars)   Format of the string: "name1=value1; name2=value2; ...". More...
    CCgiCookies::~CCgiCookies (void)   Destructor. More...
  bool  CCgiCookies::Empty (void) const   Return TRUE if this set contains no cookies. More...
  EUrlEncode  CCgiCookies::GetUrlEncodeFlag (void) const   void  CCgiCookies::SetUrlEncodeFlag (EUrlEncode encode_flag)   CCgiCookieCCgiCookies::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. More...
  CCgiCookieCCgiCookies::Add (const string &name, const string &value, EOnBadCookie on_bad_cookie)   CCgiCookieCCgiCookies::Add (const CCgiCookie &cookie)   Update with a copy of "cookie". More...
  void  CCgiCookies::Add (const CCgiCookies &cookies)   Update by a set of cookies. More...
  void  CCgiCookies::Add (const string &str, EOnBadCookie on_bad_cookie=eOnBadCookie_SkipAndError)   Update with a HTTP request like string: "name1=value1; name2=value2; ...". More...
  CCgiCookieCCgiCookies::Find (const string &name, const string &domain, const string &path)   Return NULL if cannot find this exact cookie. More...
  const CCgiCookieCCgiCookies::Find (const string &name, const string &domain, const string &path) const   CCgiCookieCCgiCookies::Find (const string &name, TRange *range=0)   Return the first matched cookie with name "name", or NULL if there is no such cookie(s). More...
  const CCgiCookieCCgiCookies::Find (const string &name, TCRange *range=0) const   TCRange  CCgiCookies::GetAll (void) const   Return the full range [begin():end()] on the underlying container. More...
  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. More...
  size_t  CCgiCookies::Remove (TRange &range, bool destroy=true)   Remove (and destroy if "destroy" is true) all cookies belonging to range "range". More...
  size_t  CCgiCookies::Remove (const string &name, bool destroy=true)   Remove (and destroy if "destroy" is true) all cookies with the given "name". More...
  void  CCgiCookies::Clear (void)   Remove all stored cookies. More...
  CNcbiOstreamCCgiCookies::Write (CNcbiOstream &os, CCgiCookie::EWriteMethod wmethod=CCgiCookie::eHTTPResponse) const   Printout all cookies into the stream "os". More...
  void  CCgiCookies::SetSecure (bool secure)   Set secure connection flag. More...
  void  CCgiCookies::SetAllCookiesSecure (bool value)   Mark all cookies as secure. More...
  bool  CCgiCookies::GetAllCookiesSecure (void) const   void  CCgiCookies::SetAllCookiesHttpOnly (bool value)   Mark all cookies as HTTP_ONLY. More...
  bool  CCgiCookies::GetAllCookiesHttpOnly (void) const   static ECheckResult  CCgiCookies::x_CheckField (const string &str, CCgiCookie::EFieldType ftype, const char *banned_symbols, EOnBadCookie on_bad_cookie, const string *cookie_name=NULL)     CCgiCookies::CCgiCookies (const CCgiCookies &)   prohibit default initialization and assignment More...
  CCgiCookiesCCgiCookies::operator= (const CCgiCookies &)   CNcbiOstreamoperator<< (CNcbiOstream &os, const CCgiCookies &cookies)     CCgiEntry::SData::SData (const string &value, const string &filename, unsigned int position, const string &type)     CCgiEntry::SData::SData (const SData &data)     CCgiEntry::CCgiEntry (const string &value=kEmptyStr, const string &filename=kEmptyStr, unsigned int position=0, const string &type=kEmptyStr)     CCgiEntry::CCgiEntry (const char *value, const string &filename=kEmptyStr, unsigned int position=0, const string &type=kEmptyStr)     CCgiEntry::CCgiEntry (const CCgiEntry &e)   CCgiEntryCCgiEntry::operator= (const CCgiEntry &e)   const stringCCgiEntry::GetValue () const   Get the value as a string, (necessarily) prefetching it all if applicable; the result remains available for future calls to GetValue and relatives. More...
  stringCCgiEntry::SetValue ()   void  CCgiEntry::SetValue (const string &v)   void  CCgiEntry::SetValue (IReader *r)   void  CCgiEntry::SetValue (CNcbiIstream &is, EOwnership own=eNoOwnership)   IReaderCCgiEntry::GetValueReader ()   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. More...
  CNcbiIstreamCCgiEntry::GetValueStream ()   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. More...
  CStringUTF8  CCgiEntry::GetValueAsUTF8 (EOnCharsetError on_error=eCharsetError_Ignore) const   const stringCCgiEntry::GetFilename () const   Only available for certain fields of POSTed forms. More...
  stringCCgiEntry::SetFilename ()   void  CCgiEntry::SetFilename (const string &f)   unsigned int  CCgiEntry::GetPosition () const   CGI parameter number – automatic image name parameter is #0, explicit parameters start at #1. More...
  unsigned intCCgiEntry::SetPosition ()   void  CCgiEntry::SetPosition (int p)   const stringCCgiEntry::GetContentType () const   May be available for some fields of POSTed forms. More...
  stringCCgiEntry::SetContentType ()   void  CCgiEntry::SetContentType (const string &f)     CCgiEntry::operator const string & () const     CCgiEntry::operator string & ()     CCgiEntry::operator const CTempStringEx () const   SIZE_TYPE  CCgiEntry::size () const   commonly-requested string:: operations... More...
  bool  CCgiEntry::empty () const   const char *  CCgiEntry::c_str () const   int  CCgiEntry::compare (const string &s) const   int  CCgiEntry::compare (const char *s) const   string  CCgiEntry::substr (SIZE_TYPE i=0, SIZE_TYPE n=NPOS) const   SIZE_TYPE  CCgiEntry::find (const char *s, SIZE_TYPE pos=0) const   SIZE_TYPE  CCgiEntry::find (const string &s, SIZE_TYPE pos=0) const   SIZE_TYPE  CCgiEntry::find (char c, SIZE_TYPE pos=0) const   SIZE_TYPE  CCgiEntry::find_first_of (const string &s, SIZE_TYPE pos=0) const   SIZE_TYPE  CCgiEntry::find_first_of (const char *s, SIZE_TYPE pos=0) const   bool  CCgiEntry::operator== (const CCgiEntry &e2) const   bool  CCgiEntry::operator!= (const CCgiEntry &v) const   bool  CCgiEntry::operator== (const string &v) const   bool  CCgiEntry::operator!= (const string &v) const   bool  CCgiEntry::operator== (const char *v) const   bool  CCgiEntry::operator!= (const char *v) const   void  CCgiEntry::x_ForceUnique ()   void  CCgiEntry::x_ForceComplete () const   string  CCgiEntry::x_GetCharset (void) const   string  operator+ (const CCgiEntry &e, const string &s)   string  operator+ (const string &s, const CCgiEntry &e)   CNcbiOstreamoperator<< (CNcbiOstream &o, const CCgiEntry &e)   virtual  CEntryCollector_Base::~CEntryCollector_Base (void)   virtual void  CEntryCollector_Base::AddEntry (const string &name, const string &value, const string &filename, bool is_index=false)=0     CExtraEntryCollector::CExtraEntryCollector (void)     CExtraEntryCollector::~CExtraEntryCollector (void) override   void  CExtraEntryCollector::AddEntry (const string &name, const string &value, const string &filename, bool is_index) override   CDiagContext_Extra::TExtraArgsCExtraEntryCollector::GetArgs (void)     CCgiRequest::CCgiRequest (const CNcbiArguments *args=0, const CNcbiEnvironment *env=0, CNcbiIstream *istr=0, TFlags flags=0, int ifd=-1, size_t errbuf_size=256)     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) More...
    CCgiRequest::CCgiRequest (CNcbiIstream &is, TFlags flags=0, size_t errbuf_size=256)     CCgiRequest::~CCgiRequest (void)   Destructor. More...
  static const string  CCgiRequest::GetPropertyName (ECgiProp prop)   Get name (not value!) of a "standard" property. More...
  const stringCCgiRequest::GetProperty (ECgiProp prop) const   Get value of a "standard" property (return empty string if not defined) More...
  const stringCCgiRequest::GetRandomProperty (const string &key, bool http=true) const   Get value of a random client property; if "http" is TRUE then add prefix "HTTP_" to the property name. More...
  size_t  CCgiRequest::GetContentLength (void) const   const stringCCgiRequest::GetContent (void) const   Get request content. More...
  const CCgiCookiesCCgiRequest::GetCookies (void) const   Retrieve the request cookies. More...
  CCgiCookiesCCgiRequest::GetCookies (void)   const TCgiEntriesCCgiRequest::GetEntries (void) const   Get a set of entries(decoded) received from the client. More...
  TCgiEntriesCCgiRequest::GetEntries (void)   const CCgiEntryCCgiRequest::GetEntry (const string &name, bool *is_found=0) const   Get entry value by name. More...
  TCgiEntriesI  CCgiRequest::GetNextEntry (void)   Get next entry when parsing input on demand. More...
  CCgiEntryCCgiRequest::GetPossiblyUnparsedEntry (const string &name)   Get entry value by name, calling GetNextEntry() as needed. More...
  void  CCgiRequest::ParseRemainingContent (void)   Parse any remaining POST content for use by GetEntries() et al. More...
  const TCgiIndexesCCgiRequest::GetIndexes (void) const   Get a set of indexes(decoded) received from the client. More...
  TCgiIndexesCCgiRequest::GetIndexes (void)   CCgiSessionCCgiRequest::GetSession (ESessionCreateMode mode=eCreateIfNotExist) const   Get session. More...
  CNcbiIstreamCCgiRequest::GetInputStream (void) const   Return pointer to the input stream. More...
  int  CCgiRequest::GetInputFD (void) const   Returns file descriptor of input stream, or -1 if unavailable. More...
  void  CCgiRequest::SetInputStream (CNcbiIstream *is, bool own=false, int fd=-1)   Set input stream to "is". More...
  static SIZE_TYPE  CCgiRequest::ParseEntries (const string &str, TCgiEntries &entries)   Decode the URL-encoded(FORM or ISINDEX) string "str" into a set of entries <"name", "value"> and add them to the "entries" set. More...
  static SIZE_TYPE  CCgiRequest::ParseIndexes (const string &str, TCgiIndexes &indexes)   Decode the URL-encoded string "str" into a set of ISINDEX-like entries and add them to the "indexes" set. More...
  const char *constCCgiRequest::GetClientTrackingEnv (void) const   Return client tracking environment variables These variables are stored in the form "name=value". More...
  void  CCgiRequest::Serialize (CNcbiOstream &os) const   Serialize/Deserialize a request to/from a stream. More...
  void  CCgiRequest::Deserialize (CNcbiIstream &is, TFlags flags=0)   const CNcbiEnvironmentCCgiRequest::GetEnvironment () const   void  CCgiRequest::GetCGIEntries (CEntryCollector_Base &collector) const   Get full set of arguments (both GET and POST), URL-encoded. More...
  string  CCgiRequest::GetCGIEntriesStr (void) const   Shortcut for collecting arguments into a URL-style string. More...
  bool  CCgiRequest::CalcChecksum (string &checksum, string &content) const   const stringCCgiRequest::GetRequestMethodName (void) const   Get request method name. More...
  ERequestMethod  CCgiRequest::GetRequestMethod (void) const   Get request method. More...
  void  CCgiRequest::SetTrackingCookie (const string &cookie_value)   Store/retrieve tracking cookie value. More...
  const stringCCgiRequest::GetTrackingCookie (void) const   void  CCgiRequest::x_Init (const CNcbiArguments *args, const CNcbiEnvironment *env, CNcbiIstream *istr, TFlags flags, int ifd)   the real constructor code More...
  const stringCCgiRequest::x_GetPropertyByName (const string &name) const   retrieve(and cache) a property of given name More...
  void  CCgiRequest::x_ProcessQueryString (TFlags flags, const CNcbiArguments *args)   Parse entries or indexes from "$QUERY_STRING" or cmd.-line args. More...
  void  CCgiRequest::x_ProcessInputStream (TFlags flags, CNcbiIstream *istr, int ifd)   Parse input stream if needed. More...
  void  CCgiRequest::x_SetClientIpProperty (TFlags flags) const   Set client-ip property for logging. More...
  void  CCgiRequest::x_InitRequestContext (TFlags flags)   Set the properties of CRequestContext (HitId, Dtab etc.). More...
    CCgiRequest::CCgiRequest (const CCgiRequest &)   prohibit default initialization and assignment More...
  CCgiRequestCCgiRequest::operator= (const CCgiRequest &)   string  CCgiRequest::x_RetrieveSessionId () const   void  CCgiRequest::x_SetSession (CCgiSession &session)     CCgiResponse::CCgiResponse (CNcbiOstream *os=NULL, int ofd=-1)     CCgiResponse::~CCgiResponse (void)   void  CCgiResponse::SetRawCgi (bool is_raw)   bool  CCgiResponse::IsRawCgi (void) const   void  CCgiResponse::SetStatus (unsigned int code, const string &reason=kEmptyStr)   void  CCgiResponse::SetHeaderValue (const string &name, const string &value)   void  CCgiResponse::SetHeaderValue (const string &name, const struct tm &value)   void  CCgiResponse::SetHeaderValue (const string &name, const CTime &value)   void  CCgiResponse::RemoveHeaderValue (const string &name)   string  CCgiResponse::GetHeaderValue (const string &name) const   bool  CCgiResponse::HaveHeaderValue (const string &name) const   void  CCgiResponse::SetContentType (const string &type)   Set content type (text/html by default if not provided) More...
  string  CCgiResponse::GetContentType (void) const   Get content type. More...
  void  CCgiResponse::SetFilename (const string &name, size_t size=0)   void  CCgiResponse::SetLocation (const CUrl &url, const IUrlEncoder *encoder=0)   Set the "Location:" HTTP header. More...
  void  CCgiResponse::SetMultipartMode (EMultipartMode mode=eMultipart_mixed)   EMultipartMode  CCgiResponse::GetMultipartMode (void)   void  CCgiResponse::BeginPart (const string &name, const string &type, size_t size=0)   void  CCgiResponse::EndPart (void)   void  CCgiResponse::EndLastPart (void)   void  CCgiResponse::BeginPart (const string &name, const string &type, CNcbiOstream &os, size_t size=0)   void  CCgiResponse::EndPart (CNcbiOstream &os)   void  CCgiResponse::EndLastPart (CNcbiOstream &os)   const CCgiCookiesCCgiResponse::Cookies (void) const   CCgiCookiesCCgiResponse::Cookies (void)   void  CCgiResponse::SetOutput (CNcbiOstream *os, int fd=-1)   Set output stream (NULL here means "no output stream"). More...
  CNcbiOstreamCCgiResponse::GetOutput (void) const   Get output stream (NULL here means "no output stream"). More...
  int  CCgiResponse::GetOutputFD (void) const   Get file descriptor of the output stream (-1 if not applicable) More...
  CNcbiOstreamCCgiResponse::out (void) const   Get output stream. Throw exception if GetOutput() is NULL. More...
  void  CCgiResponse::Flush (void) const   Flush output stream. More...
  CNcbiOstreamCCgiResponse::WriteHeader (void) const   Write HTTP response header to the output stream. More...
  CNcbiOstreamCCgiResponse::WriteHeader (CNcbiOstream &os) const   bool  CCgiResponse::IsHeaderWritten () const   void  CCgiResponse::RequireWriteHeader (bool require)   Define if WriteHeader() must be called or can be skipped. More...
  void  CCgiResponse::SetTrackingCookie (const string &name, const string &value, const string &domain, const string &path, const CTime &exp_time=CTime())   void  CCgiResponse::DisableTrackingCookie (void)   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. More...
  void  CCgiResponse::SetExceptionAfterHEAD (bool expt_after_head)   bool  CCgiResponse::AcceptRangesBytes (void) const   Check if 'Accept-Ranges' header is set to 'bytes'. More...
  bool  CCgiResponse::HaveContentRange (void) const   Check if 'Content-Range' header is set. More...
  void  CCgiResponse::InitCORSHeaders (const string &origin, const string &jquery_callback=kEmptyStr)   This method is called automatically by CCgiContext. More...
  void  CCgiResponse::SetRequestMethod (CCgiRequest::ERequestMethod method)   Set HTTP request method. More...
  void  CCgiResponse::Finalize (void) const   Called by the CGI framework after a ProcessRequest(), unless the latter threw an exception. More...
  void  CCgiResponse::SetRetryContext (const CRetryContext &ctx)   Set retry headers from the context. More...
  void  CCgiResponse::SetCgiRequest (const CCgiRequest &request)   bool  CCgiResponse::GetChunkedTransferEnabled (void) const   Check/change chunked transfer encoding status. More...
  void  CCgiResponse::SetChunkedTransferEnabled (bool value)   static size_t  CCgiResponse::GetChunkSize (void)   void  CCgiResponse::FinishChunkedTransfer (void)   Finish chunked transfer, append zero chunk and trailers, if any. More...
  void  CCgiResponse::AbortChunkedTransfer (void)   Abort chunked transfer, block any writes to the output stream. More...
  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'. More...
  void  CCgiResponse::AddTrailer (const string &name)   Prepare to send trailer. More...
  void  CCgiResponse::RemoveTrailer (const string &name)   Remove trailer. Must be called before WriteHeader(). More...
  bool  CCgiResponse::HaveTrailer (const string &name) const   Check if trailer has been added and its value can be set. More...
  string  CCgiResponse::GetTrailerValue (const string &name) const   Get current trailer value. More...
  void  CCgiResponse::SetTrailerValue (const string &name, const string &value)   Set trailer value. More...
  void  CCgiResponse::x_SetSession (const CCgiSession &session)     CCgiResponse::CCgiResponse (const CCgiResponse &)   CCgiResponseCCgiResponse::operator= (const CCgiResponse &)   void  CCgiResponse::x_RestoreOutputExceptions (void)   bool  CCgiResponse::x_ValidateHeader (const string &name, const string &value) const   static bool  CCgiResponse::x_ClientSupportsChunkedTransfer (const CNcbiEnvironment &env)     CCgiResponse::NCBI_PARAM_DECL (bool, CGI, ThrowOnBadOutput)   typedef  CCgiResponse::NCBI_PARAM_TYPE (CGI, ThrowOnBadOutput) TCGI_ThrowOnBadOutput     CCgiResponse::NCBI_PARAM_DECL (bool, CGI, ExceptionAfterHEAD)   typedef  CCgiResponse::NCBI_PARAM_TYPE (CGI, ExceptionAfterHEAD) TCGI_ExceptionAfterHEAD     CRefArgs::CRefArgs (const string &definitions=kEmptyStr)   Create referrer parser from a set of definitions. More...
    CRefArgs::~CRefArgs (void)   void  CRefArgs::AddDefinitions (const string &definitions)   Add mappings between host mask and CGI argument name for query string. More...
  void  CRefArgs::AddDefinitions (const string &host_mask, const string &arg_names)   string  CRefArgs::GetQueryString (const string &referrer) const   Find query string in the referrer. More...
  static string  CRefArgs::GetDefaultDefinitions (void)   Get default set of search engine definitions. More...
  bool  CRefArgs::IsListedHost (const string &referrer) const   Check if the host from the referrer string is listed in definitions. More...
  ◆ TCgiEntries ◆ TCgiEntriesCI ◆ TCgiEntriesI ◆ TCgiIndexes ◆ TCgiProperties ◆ TCIter ◆ TContext ◆ TCPtr ◆ TCRange ◆ 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.

◆ THostMap ◆ TInvalidFlag ◆ TIter ◆ TMap ◆ TRange ◆ TReader ◆ TSet ◆ TState ◆ ECgiProp

Set of "standard" HTTP request properties.

See also
CCgiRequest
Enumerator eCgi_ServerSoftware  eCgi_ServerName  eCgi_GatewayInterface  eCgi_ServerProtocol  eCgi_ServerPort  eCgi_RemoteHost  eCgi_RemoteAddr  eCgi_ContentType  eCgi_ContentLength  eCgi_RequestMethod  eCgi_PathInfo  eCgi_PathTranslated  eCgi_ScriptName  eCgi_QueryString  eCgi_AuthType  eCgi_RemoteUser  eCgi_RemoteIdent  eCgi_HttpAccept  eCgi_HttpCookie  eCgi_HttpIfModifiedSince  eCgi_HttpReferer  eCgi_HttpUserAgent  eCgi_NProperties 

Definition at line 378 of file ncbicgi.hpp.

◆ ECheckResult Enumerator eCheck_Valid  eCheck_SkipInvalid  eCheck_StoreInvalid 

Definition at line 331 of file ncbicgi.hpp.

◆ EContentType ◆ ECookieEncoding Enumerator eCookieEnc_Url  eCookieEnc_Quote 

Definition at line 185 of file ncbicgi.hpp.

◆ EFieldType Enumerator eField_Name  eField_Value  eField_Other 

Definition at line 165 of file ncbicgi.hpp.

◆ EInvalidFlag Enumerator fValid  fInvalid_Name  fInvalid_Value  fInvalid_Any 

Definition at line 143 of file ncbicgi.hpp.

◆ EMultipartMode Enumerator eMultipart_none  eMultipart_mixed  eMultipart_related  eMultipart_replace 

Definition at line 98 of file ncbicgir.hpp.

◆ EOnBadCookie

How to handle badly formed cookies.

Enumerator eOnBadCookie_ThrowException 

Throw exception, ignore bad cookie.

eOnBadCookie_SkipAndError 

Report error, ignore bad cookie.

eOnBadCookie_Skip 

Silently ignore bad cookie.

eOnBadCookie_StoreAndError 

Report error, store bad cookie as-is.

eOnBadCookie_Store 

Store bad cookie without URL-decoding.

Definition at line 228 of file ncbicgi.hpp.

◆ EOnCharsetError

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.

◆ EReadTerminator Enumerator eRT_Delimiter  eRT_EOF  eRT_LengthBound  eRT_PartialDelimiter 

Definition at line 105 of file cgi_entry_reader.hpp.

◆ ERequestMethod

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.

◆ ESessionCreateMode Enumerator eCreateIfNotExist 

If Session does not exist the new one will be created.

eDontCreateIfNotExist 

If Session does not exist the exception will be thrown.

Do not try to load or create session

eDontLoad 

Definition at line 835 of file ncbicgi.hpp.

◆ EState ◆ EWriteMethod

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.

◆ 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.

See also
fParseInputOnDemand
fDisableParsingAsIndex 

Disable parsing input as 'indexed' query (RFC3875) even if no '=' is present.

Definition at line 704 of file ncbicgi.hpp.

◆ AbortChunkedTransfer() void CCgiResponse::AbortChunkedTransfer ( void  ) ◆ AcceptRangesBytes() bool CCgiResponse::AcceptRangesBytes ( void  ) const ◆ Add() [1/5] ◆ Add() [2/5] ◆ Add() [3/5]

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().

◆ Add() [4/5] ◆ Add() [5/5]

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().

◆ AddDefinitions() [1/2] void CRefArgs::AddDefinitions ( const stringdefinitions ) ◆ AddDefinitions() [2/2] ◆ AddEntry() [1/2] ◆ AddEntry() [2/2] ◆ AddTrailer() ◆ BeginPart() [1/2]

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().

◆ BeginPart() [2/2] ◆ c_str() const char* CCgiEntry::c_str ( ) const inline ◆ CalcChecksum()

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().

◆ CanSendTrailer() bool CCgiResponse::CanSendTrailer ( void  ) const ◆ CCgiCookie() [1/2] ◆ CCgiCookie() [2/2]

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.

◆ CCgiCookies() [1/4]

prohibit default initialization and assignment

◆ CCgiCookies() [2/4] ◆ CCgiCookies() [3/4] CCgiCookies::CCgiCookies ( EUrlEncode  encode_flag ) inline

Use the specified method of string encoding.

Definition at line 1078 of file ncbicgi.hpp.

◆ CCgiCookies() [4/4] CCgiCookies::CCgiCookies ( void  ) inline ◆ CCgiEntry() [1/3] ◆ CCgiEntry() [2/3] ◆ CCgiEntry() [3/3] ◆ CCgiEntryReader() ◆ CCgiEntryReaderContext()

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() [1/4] CCgiRequest::CCgiRequest ( CNcbiIstreamis, TFlags  flags = 0, size_t  errbuf_size = 256  ) ◆ CCgiRequest() [2/4]

prohibit default initialization and assignment

◆ CCgiRequest() [3/4] ◆ CCgiRequest() [4/4] ◆ CCgiResponse() [1/2] ◆ CCgiResponse() [2/2] ◆ CExtraEntryCollector() CExtraEntryCollector::CExtraEntryCollector ( void  ) inline

Definition at line 662 of file ncbicgi.hpp.

◆ Clear() void CCgiCookies::Clear ( void  ) ◆ compare() [1/2] int CCgiEntry::compare ( const char *  s ) const inline ◆ compare() [2/2] ◆ Cookies() [1/2] ◆ Cookies() [2/2] ◆ CopyAttributes() ◆ CRefArgs()

Create referrer parser from a set of definitions.

Parameters
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().

◆ Deserialize()

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().

◆ DisableTrackingCookie() void CCgiResponse::DisableTrackingCookie ( void  ) ◆ empty() bool CCgiEntry::empty ( ) const inline ◆ Empty() bool CCgiCookies::Empty ( void  ) const inline ◆ EndLastPart() [1/2] ◆ EndLastPart() [2/2] void CCgiResponse::EndLastPart ( void  ) inline ◆ EndPart() [1/2] ◆ EndPart() [2/2] void CCgiResponse::EndPart ( void  ) inline ◆ Finalize() void CCgiResponse::Finalize ( void  ) const ◆ find() [1/3] ◆ find() [2/3] ◆ Find() [1/4]

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().

◆ Find() [2/4] ◆ Find() [3/4] ◆ Find() [4/4]

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(), and CCgiCookies::m_Cookies.

◆ find() [3/3] ◆ find_first_of() [1/2] ◆ find_first_of() [2/2] ◆ FinishChunkedTransfer() void CCgiResponse::FinishChunkedTransfer ( void  ) ◆ Flush() void CCgiResponse::Flush ( void  ) const ◆ GetAll() ◆ GetAllCookiesHttpOnly() bool CCgiCookies::GetAllCookiesHttpOnly ( void  ) const inline ◆ GetAllCookiesSecure() bool CCgiCookies::GetAllCookiesSecure ( void  ) const inline ◆ GetArgs() ◆ GetCGIEntries()

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().

◆ GetCGIEntriesStr() string CCgiRequest::GetCGIEntriesStr ( void  ) const ◆ GetChunkedTransferEnabled() bool CCgiResponse::GetChunkedTransferEnabled ( void  ) const ◆ GetChunkSize() size_t CCgiResponse::GetChunkSize ( void  ) static ◆ GetClientTrackingEnv() const char *const * CCgiRequest::GetClientTrackingEnv ( void  ) const ◆ GetContent() ◆ GetContentLength() size_t CCgiRequest::GetContentLength ( void  ) const ◆ GetContentType() [1/2] ◆ GetContentType() [2/2] string CCgiResponse::GetContentType ( void  ) const inline ◆ GetCookies() [1/2] ◆ GetCookies() [2/2] ◆ GetDefaultDefinitions() string CRefArgs::GetDefaultDefinitions ( void  ) static

Get default set of search engine definitions.

Definition at line 45 of file ref_args.cpp.

◆ GetDomain() ◆ GetEntries() [1/2] ◆ GetEntries() [2/2]

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().

◆ GetEntry()

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().

◆ GetEnvironment() ◆ GetExpDate() [1/2] bool CCgiCookie::GetExpDate ( tm *  exp_date ) const ◆ GetExpDate() [2/2] string CCgiCookie::GetExpDate ( void  ) const ◆ GetFilename() ◆ GetHeaderValue() ◆ GetHttpOnly() bool CCgiCookie::GetHttpOnly ( void  ) const inline ◆ GetIndexes() [1/2] ◆ GetIndexes() [2/2] ◆ GetInputFD() int CCgiRequest::GetInputFD ( void  ) const inline ◆ GetInputStream() ◆ GetMultipartMode() ◆ GetName() ◆ GetNextEntry() [1/2]

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().

◆ GetNextEntry() [2/2] ◆ GetOutput()

Get output stream (NULL here means "no output stream").

Attention
If the output stream is in a "bad" state and the SetThrowOnBadOutput() is set to TRUE, then:

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().

◆ GetOutputFD() int CCgiResponse::GetOutputFD ( void  ) const inline ◆ GetPath() ◆ GetPosition() unsigned int CCgiEntry::GetPosition ( void  ) const inline ◆ GetPossiblyUnparsedEntry() ◆ GetProperty()

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().

◆ GetPropertyName() ◆ GetQueryString()

Find query string in the referrer.

Parameters
referrer Full HTTP referrer
Returns
Query string assigned to one of the names associated with the host in the referrer or empty string.

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().

◆ GetRandomProperty()

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().

◆ GetRequestMethod()

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().

◆ GetRequestMethodName() const string & CCgiRequest::GetRequestMethodName ( void  ) const ◆ GetSecure() bool CCgiCookie::GetSecure ( void  ) const inline ◆ GetSession() ◆ GetTrackingCookie() const string& CCgiRequest::GetTrackingCookie ( void  ) const inline ◆ GetTrailerValue() ◆ GetUrlEncodeFlag() EUrlEncode CCgiCookies::GetUrlEncodeFlag ( void  ) const inline ◆ GetValue() [1/2]

Get the value as a string, (necessarily) prefetching it all if applicable; the result remains available for future calls to GetValue and relatives.

See also
GetValueReader, GetValueStream

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().

◆ GetValue() [2/2] ◆ GetValueAsUTF8() ◆ GetValueReader() IReader * CCgiEntry::GetValueReader ( ) 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.)

See also
GetValue, GetValueStream

Definition at line 1136 of file ncbicgi.hpp.

References CCgiEntry::m_Data.

◆ GetValueStream() ◆ HaveContentRange() bool CCgiResponse::HaveContentRange ( void  ) const ◆ HaveHeaderValue() ◆ HaveTrailer() ◆ IncludePreparsedEntries() void CCgiEntryReaderContext::IncludePreparsedEntries ( void  ) ◆ InitCORSHeaders()

This method is called automatically by CCgiContext.

Initialize cross-origin resource sharing (CORS) headers.

Parameters
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.
Deprecated:
Use CCgiContext::ProcessCORSRequest

Definition at line 592 of file ncbicgir.cpp.

◆ IsHeaderWritten() bool CCgiResponse::IsHeaderWritten ( void  ) const inline ◆ IsInvalid() ◆ IsListedHost() ◆ IsRawCgi() bool CCgiResponse::IsRawCgi ( void  ) const inline ◆ NCBI_PARAM_DECL() [1/2] CCgiResponse::NCBI_PARAM_DECL ( bool  , CGI  , ExceptionAfterHEAD    ) private ◆ NCBI_PARAM_DECL() [2/2] CCgiResponse::NCBI_PARAM_DECL ( bool  , CGI  , ThrowOnBadOutput    ) private ◆ NCBI_PARAM_TYPE() [1/2] typedef CCgiResponse::NCBI_PARAM_TYPE ( CGI  , ExceptionAfterHEAD    ) private ◆ NCBI_PARAM_TYPE() [2/2] typedef CCgiResponse::NCBI_PARAM_TYPE ( CGI  , ThrowOnBadOutput    ) private ◆ operator const CTempStringEx() ◆ operator const string &() ◆ operator string &() CCgiEntry::operator string & ( ) inline ◆ operator!=() [1/3] ◆ operator!=() [2/3] ◆ operator!=() [3/3] ◆ operator()() ◆ operator+() [1/2] ◆ operator+() [2/2] ◆ operator<() ◆ operator<<() [1/3] ◆ operator<<() [2/3] ◆ operator<<() [3/3] ◆ operator=() [1/5] ◆ operator=() [2/5] ◆ operator=() [3/5] ◆ operator=() [4/5] ◆ operator=() [5/5] ◆ operator==() [1/3] ◆ operator==() [2/3] bool CCgiEntry::operator== ( const char *  v ) const inline ◆ operator==() [3/3] ◆ out()

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().

◆ ParseEntries()

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().

◆ ParseIndexes() ◆ ParseRemainingContent() void CCgiRequest::ParseRemainingContent ( void  ) ◆ PendingCount() ERW_Result CCgiEntryReader::PendingCount ( size_t *  count ) 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.

◆ Read() ERW_Result CCgiEntryReader::Read ( void *  buf, size_t  count, size_t *  bytes_read  ) 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).

Note
Apparently, may not return eRW_Success if hasn't been able to read "count" bytes as requested, and "bytes_read" was provided as NULL.
When returning "*bytes_read" as zero for a non-zero "count" requested, the return status should not indicate eRW_Success.
Warning
"*bytes_read" may never be returned greater than "count".
Attention
It is implementation-dependent whether the call blocks until the entire buffer is read or the call returns when at least some data are available. In general, it is advised that this call is made within a loop that checks for EOF condition and proceeds with the reading until the required amount of data has been retrieved.

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().

◆ Remove() [1/3] ◆ Remove() [2/3] ◆ Remove() [3/3] ◆ RemoveHeaderValue() void CCgiResponse::RemoveHeaderValue ( const stringname ) ◆ RemoveTrailer() void CCgiResponse::RemoveTrailer ( const stringname ) ◆ RequireWriteHeader() void CCgiResponse::RequireWriteHeader ( bool  require ) inline

Define if WriteHeader() must be called or can be skipped.

Parameters
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().

◆ Reset() void CCgiCookie::Reset ( void  ) ◆ ResetInvalid() ◆ SData() [1/2] ◆ SData() [2/2] ◆ Serialize()

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().

◆ SetAllCookiesHttpOnly() void CCgiCookies::SetAllCookiesHttpOnly ( bool  value ) ◆ SetAllCookiesSecure() void CCgiCookies::SetAllCookiesSecure ( bool  value ) ◆ SetCgiRequest() ◆ SetChunkedTransferEnabled() void CCgiResponse::SetChunkedTransferEnabled ( bool  value ) ◆ SetContentType() [1/3] string& CCgiEntry::SetContentType ( ) inline ◆ SetContentType() [2/3] ◆ SetContentType() [3/3] void CCgiResponse::SetContentType ( const stringtype ) inline

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().

◆ SetDomain() ◆ SetExceptionAfterHEAD() void CCgiResponse::SetExceptionAfterHEAD ( bool  expt_after_head ) ◆ SetExpDate() void CCgiCookie::SetExpDate ( const tm &  exp_date ) inline ◆ SetExpTime() void CCgiCookie::SetExpTime ( const CTimeexp_time ) ◆ SetFilename() [1/3] string& CCgiEntry::SetFilename ( void  ) inline ◆ SetFilename() [2/3] ◆ SetFilename() [3/3] void CCgiResponse::SetFilename ( const stringname, size_t  size = 0  ) ◆ SetHeaderValue() [1/3] ◆ SetHeaderValue() [2/3]

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().

◆ SetHeaderValue() [3/3] void CCgiResponse::SetHeaderValue ( const stringname, const struct tm &  value  ) ◆ SetHttpOnly() void CCgiCookie::SetHttpOnly ( bool  http_only ) inline ◆ SetInputStream() ◆ SetInvalid() ◆ SetLocation() ◆ SetMultipartMode() ◆ SetOutput() ◆ SetPath() ◆ SetPosition() [1/2] unsigned int& CCgiEntry::SetPosition ( void  ) inline ◆ SetPosition() [2/2] void CCgiEntry::SetPosition ( int  p ) inline ◆ SetRawCgi() void CCgiResponse::SetRawCgi ( bool  is_raw ) inline ◆ SetRequestMethod() ◆ SetRetryContext() ◆ SetSecure() [1/2] void CCgiCookie::SetSecure ( bool  secure ) inline ◆ SetSecure() [2/2] void CCgiCookies::SetSecure ( bool  secure ) inline ◆ SetStatus() ◆ SetThrowOnBadOutput() void CCgiResponse::SetThrowOnBadOutput ( bool  throw_on_bad_output ) ◆ SetTrackingCookie() [1/2] void CCgiRequest::SetTrackingCookie ( const stringcookie_value ) inline ◆ SetTrackingCookie() [2/2] ◆ SetTrailerValue() ◆ SetUrlEncodeFlag() void CCgiCookies::SetUrlEncodeFlag ( EUrlEncode  encode_flag ) inline ◆ SetValue() [1/5] string& CCgiEntry::SetValue ( void  ) inline ◆ SetValue() [2/5] ◆ SetValue() [3/5] ◆ SetValue() [4/5] ◆ SetValue() [5/5] void CCgiEntry::SetValue ( IReaderr ) inline ◆ size() ◆ substr() ◆ Write() [1/2] ◆ Write() [2/2]

Compose and write to output stream "os":

Parameters
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<<().

◆ WriteHeader() [1/2]

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().

◆ WriteHeader() [2/2]

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().

◆ x_CheckField() [1/2]

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().

◆ x_CheckField() [2/2] ◆ x_ClientSupportsChunkedTransfer() ◆ x_DelimitedRead()

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().

◆ x_EncodeCookie() ◆ x_FillBuffer() void CCgiEntryReader::x_FillBuffer ( SIZE_TYPE  count ) 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().

◆ x_Flush() void CCgiEntryReader::x_Flush ( void  ) inlineprivate ◆ x_FlushCurrentEntry() void CCgiEntryReaderContext::x_FlushCurrentEntry ( void  ) private ◆ x_ForceComplete() void CCgiEntry::x_ForceComplete ( ) const inlineprivate ◆ x_ForceUnique() void CCgiEntry::x_ForceUnique ( ) inlineprivate ◆ x_GetCharset() string CCgiEntry::x_GetCharset ( void  ) const private ◆ x_GetPropertyByName() ◆ x_GetString() ◆ x_HitBoundary() void CCgiEntryReader::x_HitBoundary ( bool  final ) private ◆ x_Init()

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().

◆ x_InitRequestContext() void CCgiRequest::x_InitRequestContext ( TFlags  flags ) 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().

◆ x_ProcessInputStream()

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().

◆ x_ProcessQueryString()

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().

◆ x_ReadMultipartHeaders() void CCgiEntryReaderContext::x_ReadMultipartHeaders ( stringname, stringfilename, stringcontent_type  ) 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().

◆ x_ReadURLEncodedEntry() void CCgiEntryReaderContext::x_ReadURLEncodedEntry ( stringname, stringvalue  ) private

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().

◆ x_RestoreOutputExceptions() void CCgiResponse::x_RestoreOutputExceptions ( void  ) private ◆ x_RetrieveSessionId() string CCgiRequest::x_RetrieveSessionId ( ) const private ◆ x_SetClientIpProperty() void CCgiRequest::x_SetClientIpProperty ( TFlags  flags ) const private ◆ x_SetSession() [1/2] void CCgiRequest::x_SetSession ( CCgiSessionsession ) inline ◆ x_SetSession() [2/2] ◆ x_ValidateHeader() ◆ ~CCgiCookies() CCgiCookies::~CCgiCookies ( void  ) inline ◆ ~CCgiEntryReader() CCgiEntryReader::~CCgiEntryReader ( ) private ◆ ~CCgiEntryReaderContext() CCgiEntryReaderContext::~CCgiEntryReaderContext ( ) ◆ ~CCgiRequest() CCgiRequest::~CCgiRequest ( void  ) ◆ ~CCgiResponse() CCgiResponse::~CCgiResponse ( void  ) ◆ ~CEntryCollector_Base() virtual CEntryCollector_Base::~CEntryCollector_Base ( void  ) inlinevirtual

Definition at line 652 of file ncbicgi.hpp.

◆ ~CExtraEntryCollector() CExtraEntryCollector::~CExtraEntryCollector ( void  ) inlineoverride

Definition at line 663 of file ncbicgi.hpp.

◆ ~CRefArgs() CRefArgs::~CRefArgs ( void  )

Definition at line 66 of file ref_args.cpp.

◆ CGI ◆ kContentLengthUnknown const size_t CCgiRequest::kContentLengthUnknown = (size_t)(-1) static ◆ m_AllHttpOnly bool CCgiCookies::m_AllHttpOnly private ◆ m_AllSecure bool CCgiCookies::m_AllSecure private ◆ m_Args ◆ m_BetweenParts bool CCgiResponse::m_BetweenParts protected ◆ m_Boundary [1/2] string CCgiEntryReaderContext::m_Boundary private ◆ m_Boundary [2/2] string CCgiResponse::m_Boundary protected ◆ m_Buffer string CCgiEntryReader::m_Buffer private ◆ m_BytePos ◆ m_ChunkedTransfer bool CCgiResponse::m_ChunkedTransfer private ◆ m_Content unique_ptr<string> CCgiRequest::m_Content private ◆ m_ContentLength size_t CCgiEntryReaderContext::m_ContentLength private ◆ m_ContentLog string* CCgiEntryReaderContext::m_ContentLog private ◆ m_ContentType [1/2] ◆ m_ContentType [2/2] ◆ m_ContentTypeDeclared bool CCgiEntryReaderContext::m_ContentTypeDeclared private ◆ m_Context ◆ m_Cookies [1/3] TSet CCgiCookies::m_Cookies private ◆ m_Cookies [2/3] ◆ m_Cookies [3/3] ◆ m_CurrentEntry CCgiEntry* CCgiEntryReaderContext::m_CurrentEntry private ◆ m_CurrentReader TReader* CCgiEntryReaderContext::m_CurrentReader private ◆ m_Data

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().

◆ m_DisableTrackingCookie bool CCgiResponse::m_DisableTrackingCookie private ◆ m_Domain ◆ m_EncodeFlag ◆ m_Entries ◆ m_EntryReaderContext ◆ m_Env ◆ m_ErrBufSize size_t CCgiRequest::m_ErrBufSize 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.

◆ m_ExceptionAfterHEAD TCGI_ExceptionAfterHEAD CCgiResponse::m_ExceptionAfterHEAD private ◆ m_Expires ◆ m_Filename ◆ m_HeaderValues TMap CCgiResponse::m_HeaderValues protected ◆ m_HeaderWritten bool CCgiResponse::m_HeaderWritten mutableprotected ◆ m_HostMap ◆ m_HttpOnly bool CCgiCookie::m_HttpOnly private ◆ m_In ◆ m_Indexes ◆ m_Input ◆ m_InputFD int CCgiRequest::m_InputFD private ◆ m_InvalidFlag ◆ m_IsMultipart ◆ m_IsRawCgi bool CCgiResponse::m_IsRawCgi protected ◆ m_JQuery_Callback string CCgiResponse::m_JQuery_Callback private ◆ m_Name ◆ m_Out ◆ m_OutIter ◆ m_OutIterated bool CCgiEntryReaderContext::m_OutIterated private ◆ m_Output ◆ m_OutputExpt CNcbiOstream::iostate CCgiResponse::m_OutputExpt protected ◆ m_OutputFD int CCgiResponse::m_OutputFD protected ◆ m_OwnEnv ◆ m_OwnInput bool CCgiRequest::m_OwnInput private ◆ m_Path ◆ m_Position [1/2] unsigned int CCgiEntryReaderContext::m_Position private ◆ m_Position [2/2] unsigned int CCgiEntry::SData::m_Position

Definition at line 437 of file ncbicgi.hpp.

◆ m_QueryStringParsed bool CCgiRequest::m_QueryStringParsed private ◆ m_Reader ◆ m_Request ◆ m_RequestMethod ◆ m_RequireWriteHeader bool CCgiResponse::m_RequireWriteHeader protected ◆ m_Secure [1/2] bool CCgiCookie::m_Secure private ◆ m_Secure [2/2] bool CCgiCookies::m_Secure private ◆ m_Session [1/2] ◆ m_Session [2/2] ◆ m_State TState CCgiEntryReader::m_State private ◆ m_ThrowOnBadOutput TCGI_ThrowOnBadOutput CCgiResponse::m_ThrowOnBadOutput private ◆ m_TrackingCookie [1/2] string CCgiRequest::m_TrackingCookie private ◆ m_TrackingCookie [2/2] unique_ptr<CCgiCookie> CCgiResponse::m_TrackingCookie private ◆ m_TrackingEnvHolder ◆ m_TrailerEnabled unique_ptr<bool> CCgiResponse::m_TrailerEnabled mutableprivate ◆ m_TrailerValues TMap CCgiResponse::m_TrailerValues protected ◆ m_Value [1/2] ◆ m_Value [2/2] ◆ 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 ◆ sm_AcceptRanges const char * CCgiResponse::sm_AcceptRanges = "Accept-Ranges" staticprotected ◆ sm_AcceptRangesBytes const char * CCgiResponse::sm_AcceptRangesBytes = "bytes" staticprotected ◆ sm_BoundaryPrefix const char * CCgiResponse::sm_BoundaryPrefix = "NCBI_CGI_Boundary_" staticprotected ◆ sm_CacheControl const char * CCgiResponse::sm_CacheControl = "Cache-Control" staticprotected ◆ sm_ContentDispoName const char * CCgiResponse::sm_ContentDispoName = "Content-Disposition" staticprotected ◆ sm_ContentRange const char * CCgiResponse::sm_ContentRange = "Content-Range" staticprotected ◆ sm_ContentTypeDefault const char * CCgiResponse::sm_ContentTypeDefault = "text/html" staticprotected ◆ sm_ContentTypeMixed const char * CCgiResponse::sm_ContentTypeMixed = "multipart/mixed" staticprotected ◆ sm_ContentTypeName const char * CCgiResponse::sm_ContentTypeName = "Content-Type" staticprotected ◆ sm_ContentTypeRelated const char * CCgiResponse::sm_ContentTypeRelated = "multipart/related" staticprotected ◆ sm_ContentTypeXMR const char * CCgiResponse::sm_ContentTypeXMR = "multipart/x-mixed-replace" staticprotected ◆ sm_FilenamePrefix const char * CCgiResponse::sm_FilenamePrefix = "attachment; filename=\"" staticprotected ◆ sm_HTTPStatusDefault const char * CCgiResponse::sm_HTTPStatusDefault = "200 OK" staticprotected ◆ sm_HTTPStatusName const char * CCgiResponse::sm_HTTPStatusName = "Status" staticprotected ◆ sm_LocationName const char * CCgiResponse::sm_LocationName = "Location" staticprotected ◆ CCgiApplication ◆ CCgiContext ◆ CCgiCookies ◆ CCgiEntryReader ◆ CCgiEntryReaderContext

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4