Mercurial > hg > orthanc
comparison Core/HttpServer/FilesystemHttpHandler.cpp @ 2140:aa4b8895cd23
reorganization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Nov 2016 16:12:47 +0100 |
parents | 7a05144cb919 |
children | fd5875662670 |
comparison
equal
deleted
inserted
replaced
2139:764c9157301b | 2140:aa4b8895cd23 |
---|---|
93 #else | 93 #else |
94 std::string f = it->path().filename(); | 94 std::string f = it->path().filename(); |
95 #endif | 95 #endif |
96 | 96 |
97 std::string h = Toolbox::FlattenUri(uri) + "/" + f; | 97 std::string h = Toolbox::FlattenUri(uri) + "/" + f; |
98 if (Toolbox::IsRegularFile(it->path().string())) | 98 if (SystemToolbox::IsRegularFile(it->path().string())) |
99 { | 99 { |
100 s += "<li><a href=\"" + h + "\">" + f + "</a></li>"; | 100 s += "<li><a href=\"" + h + "\">" + f + "</a></li>"; |
101 } | 101 } |
102 } | 102 } |
103 | 103 |
156 for (size_t i = pimpl_->baseUri_.size(); i < uri.size(); i++) | 156 for (size_t i = pimpl_->baseUri_.size(); i < uri.size(); i++) |
157 { | 157 { |
158 p /= uri[i]; | 158 p /= uri[i]; |
159 } | 159 } |
160 | 160 |
161 if (Toolbox::IsRegularFile(p.string())) | 161 if (SystemToolbox::IsRegularFile(p.string())) |
162 { | 162 { |
163 FilesystemHttpSender sender(p); | 163 FilesystemHttpSender sender(p); |
164 output.Answer(sender); // TODO COMPRESSION | 164 output.Answer(sender); // TODO COMPRESSION |
165 } | 165 } |
166 else if (listDirectoryContent_ && | 166 else if (listDirectoryContent_ && |