annotate Core/HttpServer/FilesystemHttpHandler.cpp @ 915:703bef350e89

Orthanc now relies entirely on boost::locale
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Jun 2014 12:00:41 +0200
parents a811bdf8b8eb
children 7e8cde5905fd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
59
c996319e90bc renaming in Core
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 50
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
689
2d0a347e8cfc switch to 2014
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 473
diff changeset
3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Belgium
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * published by the Free Software Foundation, either version 3 of the
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
136
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
10 *
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
11 * In addition, as a special exception, the copyright holders of this
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
12 * program give permission to link the code of its release with the
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
14 * that use the same license as the "OpenSSL" library), and distribute
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
15 * the linked executables. You must obey the GNU General Public License
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
16 * in all respects for all of the code used other than "OpenSSL". If you
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
17 * modify file(s) with this exception, you may extend this exception to
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
18 * your version of the file(s), but you are not obligated to do so. If
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
19 * you do not wish to do so, delete this exception statement from your
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
20 * version. If you delete this exception statement from all source files
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
21 * in the program, then also delete it here.
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * This program is distributed in the hope that it will be useful, but
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * General Public License for more details.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 * You should have received a copy of the GNU General Public License
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 **/
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
33 #include "../PrecompiledHeaders.h"
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #include "FilesystemHttpHandler.h"
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
59
c996319e90bc renaming in Core
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 50
diff changeset
36 #include "../OrthancException.h"
217
1ac3aacd10a5 simplifications
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 136
diff changeset
37 #include "FilesystemHttpSender.h"
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #include <boost/filesystem.hpp>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
59
c996319e90bc renaming in Core
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 50
diff changeset
42 namespace Orthanc
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 struct FilesystemHttpHandler::PImpl
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 UriComponents baseUri_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 boost::filesystem::path root_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 };
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 static void OutputDirectoryContent(HttpOutput& output,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 const UriComponents& uri,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 const boost::filesystem::path& p)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 namespace fs = boost::filesystem;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
330
78a8eaa5f30b cookies
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 324
diff changeset
58 output.SendOkHeader("text/html", false, 0, NULL);
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 output.SendString("<html>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 output.SendString(" <body>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 output.SendString(" <h1>Subdirectories</h1>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 output.SendString(" <ul>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 if (uri.size() > 0)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 std::string h = Toolbox::FlattenUri(uri) + "/..";
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 output.SendString("<li><a href=\"" + h + "\">..</a></li>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 fs::directory_iterator end;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 for (fs::directory_iterator it(p) ; it != end; ++it)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 {
110
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
73 #if BOOST_HAS_FILESYSTEM_V3 == 1
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 std::string f = it->path().filename().string();
110
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
75 #else
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
76 std::string f = it->path().filename();
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
77 #endif
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
78
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 std::string h = Toolbox::FlattenUri(uri) + "/" + f;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 if (fs::is_directory(it->status()))
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 output.SendString("<li><a href=\"" + h + "\">" + f + "</a></li>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 output.SendString(" </ul>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 output.SendString(" <h1>Files</h1>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 output.SendString(" <ul>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 for (fs::directory_iterator it(p) ; it != end; ++it)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 {
110
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
90 #if BOOST_HAS_FILESYSTEM_V3 == 1
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 std::string f = it->path().filename().string();
110
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
92 #else
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
93 std::string f = it->path().filename();
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
94 #endif
fd7b0a3e6260 support of boost 1.42 for debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
95
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 std::string h = Toolbox::FlattenUri(uri) + "/" + f;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 if (fs::is_regular_file(it->status()))
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 output.SendString("<li><a href=\"" + h + "\">" + f + "</a></li>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 output.SendString(" </ul>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 output.SendString(" </body>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 output.SendString("</html>");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 FilesystemHttpHandler::FilesystemHttpHandler(const std::string& baseUri,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 const std::string& root) : pimpl_(new PImpl)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 Toolbox::SplitUriComponents(pimpl_->baseUri_, baseUri);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 pimpl_->root_ = root;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 listDirectoryContent_ = false;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 namespace fs = boost::filesystem;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 if (!fs::exists(pimpl_->root_) ||
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 !fs::is_directory(pimpl_->root_))
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 {
59
c996319e90bc renaming in Core
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 50
diff changeset
118 throw OrthancException("The path does not point to a directory");
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 bool FilesystemHttpHandler::IsServedUri(const UriComponents& uri)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 return Toolbox::IsChildUri(pimpl_->baseUri_, uri);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 void FilesystemHttpHandler::Handle(
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 HttpOutput& output,
473
c9a5d72f8481 changing the namespace of HTTP enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 398
diff changeset
131 HttpMethod method,
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 const UriComponents& uri,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 const Arguments& headers,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 const Arguments& arguments,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 const std::string&)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 {
473
c9a5d72f8481 changing the namespace of HTTP enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 398
diff changeset
137 if (method != HttpMethod_Get)
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 output.SendMethodNotAllowedError("GET");
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 return;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 namespace fs = boost::filesystem;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 fs::path p = pimpl_->root_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 for (size_t i = pimpl_->baseUri_.size(); i < uri.size(); i++)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 p /= uri[i];
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 if (fs::exists(p) && fs::is_regular_file(p))
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 {
217
1ac3aacd10a5 simplifications
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 136
diff changeset
153 FilesystemHttpSender(p).Send(output);
1ac3aacd10a5 simplifications
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 136
diff changeset
154
1ac3aacd10a5 simplifications
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 136
diff changeset
155 //output.AnswerFileAutodetectContentType(p.string());
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 else if (listDirectoryContent_ &&
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 fs::exists(p) &&
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 fs::is_directory(p))
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 OutputDirectoryContent(output, uri, p);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 else
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 {
473
c9a5d72f8481 changing the namespace of HTTP enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 398
diff changeset
165 output.SendHeader(HttpStatus_404_NotFound);
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 }