From 0e3c3380d519b033500b4ed1ccd3acf707c34372 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 2 Jan 2011 22:28:26 +0100 Subject: Merge HTTPResponse into HTTP::Connection. --- http.h | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 http.h (limited to 'http.h') diff --git a/http.h b/http.h deleted file mode 100644 index 29add9a..0000000 --- a/http.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef HTTP_H -#define HTTP_H - -#include - -#include -#include -#include - -typedef std::map stringmap; -typedef stringmap HTTPHeaders; -typedef stringmap HTTPQuery; - -class HTTPRequest { - public: - std::string type, path, httpver; - HTTPQuery query; - HTTPHeaders headers; - HTTPRequest(std::istream& is); - static void url_decode(std::string& str); -}; - -class HTTPResponse { - private: - HTTPHeaders headers; - boost::asio::ip::tcp::socket& socket; - void write_headers(); - bool headers_written; - public: - int code; - std::string httpver, status; - HTTPResponse(boost::asio::ip::tcp::socket& socket_); - void add_header(std::string key, std::string value); - void write(char *data, unsigned int len); - void write(std::string str); -}; - -#endif -- cgit v1.2.3