30 #include <boost/lexical_cast.hpp>
31 #include <boost/regex.hpp>
32 #include <boost/utility/string_ref.hpp>
38 #undef ELECTRONEUM_DEFAULT_LOG_CATEGORY
39 #define ELECTRONEUM_DEFAULT_LOG_CATEGORY "net.http"
66 typedef std::list<std::pair<std::string, std::string> >
fields_list;
71 fields_list::const_iterator it = fields.begin();
72 for(; it != fields.end(); it++)
87 buff += param_name +
"=([^&]*)";
88 boost::regex match_param(buff.c_str(), boost::regex::icase | boost::regex::normal);
90 if(boost::regex_search(uri, result, match_param, boost::match_default) && result[0].matched)
97 static inline void add_field(
std::string& out,
const boost::string_ref
name,
const boost::string_ref
value)
99 out.append(
name.data(),
name.size()).append(
": ");
100 out.append(
value.data(),
value.size()).append(
"\r\n");
102 static inline void add_field(
std::string& out,
const std::pair<std::string, std::string>& field)
104 add_field(out, field.first, field.second);
@ http_content_type_text_html
@ http_content_type_other
@ http_content_type_not_set
@ http_content_type_image_gif
std::list< std::pair< std::string, std::string > > fields_list
std::string get_value_from_fields_list(const std::string ¶m_name, const net_utils::http::fields_list &fields)
std::string get_value_from_uri_line(const std::string ¶m_name, const std::string &uri)
const GenericPointer< typename T::ValueType > T2 value
unsigned __int64 uint64_t
std::string m_full_request_str
size_t m_full_request_buf_size
uri_content m_uri_content
std::string m_http_method_str
http_header_info m_header_info
std::string m_replace_html
http_method m_http_method
std::string m_request_head
std::string m_response_comment
http_header_info m_header_info
fields_list m_additional_fields
std::list< std::pair< std::string, std::string > > m_query_params
uri_content m_uri_content