NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
websocketpp::http Namespace Reference

HTTP handling support. More...

Namespaces

 parser
 
 status_code
 HTTP Status codes.
 

Classes

class  exception
 

Typedefs

typedef std::map< std::string, std::string > attribute_list
 The type of an HTTP attribute list. More...
 
typedef std::vector< std::pair< std::string, attribute_list > > parameter_list
 The type of an HTTP parameter list. More...
 

Functions

bool is_token_char (unsigned char c)
 Is the character a token. More...
 
bool is_not_token_char (unsigned char c)
 Is the character a non-token. More...
 
bool is_whitespace_char (unsigned char c)
 Is the character whitespace. More...
 
bool is_not_whitespace_char (unsigned char c)
 Is the character non-whitespace. More...
 

Variables

static char const header_delimiter [] = "\r\n"
 Literal value of the HTTP header delimiter. More...
 
static char const header_separator [] = ":"
 Literal value of the HTTP header separator. More...
 
static std::string const empty_header
 Literal value of an empty header. More...
 
size_t const max_header_size = 16000
 Maximum size in bytes before rejecting an HTTP header as too big. More...
 
size_t const max_body_size = 32000000
 Default Maximum size in bytes for HTTP message bodies. More...
 
size_t const istream_buffer = 512
 Number of bytes to use for temporary istream read buffers. More...
 
static char const header_token []
 invalid HTTP token characters More...
 

Detailed Description

HTTP handling support.

Typedef Documentation

typedef std::map<std::string,std::string> websocketpp::http::attribute_list

The type of an HTTP attribute list.

The attribute list is an unordered key/value map. Encoded attribute values are delimited by semicolons.

Definition at line 45 of file constants.hpp.

typedef std::vector< std::pair<std::string,attribute_list> > websocketpp::http::parameter_list

The type of an HTTP parameter list.

The parameter list is an ordered pairing of a parameter and its associated attribute list. Encoded parameter values are delimited by commas.

Definition at line 53 of file constants.hpp.

Function Documentation

bool websocketpp::http::is_token_char ( unsigned char  c)
inline

Is the character a token.

Definition at line 98 of file constants.hpp.

Referenced by BOOST_AUTO_TEST_CASE().

bool websocketpp::http::is_not_token_char ( unsigned char  c)
inline
bool websocketpp::http::is_whitespace_char ( unsigned char  c)
inline

Is the character whitespace.

whitespace is space (32) or horizontal tab (9)

Definition at line 111 of file constants.hpp.

Referenced by websocketpp::http::parser::extract_lws().

bool websocketpp::http::is_not_whitespace_char ( unsigned char  c)
inline

Is the character non-whitespace.

Definition at line 116 of file constants.hpp.

Referenced by websocketpp::http::parser::extract_lws().

Variable Documentation

char const websocketpp::http::header_delimiter[] = "\r\n"
static

Literal value of the HTTP header delimiter.

Definition at line 56 of file constants.hpp.

Referenced by websocketpp::http::parser::request::consume(), and websocketpp::http::parser::response::consume().

char const websocketpp::http::header_separator[] = ":"
static

Literal value of the HTTP header separator.

Definition at line 59 of file constants.hpp.

Referenced by websocketpp::http::parser::parser::process_header().

std::string const websocketpp::http::empty_header
static

Literal value of an empty header.

Definition at line 62 of file constants.hpp.

Referenced by websocketpp::http::parser::parser::get_header().

size_t const websocketpp::http::max_header_size = 16000

Maximum size in bytes before rejecting an HTTP header as too big.

Definition at line 65 of file constants.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), websocketpp::http::parser::request::consume(), and websocketpp::http::parser::response::consume().

size_t const websocketpp::http::max_body_size = 32000000

Default Maximum size in bytes for HTTP message bodies.

Definition at line 68 of file constants.hpp.

size_t const websocketpp::http::istream_buffer = 512

Number of bytes to use for temporary istream read buffers.

Definition at line 71 of file constants.hpp.

Referenced by websocketpp::http::parser::response::consume().

char const websocketpp::http::header_token[]
static
Initial value:
= {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,
1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
}

invalid HTTP token characters

0x00 - 0x32, 0x7f-0xff ( ) < > @ , ; : \ " / [ ] ? = { }

Definition at line 78 of file constants.hpp.