00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef HTTP_REQUEST_HANDLER_HPP
00012 #define HTTP_REQUEST_HANDLER_HPP
00013
00014 #include <string>
00015 #include <boost/noncopyable.hpp>
00016
00017 namespace http {
00018 namespace server {
00019
00020 struct reply;
00021 struct request;
00022
00024 class request_handler
00025 : private boost::noncopyable
00026 {
00027 public:
00029 explicit request_handler(const std::string& doc_root);
00030
00032 void handle_request(const request& req, reply& rep);
00033
00034 private:
00036 std::string doc_root_;
00037
00040 static bool url_decode(const std::string& in, std::string& out);
00041 };
00042
00043 }
00044 }
00045
00046 #endif // HTTP_REQUEST_HANDLER_HPP