Mercurial > hg > orthanc
diff Core/HttpServer/FilesystemHttpHandler.cpp @ 217:1ac3aacd10a5
simplifications
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2012 12:22:23 +0100 |
parents | fe180eae201d |
children | 64925c94825c |
line wrap: on
line diff
--- a/Core/HttpServer/FilesystemHttpHandler.cpp Thu Nov 29 11:57:35 2012 +0100 +++ b/Core/HttpServer/FilesystemHttpHandler.cpp Thu Nov 29 12:22:23 2012 +0100 @@ -33,6 +33,7 @@ #include "FilesystemHttpHandler.h" #include "../OrthancException.h" +#include "FilesystemHttpSender.h" #include <boost/filesystem.hpp> @@ -53,7 +54,7 @@ { namespace fs = boost::filesystem; - output.SendOkHeader("text/html"); + output.SendCustomOkHeader("Content-Type: text/html\r\n"); output.SendString("<html>"); output.SendString(" <body>"); output.SendString(" <h1>Subdirectories</h1>"); @@ -148,7 +149,9 @@ if (fs::exists(p) && fs::is_regular_file(p)) { - output.AnswerFileAutodetectContentType(p.string()); + FilesystemHttpSender(p).Send(output); + + //output.AnswerFileAutodetectContentType(p.string()); } else if (listDirectoryContent_ && fs::exists(p) &&