24#ifndef _CGIENVIRONMENT_H_
25#define _CGIENVIRONMENT_H_ 1
52 template class CGICC_API std::vector<HTTPCookie>;
145 {
return ! operator==(env); }
180 {
return fServerSoftware; }
190 {
return fServerName; }
200 {
return fGatewayInterface;}
210 {
return fServerProtocol; }
220 {
return fServerPort; }
230 {
return fUsingHTTPS; }
262 inline const std::vector<HTTPCookie>&
274 {
return fRequestMethod; }
286 {
return fPathInfo; }
296 {
return fPathTranslated; }
306 {
return fScriptName; }
319 {
return fQueryString; }
329 {
return fContentLength; }
344 {
return fContentType; }
354 {
return fPostData; }
372 {
return fReferrer; }
390 {
return fRemoteHost; }
400 {
return fRemoteAddr; }
411 {
return fAuthType; }
422 {
return fRemoteUser; }
436 {
return fRemoteIdent; }
457 {
return fUserAgent; }
477 {
return fRedirectRequest; }
489 {
return fRedirectURL; }
500 {
return fRedirectStatus; }
519 save(
const std::string& filename)
const;
542 parseCookie(
const std::string& data);
546 readEnvironmentVariables(
CgiInput *input);
548 unsigned long fServerPort;
549 unsigned long fContentLength;
551 std::string fServerSoftware;
552 std::string fServerName;
553 std::string fGatewayInterface;
554 std::string fServerProtocol;
555 std::string fRequestMethod;
556 std::string fPathInfo;
557 std::string fPathTranslated;
558 std::string fScriptName;
559 std::string fQueryString;
560 std::string fRemoteHost;
561 std::string fRemoteAddr;
562 std::string fAuthType;
563 std::string fRemoteUser;
564 std::string fRemoteIdent;
565 std::string fContentType;
567 std::string fUserAgent;
568 std::string fPostData;
569 std::string fRedirectRequest;
570 std::string fRedirectURL;
571 std::string fRedirectStatus;
572 std::string fReferrer;
574 std::vector<HTTPCookie> fCookies;
575 std::string fAcceptLanguageString;
Platform and operating system specific macro definitions.
A collection of utility functions.
Class encapsulating the CGI runtime environment.
std::string getCookies() const
Get the HTTP cookies associated with this query, if any.
std::string getRemoteIdent() const
Get the remote user name retrieved from the server.
std::string getAccept() const
Get the MIME data types accepted by the client's browser.
const std::vector< HTTPCookie > & getCookieList() const
Get a vector containing the HTTP cookies associated with this query.
std::string getReferrer() const
Get the URL of the page which called this CGI application.
std::string getScriptName() const
Get the full path to this CGI application.
std::string getRemoteAddr() const
Get the IP address of the remote machine making this request.
std::string getServerProtocol() const
Get the name and revision of the protocol used for this request.
CgiEnvironment(const CgiEnvironment &env)
Copy constructor.
bool usingHTTPS() const
Determine if this is a secure request.
void save(const std::string &filename) const
Implementation of save, for saving CGI environments.
std::string getRedirectRequest() const
Get the redirect request.
std::string getAuthType() const
Get the protocol-specific user authentication method used.
std::string getQueryString() const
Get the query string for this request.
std::string getPathTranslated() const
Get the translated path information (virtual to physical mapping).
void restore(const std::string &filename)
Implementation of restore, for restoring CGI environments.
std::string getPostData() const
Get the data passed to the CGI application via standard input.
~CgiEnvironment()
Destructor.
std::string getServerName() const
Get the hostname, DNS name or IP address of the HTTP server.
std::string getRemoteHost() const
Get the hostname of the remote machine making this request.
std::string getServerSoftware() const
Get the name and version of the HTTP server software.
std::string getRedirectStatus() const
Get the redirect status.
unsigned long getServerPort() const
Get the port number on the server to which this request was sent.
std::string getPathInfo() const
Get the extra path information for this request, given by the client.
std::string getRemoteUser() const
Get the authenticated remote user name.
std::string getContentType() const
Get the content type of the submitted information.
std::string getUserAgent() const
Get the name of the browser used for this CGI request.
std::string getRequestMethod() const
Get the request method used for this query.
unsigned long getContentLength() const
Get the length of the data read from standard input, in chars.
std::string getRedirectURL() const
Get the redirect URL.
CgiEnvironment(CgiInput *input)
Read in the CGI environment passed to the CGI application by the server.
std::string getGatewayInterface() const
Get the name and version of the gateway interface.
The main class of the GNU cgicc library.
The namespace containing the cgicc library.
std::vector< HTTPCookie >::const_iterator const_cookie_iterator
A vector of const HTTPCookie objects.
std::vector< HTTPCookie >::iterator cookie_iterator
A vector of HTTPCookie objects.