|
| | request (const std::string &resource) |
| |
| | request (void) |
| | constructs a new request object (default constructor) More...
|
| |
| virtual | ~request () |
| | virtual destructor More...
|
| |
| virtual void | clear (void) |
| | clears all request data More...
|
| |
| virtual bool | is_content_length_implied (void) const |
| | the content length of the message can never be implied for requests More...
|
| |
| const std::string & | get_method (void) const |
| | returns the request method (i.e. GET, POST, PUT) More...
|
| |
| const std::string & | get_resource (void) const |
| | returns the resource uri-stem to be delivered (possibly the result of a redirect) More...
|
| |
| const std::string & | get_original_resource (void) const |
| | returns the resource uri-stem originally requested More...
|
| |
| const std::string & | get_query_string (void) const |
| | returns the uri-query or query string requested More...
|
| |
| const std::string & | get_query (const std::string &key) const |
| | returns a value for the query key if any are defined; otherwise, an empty string More...
|
| |
| ihash_multimap & | get_queries (void) |
| | returns the query parameters More...
|
| |
| bool | has_query (const std::string &key) const |
| | returns true if at least one value for the query key is defined More...
|
| |
| void | set_method (const std::string &str) |
| | sets the HTTP request method (i.e. GET, POST, PUT) More...
|
| |
| void | set_resource (const std::string &str) |
| | sets the resource or uri-stem originally requested More...
|
| |
| void | change_resource (const std::string &str) |
| | changes the resource or uri-stem to be delivered (called as the result of a redirect) More...
|
| |
| void | set_query_string (const std::string &str) |
| | sets the uri-query or query string requested More...
|
| |
| void | add_query (const std::string &key, const std::string &value) |
| | adds a value for the query key More...
|
| |
| void | change_query (const std::string &key, const std::string &value) |
| | changes the value of a query key More...
|
| |
| void | delete_query (const std::string &key) |
| | removes all values for a query key More...
|
| |
| void | use_query_params_for_query_string (void) |
| | use the query parameters to build a query string for the request More...
|
| |
| void | use_query_params_for_post_content (void) |
| | use the query parameters to build POST content for the request More...
|
| |
| void | set_content (const std::string &value) |
| | add content (for POST) from string More...
|
| |
| void | set_content (const char *value, size_t size) |
| |
| void | set_user (user_ptr user) |
| | sets the user record for HTTP request after authentication More...
|
| |
| user_ptr | get_user () const |
| | get the user record for HTTP request after authentication More...
|
| |
| | message (void) |
| | constructs a new HTTP message object More...
|
| |
| | message (const message &http_msg) |
| | copy constructor More...
|
| |
| message & | operator= (const message &http_msg) |
| | assignment operator More...
|
| |
| virtual | ~message () |
| | virtual destructor More...
|
| |
| bool | is_valid (void) const |
| | returns true if the message is valid More...
|
| |
| bool | get_chunks_supported (void) const |
| | returns true if chunked transfer encodings are supported More...
|
| |
| boost::asio::ip::address & | get_remote_ip (void) |
| | returns IP address of the remote endpoint More...
|
| |
| boost::uint16_t | get_version_major (void) const |
| | returns the major HTTP version number More...
|
| |
| boost::uint16_t | get_version_minor (void) const |
| | returns the minor HTTP version number More...
|
| |
| std::string | get_version_string (void) const |
| | returns a string representation of the HTTP version (i.e. "HTTP/1.1") More...
|
| |
| size_t | get_content_length (void) const |
| | returns the length of the payload content (in bytes) More...
|
| |
| bool | is_chunked (void) const |
| | returns true if the message content is chunked More...
|
| |
| bool | is_content_buffer_allocated () const |
| | returns true if buffer for content is allocated More...
|
| |
| std::size_t | get_content_buffer_size () const |
| | returns size of allocated buffer More...
|
| |
| char * | get_content (void) |
| | returns a pointer to the payload content, or empty string if there is none More...
|
| |
| const char * | get_content (void) const |
| | returns a const pointer to the payload content, or empty string if there is none More...
|
| |
| chunk_cache_t & | get_chunk_cache (void) |
| | returns a reference to the chunk cache More...
|
| |
| const std::string & | get_header (const std::string &key) const |
| | returns a value for the header if any are defined; otherwise, an empty string More...
|
| |
| ihash_multimap & | get_headers (void) |
| | returns a reference to the HTTP headers More...
|
| |
| bool | has_header (const std::string &key) const |
| | returns true if at least one value for the header is defined More...
|
| |
| const std::string & | get_cookie (const std::string &key) const |
| |
| ihash_multimap & | get_cookies (void) |
| | returns the cookie parameters More...
|
| |
| bool | has_cookie (const std::string &key) const |
| |
| void | add_cookie (const std::string &key, const std::string &value) |
| |
| void | change_cookie (const std::string &key, const std::string &value) |
| |
| void | delete_cookie (const std::string &key) |
| |
| const std::string & | get_first_line (void) const |
| | returns a string containing the first line for the HTTP message More...
|
| |
| bool | has_missing_packets () const |
| | true if there were missing packets More...
|
| |
| void | set_missing_packets (bool newVal) |
| | set to true when missing packets detected More...
|
| |
| bool | has_data_after_missing_packets () const |
| | true if more data seen after the missing packets More...
|
| |
| void | set_data_after_missing_packet (bool newVal) |
| |
| void | set_is_valid (bool b=true) |
| | sets whether or not the message is valid More...
|
| |
| void | set_chunks_supported (bool b) |
| | set to true if chunked transfer encodings are supported More...
|
| |
| void | set_remote_ip (const boost::asio::ip::address &ip) |
| | sets IP address of the remote endpoint More...
|
| |
| void | set_version_major (const boost::uint16_t n) |
| | sets the major HTTP version number More...
|
| |
| void | set_version_minor (const boost::uint16_t n) |
| | sets the minor HTTP version number More...
|
| |
| void | set_content_length (size_t n) |
| | sets the length of the payload content (in bytes) More...
|
| |
| void | set_do_not_send_content_length (void) |
| | if called, the content-length will not be sent in the HTTP headers More...
|
| |
| data_status_t | get_status () const |
| | return the data receival status More...
|
| |
| void | set_status (data_status_t newVal) |
| |
| void | update_content_length_using_header (void) |
| | sets the length of the payload content using the Content-Length header More...
|
| |
| void | update_transfer_encoding_using_header (void) |
| | sets the transfer coding using the Transfer-Encoding header More...
|
| |
| char * | create_content_buffer (void) |
| |
| void | set_content (const std::string &content) |
| | resets payload content to match the value of a string More...
|
| |
| void | clear_content (void) |
| | clears payload content buffer More...
|
| |
| void | set_content_type (const std::string &type) |
| | sets the content type for the message payload More...
|
| |
| void | add_header (const std::string &key, const std::string &value) |
| | adds a value for the HTTP header named key More...
|
| |
| void | change_header (const std::string &key, const std::string &value) |
| | changes the value for the HTTP header named key More...
|
| |
| void | delete_header (const std::string &key) |
| | removes all values for the HTTP header named key More...
|
| |
| bool | check_keep_alive (void) const |
| | returns true if the HTTP connection may be kept alive More...
|
| |
| void | prepare_buffers_for_send (write_buffers_t &write_buffers, const bool keep_alive, const bool using_chunks) |
| |
| std::size_t | send (tcp::connection &tcp_conn, boost::system::error_code &ec, bool headers_only=false) |
| |
| std::size_t | receive (tcp::connection &tcp_conn, boost::system::error_code &ec, parser &http_parser) |
| |
| std::size_t | receive (tcp::connection &tcp_conn, boost::system::error_code &ec, bool headers_only=false, std::size_t max_content_length=static_cast< size_t >(-1)) |
| |
| std::size_t | write (std::ostream &out, boost::system::error_code &ec, bool headers_only=false) |
| |
| std::size_t | read (std::istream &in, boost::system::error_code &ec, parser &http_parser) |
| |
| std::size_t | read (std::istream &in, boost::system::error_code &ec, bool headers_only=false, std::size_t max_content_length=static_cast< size_t >(-1)) |
| |
| void | concatenate_chunks (void) |
| |
| virtual | ~types () |
| | virtual destructor More...
|
| |
|
| enum | data_status_t { STATUS_NONE,
STATUS_TRUNCATED,
STATUS_PARTIAL,
STATUS_OK
} |
| | defines message data integrity status codes More...
|
| |
typedef std::vector
< boost::asio::const_buffer > | write_buffers_t |
| | data type for I/O write buffers (these wrap existing data to be sent) More...
|
| |
| typedef std::vector< char > | chunk_cache_t |
| | used to cache chunked data More...
|
| |
| static std::string | get_date_string (const time_t t) |
| | converts time_t format into an HTTP-date string More...
|
| |
| static std::string | make_query_string (const ihash_multimap &query_params) |
| | builds an HTTP query string from a collection of query parameters More...
|
| |
| static std::string | make_set_cookie_header (const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0) |
| |
| static const std::string | STRING_EMPTY |
| |
| static const std::string | STRING_CRLF |
| |
| static const std::string | STRING_HTTP_VERSION |
| |
| static const std::string | HEADER_NAME_VALUE_DELIMITER |
| |
| static const std::string | COOKIE_NAME_VALUE_DELIMITER |
| |
| static const std::string | HEADER_HOST |
| |
| static const std::string | HEADER_COOKIE |
| |
| static const std::string | HEADER_SET_COOKIE |
| |
| static const std::string | HEADER_CONNECTION |
| |
| static const std::string | HEADER_CONTENT_TYPE |
| |
| static const std::string | HEADER_CONTENT_LENGTH |
| |
| static const std::string | HEADER_CONTENT_LOCATION |
| |
| static const std::string | HEADER_CONTENT_ENCODING |
| |
| static const std::string | HEADER_CONTENT_DISPOSITION |
| |
| static const std::string | HEADER_LAST_MODIFIED |
| |
| static const std::string | HEADER_IF_MODIFIED_SINCE |
| |
| static const std::string | HEADER_TRANSFER_ENCODING |
| |
| static const std::string | HEADER_LOCATION |
| |
| static const std::string | HEADER_AUTHORIZATION |
| |
| static const std::string | HEADER_REFERER |
| |
| static const std::string | HEADER_USER_AGENT |
| |
| static const std::string | HEADER_X_FORWARDED_FOR |
| |
| static const std::string | HEADER_CLIENT_IP |
| |
| static const std::string | CONTENT_TYPE_HTML |
| |
| static const std::string | CONTENT_TYPE_TEXT |
| |
| static const std::string | CONTENT_TYPE_XML |
| |
| static const std::string | CONTENT_TYPE_URLENCODED |
| |
| static const std::string | CONTENT_TYPE_MULTIPART_FORM_DATA |
| |
| static const std::string | REQUEST_METHOD_HEAD |
| |
| static const std::string | REQUEST_METHOD_GET |
| |
| static const std::string | REQUEST_METHOD_PUT |
| |
| static const std::string | REQUEST_METHOD_POST |
| |
| static const std::string | REQUEST_METHOD_DELETE |
| |
| static const std::string | RESPONSE_MESSAGE_OK |
| |
| static const std::string | RESPONSE_MESSAGE_CREATED |
| |
| static const std::string | RESPONSE_MESSAGE_ACCEPTED |
| |
| static const std::string | RESPONSE_MESSAGE_NO_CONTENT |
| |
| static const std::string | RESPONSE_MESSAGE_FOUND |
| |
| static const std::string | RESPONSE_MESSAGE_UNAUTHORIZED |
| |
| static const std::string | RESPONSE_MESSAGE_FORBIDDEN |
| |
| static const std::string | RESPONSE_MESSAGE_NOT_FOUND |
| |
| static const std::string | RESPONSE_MESSAGE_METHOD_NOT_ALLOWED |
| |
| static const std::string | RESPONSE_MESSAGE_NOT_MODIFIED |
| |
| static const std::string | RESPONSE_MESSAGE_BAD_REQUEST |
| |
| static const std::string | RESPONSE_MESSAGE_SERVER_ERROR |
| |
| static const std::string | RESPONSE_MESSAGE_NOT_IMPLEMENTED |
| |
| static const std::string | RESPONSE_MESSAGE_CONTINUE |
| |
| static const unsigned int | RESPONSE_CODE_OK = 200 |
| |
| static const unsigned int | RESPONSE_CODE_CREATED = 201 |
| |
| static const unsigned int | RESPONSE_CODE_ACCEPTED = 202 |
| |
| static const unsigned int | RESPONSE_CODE_NO_CONTENT = 204 |
| |
| static const unsigned int | RESPONSE_CODE_FOUND = 302 |
| |
| static const unsigned int | RESPONSE_CODE_UNAUTHORIZED = 401 |
| |
| static const unsigned int | RESPONSE_CODE_FORBIDDEN = 403 |
| |
| static const unsigned int | RESPONSE_CODE_NOT_FOUND = 404 |
| |
| static const unsigned int | RESPONSE_CODE_METHOD_NOT_ALLOWED = 405 |
| |
| static const unsigned int | RESPONSE_CODE_NOT_MODIFIED = 304 |
| |
| static const unsigned int | RESPONSE_CODE_BAD_REQUEST = 400 |
| |
| static const unsigned int | RESPONSE_CODE_SERVER_ERROR = 500 |
| |
| static const unsigned int | RESPONSE_CODE_NOT_IMPLEMENTED = 501 |
| |
| static const unsigned int | RESPONSE_CODE_CONTINUE = 100 |
| |
| template<typename DictionaryType > |
| static const std::string & | get_value (const DictionaryType &dict, const std::string &key) |
| |
| template<typename DictionaryType > |
| static void | change_value (DictionaryType &dict, const std::string &key, const std::string &value) |
| |
| template<typename DictionaryType > |
| static void | delete_value (DictionaryType &dict, const std::string &key) |
| |
| std::string | m_first_line |
| |
request: container for HTTP request information