Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::net::http Namespace Reference

Classes

class  Controller
 HTTP controller. More...
 
class  Cookie
 Cookie class. More...
 
class  CookieMap
 Cookie mapping collection class. More...
 
class  DynamicTable
 HTTP 2 dynamic table. More...
 
class  Header
 HTTP Header Key-Value Collection. More...
 
class  HeaderBuilder
 Header Key-Value Collection Builder. More...
 
class  HPackUtil
 HPACK decompression tool class. More...
 
struct  Http2Frame
 HTTP 2 Frame Information (including buffer) More...
 
struct  Http2FrameInfo
 HTTP 2 Frame Information. More...
 
class  HttpConverter
 
class  HttpServletContext
 
class  HttpUtil
 HTTP Utility Class. More...
 
class  huffman_encoder_t
 Huffman Encoder. More...
 
class  huffman_node_t
 Huffman node. More...
 
class  huffman_tree_t
 Huffman Tree. More...
 
struct  Range
 HTTP Content Range Class. More...
 
class  Request
 HTTP Request Class. More...
 
class  Requestable
 Requestable Interface. More...
 
class  RequestableFactory
 Requestable Factory. More...
 
class  RequestHeader
 Request Header Class. More...
 
class  RequestParser
 Request Parser. More...
 
class  Response
 HTTP Response Class. More...
 
class  ResponseHeader
 Response Header Class. More...
 
class  Servlet
 HTTP applications. More...
 
class  Url
 URL Parser. More...
 

Typedefs

typedef std::pair< const std::string, const std::string > header_t
 
typedef std::vector< bool > bits_t
 
using HuffmanEncoder = huffman_encoder_t
 
using HuffmanDecoder = huffman_tree_t
 

Enumerations

enum class  HttpVersion { VERSION_1_1 , VERSION_2 , VERSION_UNKNOWN }
 HTTP Version. More...
 
enum class  RequestType {
  OPTIONS , GET , POST , HEAD ,
  PUT , DELETE , TRACE , CONNECT ,
  ANOTHER
}
 Request Type. More...
 

Functions

std::string requestTypeToString (RequestType request_type)
 
RequestType stringToRequestType (const std::string &request_type_str)
 

Variables

const std::array< header_t, 62 > PREDEFINED_HEADERS
 
const std::array< const bits_t, 257 > HUFFMAN_TABLE
 
static constexpr uint8_t FRAME_FLAG_END_STREAM = 0x1
 
static constexpr uint8_t FRAME_FLAG_END_HEADERS = 0x4
 
static constexpr uint8_t FRAME_FLAG_PADDED = 0x8
 
static constexpr uint8_t FRAME_FLAG_PRIORITY = 0x20
 
static constexpr uint8_t FRAME_TYPE_DATA = 0x0
 
static constexpr uint8_t FRAME_TYPE_HEADERS = 0x1
 
static constexpr uint8_t FRAME_TYPE_PRIORITY = 0x2
 
static constexpr uint8_t FRAME_TYPE_RST_STREAM = 0x3
 
static constexpr uint8_t FRAME_TYPE_SETTINGS = 0x4
 
static constexpr uint8_t FRAME_TYPE_PUSH_PROMISE = 0x5
 
static constexpr uint8_t FRAME_TYPE_PING = 0x6
 
static constexpr uint8_t FRAME_TYPE_GOAWAY = 0x7
 
static constexpr uint8_t FRAME_TYPE_WINDOW_UPDATE = 0x8
 
static constexpr uint8_t FRAME_TYPE_CONTINUATION = 0x9
 
static constexpr uint8_t FRAME_TYPE_ALTSVC = 0xa
 
static constexpr uint8_t FRAME_TYPE_ORIGIN = 0xc
 
static constexpr uint8_t GOAWAY_NO_ERROR = 0x0
 
static constexpr uint8_t GOAWAY_PROTOCOL_ERROR = 0x1
 
static constexpr uint8_t GOAWAY_INTERNAL_ERROR = 0x2
 
static constexpr uint8_t GOAWAY_FLOW_CONTROL_ERROR = 0x3
 
static constexpr uint8_t GOAWAY_SETTINGS_TIMEOUT = 0x4
 
static constexpr uint8_t GOAWAY_STREAM_CLOSED = 0x5
 
static constexpr uint8_t GOAWAY_FRAME_SIZE_ERROR = 0x6
 
static constexpr uint8_t GOAWAY_REFUSED_STREAM = 0x7
 
static constexpr uint8_t GOAWAY_CANCEL = 0x8
 
static constexpr uint8_t GOAWAY_COMPRESSION_ERROR = 0x9
 
static constexpr uint8_t GOAWAY_CONNECT_ERROR = 0xa
 
static constexpr uint8_t GOAWAY_ENHANCE_YOUR_CALM = 0xb
 
static constexpr uint8_t GOAWAY_INADEQUATE_SECURITY = 0xc
 
static constexpr uint8_t GOAWAY_HTTP_1_1_REQUIRED = 0xd
 
