comparison OrthancFramework/Sources/HttpServer/FilesystemHttpHandler.cpp @ 4330:a01b1c9cbef4

moving generic type definitions from IHttpHandler to HttpToolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 Nov 2020 14:39:10 +0100
parents bf7b9edf6b81
children d9473bd5ed43
comparison
equal deleted inserted replaced
4329:9dc0e42f868b 4330:a01b1c9cbef4
39 }; 39 };
40 40
41 41
42 42
43 static void OutputDirectoryContent(HttpOutput& output, 43 static void OutputDirectoryContent(HttpOutput& output,
44 const IHttpHandler::Arguments& headers, 44 const HttpToolbox::Arguments& headers,
45 const UriComponents& uri, 45 const UriComponents& uri,
46 const boost::filesystem::path& p) 46 const boost::filesystem::path& p)
47 { 47 {
48 namespace fs = boost::filesystem; 48 namespace fs = boost::filesystem;
49 49
115 throw OrthancException(ErrorCode_DirectoryExpected); 115 throw OrthancException(ErrorCode_DirectoryExpected);
116 } 116 }
117 } 117 }
118 118
119 119
120 bool FilesystemHttpHandler::Handle( 120 bool FilesystemHttpHandler::Handle(HttpOutput& output,
121 HttpOutput& output, 121 RequestOrigin /*origin*/,
122 RequestOrigin /*origin*/, 122 const char* /*remoteIp*/,
123 const char* /*remoteIp*/, 123 const char* /*username*/,
124 const char* /*username*/, 124 HttpMethod method,
125 HttpMethod method, 125 const UriComponents& uri,
126 const UriComponents& uri, 126 const HttpToolbox::Arguments& headers,
127 const Arguments& headers, 127 const HttpToolbox::GetArguments& arguments,
128 const GetArguments& arguments, 128 const void* /*bodyData*/,
129 const void* /*bodyData*/, 129 size_t /*bodySize*/)
130 size_t /*bodySize*/)
131 { 130 {
132 if (!Toolbox::IsChildUri(pimpl_->baseUri_, uri)) 131 if (!Toolbox::IsChildUri(pimpl_->baseUri_, uri))
133 { 132 {
134 // This URI is not served by this handler 133 // This URI is not served by this handler
135 return false; 134 return false;