20 const string content_type_parser = R
"END(^(.*?);\s(.*)$)END"; 21 regex content_type_regex{content_type_parser, std::regex_constants::optimize}; 24 map<string, string>
env;
26 map<int, string> http_status{
28 {101,
"Switching Protocols"},
32 {203,
"Non-Authoritative Information"},
34 {205,
"Reset Content"},
35 {206,
"Partial Content"},
36 {300,
"Multiple Choices"},
37 {301,
"Moved Permanently"},
40 {304,
"Not Modified"},
42 {307,
"Temporary Redirect"},
44 {401,
"Unauthorized"},
45 {402,
"Payment Required"},
48 {405,
"Method Not Allowed"},
49 {406,
"Not Acceptable"},
50 {407,
"Proxy Authentication Required"},
51 {408,
"Request Time-out"},
54 {411,
"Length Required"},
55 {412,
"Precondition Failed"},
56 {413,
"Request Entity Too Large"},
57 {414,
"Request-URI Too Large"},
58 {415,
"Unsupported Media Type"},
59 {416,
"Requested range not satisfiable"},
60 {417,
"Expectation Failed"},
61 {500,
"Internal Server Error"},
62 {501,
"Not Implemented"},
64 {503,
"Service Unavailable"},
65 {504,
"Gateway Time-out"},
66 {505,
"HTTP Version not supported"}
71 void get_env(
char *env_p[]);
73 void print_env(ostream &o_stream);
74 void respond(ostringstream &o_stream,
76 string mime =
"text/plain",
77 string charset =
"utf-8");
map< string, string > env
Definition: http_io.hpp:24
map< string, string > header
Definition: http_io.hpp:25
Definition: http_io.hpp:19
Definition: string_util.hpp:31
string_util su
Definition: http_io.hpp:78
string locale
Definition: http_io.hpp:69