8 #ifndef CPPCMS_HTTP_REQUEST_H
9 #define CPPCMS_HTTP_REQUEST_H
11 #include <cppcms/defs.h>
12 #include <booster/noncopyable.h>
13 #include <booster/hold_ptr.h>
14 #include <booster/shared_ptr.h>
15 #include <cppcms/http_content_type.h>
23 namespace impl {
namespace cgi {
class connection; } }
42 std::string auth_type();
46 unsigned long long content_length();
58 std::string gateway_interface();
62 std::string path_info();
66 std::string path_translated();
70 std::string query_string();
74 std::string remote_addr();
78 std::string remote_host();
82 std::string remote_ident();
86 std::string remote_user();
90 std::string request_method();
94 std::string script_name();
98 std::string server_name();
102 unsigned server_port();
106 std::string server_protocol();
110 std::string server_software();
117 std::string http_accept();
121 std::string http_accept_charset();
125 std::string http_accept_encoding();
129 std::string http_accept_language();
133 std::string http_accept_ranges();
137 std::string http_authorization();
141 std::string http_cache_control();
145 std::string http_connection();
149 std::string http_cookie();
153 std::string http_expect();
157 std::string http_form();
161 std::string http_host();
165 std::string http_if_match();
169 std::string http_if_none_match();
176 std::pair<bool,unsigned> http_max_forwards();
180 std::string http_pragma();
184 std::string http_proxy_authorization();
188 std::string http_range();
192 std::string http_referer();
196 std::string http_te();
200 std::string http_upgrade();
204 std::string http_user_agent();
208 std::string http_via();
212 std::string http_warn();
217 std::string getenv(std::string
const &);
221 std::string getenv(
char const *);
225 char const *cgetenv(
char const *);
229 std::map<std::string,std::string> getenv();
235 typedef std::multimap<std::string,std::string>
form_type;
253 cookie const &cookie_by_name(std::string
const &name);
258 std::string
get(std::string
const &name);
263 std::string post(std::string
const &name);
291 std::pair<void *,size_t> raw_post_data();
295 request(impl::cgi::connection &);
300 friend class impl::cgi::connection;
302 void set_post_data(std::vector<char> &post_data);
306 bool parse_cookies();
307 std::string urlencoded_decode(
char const *,
char const *);
308 bool parse_form_urlencoded(
char const *begin,
char const *end,
form_type &out);
310 std::string::const_iterator &p,
311 std::string::const_iterator e,
322 impl::cgi::connection *conn_;
std::vector< booster::shared_ptr< file > > files_type
Definition: http_request.h:244
Class that represents parsed Content-Type header, this is immutable class. Once it is created its val...
Definition: http_content_type.h:23
Class that represents single HTTP Cookie Generally used in context of http::request and http::respons...
Definition: http_cookie.h:27
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15
std::multimap< std::string, std::string > form_type
Definition: http_request.h:235
std::map< std::string, cookie > cookies_type
Definition: http_request.h:239
This class represents all information related to the HTTP/CGI request.
Definition: http_request.h:34