summaryrefslogtreecommitdiff
path: root/http_connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'http_connection.h')
-rw-r--r--http_connection.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/http_connection.h b/http_connection.h
index f166f44..b6d6e27 100644
--- a/http_connection.h
+++ b/http_connection.h
@@ -1,6 +1,10 @@
#ifndef HTTP_CONNECTION_H
#define HTTP_CONNECTION_H
+#include <string>
+#include <vector>
+#include <map>
+
#include <boost/asio.hpp>
#include <boost/enable_shared_from_this.hpp>
using boost::asio::ip::tcp;
@@ -15,6 +19,25 @@ namespace HTTP {
void handle_read(const boost::system::error_code& error, size_t bytes_transferred);
tcp::socket socket;
boost::asio::streambuf buf;
+
+ //! Request method.
+ std::string method;
+
+ //! Request path.
+ std::vector<std::string> path;
+
+ //! Request arguments.
+ std::map<std::string, std::string> args;
+
+ //! Request version.
+ std::string version;
+
+ //! Request headers.
+ std::map<std::string, std::string> headers;
+
+
+ //! Parse request headers.
+ bool parse_request(boost::asio::streambuf& buf);
public:
typedef boost::shared_ptr<Connection> p;