98 http_state_retriving_comand_line,
99 http_state_retriving_header,
100 http_state_retriving_body,
101 http_state_connection_close,
105 enum body_transfer_type{
106 http_body_transfer_chunked,
107 http_body_transfer_measure,
108 http_body_transfer_chunked_instead_measure,
109 http_body_transfer_connection_close,
110 http_body_transfer_multipart,
111 http_body_transfer_undefined
114 bool handle_buff_in(std::string&
buf);
116 bool analize_cached_request_header_and_invoke_state(
size_t pos);
118 bool handle_invoke_query_line();
119 bool parse_cached_header(http_header_info& body_info,
const std::string& m_cache_to_process,
size_t pos);
120 std::string::size_type match_end_of_header(
const std::string&
buf);
121 bool get_len_from_content_lenght(
const std::string& str,
size_t& len);
122 bool handle_retriving_query_body();
123 bool handle_query_measure();
124 bool set_ready_state();
125 bool slash_to_back_slash(std::string& str);
126 std::string get_file_mime_tipe(
const std::string& path);
127 std::string get_response_header(
const http_response_info& response);
133 std::string get_not_found_response_body(
const std::string& URI);
135 std::string m_root_path;
137 machine_state m_state;
138 body_transfer_type m_body_transfer_type;
139 bool m_is_stop_handling;
141 size_t m_len_summary, m_len_remain;