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; } }
30 class basic_content_filter;
45 std::string auth_type();
49 unsigned long long content_length();
61 std::string gateway_interface();
65 std::string path_info();
69 std::string path_translated();
73 std::string query_string();
77 std::string remote_addr();
81 std::string remote_host();
85 std::string remote_ident();
89 std::string remote_user();
93 std::string request_method();
97 std::string script_name();
101 std::string server_name();
105 unsigned server_port();
109 std::string server_protocol();
113 std::string server_software();
120 std::string http_accept();
124 std::string http_accept_charset();
128 std::string http_accept_encoding();
132 std::string http_accept_language();
136 std::string http_accept_ranges();
140 std::string http_authorization();
144 std::string http_cache_control();
148 std::string http_connection();
152 std::string http_cookie();
156 std::string http_expect();
160 std::string http_form();
164 std::string http_host();
168 std::string http_if_match();
172 std::string http_if_none_match();
179 std::pair<bool,unsigned> http_max_forwards();
183 std::string http_pragma();
187 std::string http_proxy_authorization();
191 std::string http_range();
195 std::string http_referer();
199 std::string http_te();
203 std::string http_upgrade();
207 std::string http_user_agent();
211 std::string http_via();
215 std::string http_warn();
220 std::string getenv(std::string
const &);
224 std::string getenv(
char const *);
228 char const *cgetenv(
char const *);
232 std::map<std::string,std::string> getenv();
238 typedef std::multimap<std::string,std::string>
form_type;
252 cookies_type
const &cookies();
256 cookie const &cookie_by_name(std::string
const &name);
261 std::string
get(std::string
const &name);
266 std::string post(std::string
const &name);
270 form_type
const &
get();
274 form_type
const &post();
278 form_type
const &post_or_get();
294 std::pair<void *,size_t> raw_post_data();
335 void setbuf(
int size);
338 request(impl::cgi::connection &);
343 friend class impl::cgi::connection;
347 int on_content_start();
349 int on_content_progress(
size_t n);
350 std::pair<char *,size_t > get_buffer();
352 bool size_ok(
file &f,
long long size);
354 std::pair<char *,size_t> get_content_buffer();
356 bool parse_cookies();
357 std::string urlencoded_decode(
char const *,
char const *);
358 bool parse_form_urlencoded(
char const *begin,
char const *end,form_type &out);
360 std::string::const_iterator &p,
361 std::string::const_iterator e,
369 cookies_type cookies_;
372 impl::cgi::connection *conn_;
std::vector< booster::shared_ptr< file > > files_type
Definition: http_request.h:247
Class that represents parsed Content-Type header, this is immutable class. Once it is created its val...
Definition: http_content_type.h:23
This is the namespace where all CppCMS functionality is placed.
Definition: application.h:19
context is a central class that holds all specific connection related information. It encapsulates CGI request and response, cache, session and locale information
Definition: http_context.h:47
Definition: http_content_filter.h:127
This class holds a uploaded file, it is generally fetched via widgets::file or via http::request::fil...
Definition: http_file.h:38
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:238
std::map< std::string, cookie > cookies_type
Definition: http_request.h:242
Definition: http_content_filter.h:52
This class represents all information related to the HTTP/CGI request.
Definition: http_request.h:37