extra.
Print(
"deployment_uid", deployment_uid);
45unique_ptr<CHTMLPage> page;
47page.reset(
new CHTMLPage(
"Sample CGI",
"./share/deployable_cgi_env.html"));
48}
catch(
constexception& e) {
49 ERR_POST(
"Failed to create Sample CGI HTML page: "<< e.what());
56 env->HeaderCell(0,0)->AppendPlainText(
"Name");
57 env->HeaderCell(0,1)->AppendPlainText(
"Value");
62 for(
autoname :
names) {
63 env->Cell(
row,0)->AppendPlainText(name);
67page->AddTagMap(
"ENVIRONMENT",
env);
69 catch(
constexception& e) {
70 ERR_POST(
"Failed to populate Sample CGI HTML page: "<< e.what());
79 ERR_POST(
"CCgiHeadException"<< ex.what());
81}
catch(
constexception& e) {
82 ERR_POST(
"exception: "<< e.what());
83 ERR_POST(
"Failed to compose/send Sample CGI HTML page: "<< e.what());
104 if( path_info ==
"environment") {
106}
else if(path_info==
"crash") {
111 #ifdef NEED_SET_DEPLOYMENT_UID 115extra.Print(
"deployment_uid", deployment_uid);
122 boolis_message =
false;
123 stringmessage = request.
GetEntry(
"Message", &is_message);
125message =
"'"+ message +
"'";
137unique_ptr<CHTMLPage> page;
139page.reset(
new CHTMLPage(
"Sample CGI",
"./share/deployable_cgi.html"));
140}
catch(
constexception& e) {
141 ERR_POST(
"Failed to create Sample CGI HTML page: "<< e.what());
145 #ifdef NEED_SET_DEPLOYMENT_UID 147page->AddTagMap(
"DEPUID", depuid_text);
152 _TRACE(
"Substituting templates");
155page->AddTagMap(
"TITLE",
new CHTMLPlainText(
"C++ SVN CGI Sample"));
158 catch(
constexception& e) {
159 ERR_POST(
"Failed to populate Sample CGI HTML page: "<< e.what());
165 _TRACE(
"stream status: "<<
ctx.GetStreamStatus());
167 _TRACE(
"printing response");
169 _TRACE(
"done printing response");
172 ERR_POST(
"CCgiHeadException"<< ex.what());
174}
catch(
constexception& e) {
175 ERR_POST(
"exception: "<< e.what());
176 ERR_POST(
"Failed to compose/send Sample CGI HTML page: "<< e.what());
180 _TRACE(
"End of execution");
int ProcessPrintEnvironment(ncbi::CCgiContext &ctx)
const std::string GetCdVersion() const
virtual int ProcessRequest(CCgiContext &ctx)
This is the method you should override.
static const struct name_t names[]
const CNcbiEnvironment & GetEnvironment(void) const
Get the application's cached environment.
CNcbiOstream & out(void) const
Get output stream. Throw exception if GetOutput() is NULL.
void SetStatus(unsigned int code, const string &reason=kEmptyStr)
const string & GetProperty(ECgiProp prop) const
Get value of a "standard" property (return empty string if not defined)
CNcbiOstream & WriteHeader(void) const
Write HTTP response header to the output stream.
const CCgiEntry & GetEntry(const string &name, bool *is_found=0) const
Get entry value by name.
ERequestMethod GetRequestMethod(void) const
Get request method.
CDiagContext_Extra & Print(const string &name, const string &value)
The method does not print the argument, but adds it to the string.
CDiagContext & GetDiagContext(void)
Get diag context instance.
CDiagContext_Extra Extra(void) const
Create a temporary CDiagContext_Extra object.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
const string & Get(const string &name, bool *found=NULL) const
Get environment value by name.
void Enumerate(list< string > &names, const string &prefix=kEmptyStr) const
Find all variable names starting with an optional prefix.
static void TrimSuffixInPlace(string &str, const CTempString suffix, ECase use_case=eCase)
Trim suffix from a string (in-place)
static void TrimPrefixInPlace(string &str, const CTempString prefix, ECase use_case=eCase)
Trim prefix from a string (in-place)
const TYPE & Get(const CNamedParameterList *param)
const string version
version string
static const char * CD_VERSION_ENV
static const char * CD_VERSION_UNKNOWN
#define row(bind, expected)
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