static constexpr uint16_t SETTINGS_HEADER_TABLE_SIZE = 0x1
 
static constexpr uint16_t SETTINGS_ENABLE_PUSH = 0x2
 
static constexpr uint16_t SETTINGS_MAX_CONCURRENT_STREAMS = 0x3
 
static constexpr uint16_t SETTINGS_INITIAL_WINDOW_SIZE = 0x4
 
static constexpr uint16_t SETTINGS_MAX_FRAME_SIZE = 0x5
 
static constexpr uint16_t SETTINGS_MAX_HEADER_LIST_SIZE = 0x6
 
static constexpr uint8_t SETTINGS_FLAGS_ACK = 0x1
 
static constexpr auto MAGIC_STRING = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
 

Typedef Documentation

◆ bits_t

typedef std::vector<bool> sese::net::http::bits_t

◆ header_t

typedef std::pair<const std::string, const std::string> sese::net::http::header_t

◆ HuffmanDecoder

◆ HuffmanEncoder

Enumeration Type Documentation

◆ HttpVersion

enum class sese::net::http::HttpVersion
strong

HTTP Version.

Enumerator
VERSION_1_1 
VERSION_2 
VERSION_UNKNOWN 

◆ RequestType

enum class sese::net::http::RequestType
strong

Request Type.

Enumerator
OPTIONS 
GET 
POST 
HEAD 
PUT 
DELETE 
TRACE 
CONNECT 
ANOTHER 

Function Documentation

◆ requestTypeToString()

std::string sese::net::http::requestTypeToString ( RequestType request_type)
inline

◆ stringToRequestType()

RequestType sese::net::http::stringToRequestType ( const std::string & request_type_str)
inline

Variable Documentation

◆ FRAME_FLAG_END_HEADERS

uint8_t sese::net::http::FRAME_FLAG_END_HEADERS = 0x4
staticconstexpr

◆ FRAME_FLAG_END_STREAM

◆ FRAME_FLAG_PADDED

uint8_t sese::net::http::FRAME_FLAG_PADDED = 0x8
staticconstexpr

◆ FRAME_FLAG_PRIORITY

uint8_t sese::net::http::FRAME_FLAG_PRIORITY = 0x20
staticconstexpr

◆ FRAME_TYPE_ALTSVC

uint8_t sese::net::http::FRAME_TYPE_ALTSVC = 0xa
staticconstexpr

◆ FRAME_TYPE_CONTINUATION

uint8_t sese::net::http::FRAME_TYPE_CONTINUATION = 0x9
staticconstexpr

◆ FRAME_TYPE_DATA

◆ FRAME_TYPE_GOAWAY

uint8_t sese::net::http::FRAME_TYPE_GOAWAY = 0x7
staticconstexpr

◆ FRAME_TYPE_HEADERS

uint8_t sese::net::http::FRAME_TYPE_HEADERS = 0x1
staticconstexpr

◆ FRAME_TYPE_ORIGIN

uint8_t sese::net::http::FRAME_TYPE_ORIGIN = 0xc
staticconstexpr

◆ FRAME_TYPE_PING

uint8_t sese::net::http::FRAME_TYPE_PING = 0x6
staticconstexpr

◆ FRAME_TYPE_PRIORITY

uint8_t sese::net::http::FRAME_TYPE_PRIORITY = 0x2
staticconstexpr

◆ FRAME_TYPE_PUSH_PROMISE

uint8_t sese::net::http::FRAME_TYPE_PUSH_PROMISE = 0x5
staticconstexpr

◆ FRAME_TYPE_RST_STREAM

uint8_t sese::net::http::FRAME_TYPE_RST_STREAM = 0x3
staticconstexpr

◆ FRAME_TYPE_SETTINGS

uint8_t sese::net::http::FRAME_TYPE_SETTINGS = 0x4
staticconstexpr

◆ FRAME_TYPE_WINDOW_UPDATE

uint8_t sese::net::http::FRAME_TYPE_WINDOW_UPDATE = 0x8
staticconstexpr

◆ GOAWAY_CANCEL

uint8_t sese::net::http::GOAWAY_CANCEL = 0x8
staticconstexpr

◆ GOAWAY_COMPRESSION_ERROR

uint8_t sese::net::http::GOAWAY_COMPRESSION_ERROR = 0x9
staticconstexpr

◆ GOAWAY_CONNECT_ERROR

uint8_t sese::net::http::GOAWAY_CONNECT_ERROR = 0xa
staticconstexpr

◆ GOAWAY_ENHANCE_YOUR_CALM

uint8_t sese::net::http::GOAWAY_ENHANCE_YOUR_CALM = 0xb
staticconstexpr

◆ GOAWAY_FLOW_CONTROL_ERROR

uint8_t sese::net::http::GOAWAY_FLOW_CONTROL_ERROR = 0x3
staticconstexpr

◆ GOAWAY_FRAME_SIZE_ERROR

uint8_t sese::net::http::GOAWAY_FRAME_SIZE_ERROR = 0x6
staticconstexpr

