blob: f8d2bec3daf1b7823e66c2f70fbb7ff4bec7b877 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef HTTP_STATIC_H
#define HTTP_STATIC_H
#include "http_connection.h"
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
namespace HTTP {
//! HTTP Handler serving static files from a directory.
class Static {
private:
fs::path directory_;
std::string index_;
public:
//! Construct Static-handler.
Static(fs::path directory, std::string index = "index.html");
//! Handle request.
void operator()(Connection::p connection);
};
};
#endif
|