comparison Core/HttpServer/FilesystemHttpHandler.cpp @ 1517:4f8c8ef114db

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Aug 2015 10:32:34 +0200
parents c94353fbd4e9
children 8bd0d897763f
comparison
equal deleted inserted replaced
1516:f09f5d3225a7 1517:4f8c8ef114db
54 const UriComponents& uri, 54 const UriComponents& uri,
55 const boost::filesystem::path& p) 55 const boost::filesystem::path& p)
56 { 56 {
57 namespace fs = boost::filesystem; 57 namespace fs = boost::filesystem;
58 58
59 output.SetContentType("text/html");
60
61 std::string s; 59 std::string s;
62 s += "<html>"; 60 s += "<html>";
63 s += " <body>"; 61 s += " <body>";
64 s += " <h1>Subdirectories</h1>"; 62 s += " <h1>Subdirectories</h1>";
65 s += " <ul>"; 63 s += " <ul>";
103 101
104 s += " </ul>"; 102 s += " </ul>";
105 s += " </body>"; 103 s += " </body>";
106 s += "</html>"; 104 s += "</html>";
107 105
108 output.SendBody(s, IHttpHandler::GetPreferredCompression(headers, s.size())); 106 output.SetContentType("text/html");
107 output.SendBody(s);
109 } 108 }
110 109
111 110
112 FilesystemHttpHandler::FilesystemHttpHandler(const std::string& baseUri, 111 FilesystemHttpHandler::FilesystemHttpHandler(const std::string& baseUri,
113 const std::string& root) : pimpl_(new PImpl) 112 const std::string& root) : pimpl_(new PImpl)