◆ GOAWAY_HTTP_1_1_REQUIRED

uint8_t sese::net::http::GOAWAY_HTTP_1_1_REQUIRED = 0xd
staticconstexpr

◆ GOAWAY_INADEQUATE_SECURITY

uint8_t sese::net::http::GOAWAY_INADEQUATE_SECURITY = 0xc
staticconstexpr

◆ GOAWAY_INTERNAL_ERROR

uint8_t sese::net::http::GOAWAY_INTERNAL_ERROR = 0x2
staticconstexpr

◆ GOAWAY_NO_ERROR

uint8_t sese::net::http::GOAWAY_NO_ERROR = 0x0
staticconstexpr

◆ GOAWAY_PROTOCOL_ERROR

uint8_t sese::net::http::GOAWAY_PROTOCOL_ERROR = 0x1
staticconstexpr

◆ GOAWAY_REFUSED_STREAM

uint8_t sese::net::http::GOAWAY_REFUSED_STREAM = 0x7
staticconstexpr

◆ GOAWAY_SETTINGS_TIMEOUT

uint8_t sese::net::http::GOAWAY_SETTINGS_TIMEOUT = 0x4
staticconstexpr

◆ GOAWAY_STREAM_CLOSED

uint8_t sese::net::http::GOAWAY_STREAM_CLOSED = 0x5
staticconstexpr

◆ HUFFMAN_TABLE

const std::array<const bits_t, 257> sese::net::http::HUFFMAN_TABLE
inline

◆ MAGIC_STRING

auto sese::net::http::MAGIC_STRING = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
staticconstexpr

◆ PREDEFINED_HEADERS

const std::array<header_t, 62> sese::net::http::PREDEFINED_HEADERS
inline
Initial value:
= {
{header_t("INVALIDINDEX", "INVALIDINDEX"), header_t(":authority", ""), header_t(":method", "GET"),
header_t(":method", "POST"), header_t(":path", "/"), header_t(":path", "/index.html"),
header_t(":scheme", "http"), header_t(":scheme", "https"), header_t(":status", "200"),
header_t(":status", "204"), header_t(":status", "206"), header_t(":status", "304"),
header_t(":status", "400"), header_t(":status", "404"), header_t(":status", "500"),
header_t("accept-charset", ""), header_t("accept-encoding", "gzip, deflate"), header_t("accept-language", ""),
header_t("accept-ranges", ""), header_t("accept", ""), header_t("access-control-allow-origin", ""),
header_t("age", ""), header_t("allow", ""), header_t("authorization", ""),
header_t("cache-control", ""), header_t("content-disposition", ""), header_t("content-encoding", ""),
header_t("content-language", ""), header_t("content-length", ""), header_t("content-location", ""),
header_t("content-range", ""), header_t("content-type", ""), header_t("cookie", ""),
header_t("date", ""), header_t("etag", ""), header_t("expect", ""),
header_t("expires", ""), header_t("from", ""), header_t("host", ""),
header_t("if-match", ""), header_t("if-modified-since", ""), header_t("if-none-match", ""),
header_t("if-range", ""), header_t("if-unmodified-since", ""), header_t("last-modified", ""),
header_t("link", ""), header_t("location", ""), header_t("max-forwards", ""),
header_t("proxy-authenticate", ""), header_t("proxy-authorization", ""), header_t("range", ""),
header_t("referer", ""), header_t("refresh", ""), header_t("retry-after", ""),
header_t("server", ""), header_t("set-cookie", ""), header_t("strict-transport-security", ""),
header_t("transfer-encoding", ""), header_t("user-agent", ""), header_t("vary", ""),
header_t("via", ""), header_t("www-authenticate", "")}
}

Referenced by sese::net::http::HPackUtil::encode(), and sese::net::http::DynamicTable::get().

◆ SETTINGS_ENABLE_PUSH

uint16_t sese::net::http::SETTINGS_ENABLE_PUSH = 0x2
staticconstexpr

◆ SETTINGS_FLAGS_ACK

uint8_t sese::net::http::SETTINGS_FLAGS_ACK = 0x1
staticconstexpr

◆ SETTINGS_HEADER_TABLE_SIZE

uint16_t sese::net::http::SETTINGS_HEADER_TABLE_SIZE = 0x1
staticconstexpr

◆ SETTINGS_INITIAL_WINDOW_SIZE

uint16_t sese::net::http::SETTINGS_INITIAL_WINDOW_SIZE = 0x4
staticconstexpr

◆ SETTINGS_MAX_CONCURRENT_STREAMS

uint16_t sese::net::http::SETTINGS_MAX_CONCURRENT_STREAMS = 0x3
staticconstexpr

◆ SETTINGS_MAX_FRAME_SIZE

uint16_t sese::net::http::SETTINGS_MAX_FRAME_SIZE = 0x5
staticconstexpr

◆ SETTINGS_MAX_HEADER_LIST_SIZE

uint16_t sese::net::http::SETTINGS_MAX_HEADER_LIST_SIZE = 0x6
staticconstexpr