v0.1.2
This commit is contained in:
parent
d6eb46d310
commit
ac669ba504
3 changed files with 7 additions and 1 deletions
|
@ -7,7 +7,7 @@ private:
|
|||
string file_dir;
|
||||
|
||||
unique_ptr<http_response> handle_request_cache(http_request& req) {
|
||||
string filename = req.path() == "/" ? "index.html" : req.path();
|
||||
string filename = req.path() == "/" ? "/index.html" : req.path();
|
||||
filename = file_dir + filename;
|
||||
auto file_info = file_cache.find(filename);
|
||||
|
||||
|
|
|
@ -438,6 +438,7 @@ public:
|
|||
add_header(http_header("Content-Type", content_type), false);
|
||||
add_header(http_header("Content-Length", ::to_string(_content.length())), false);
|
||||
add_header(http_header("Server", "Anthracite/0.0.1"), false);
|
||||
add_header(http_header("Origin-Server", "Anthracite/0.0.1"), false);
|
||||
|
||||
for (auto header : _headers) {
|
||||
response += header.second.to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue