comparison Core/HttpServer/FilesystemHttpHandler.cpp @ 895:7e8cde5905fd plugins

allow superposition of REST handlers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 16 Jun 2014 17:47:58 +0200
parents a811bdf8b8eb
children 7d88f3f4a3b3
comparison
equal deleted inserted replaced
894:690aeb4cb899 895:7e8cde5905fd
124 { 124 {
125 return Toolbox::IsChildUri(pimpl_->baseUri_, uri); 125 return Toolbox::IsChildUri(pimpl_->baseUri_, uri);
126 } 126 }
127 127
128 128
129 void FilesystemHttpHandler::Handle( 129 bool FilesystemHttpHandler::Handle(
130 HttpOutput& output, 130 HttpOutput& output,
131 HttpMethod method, 131 HttpMethod method,
132 const UriComponents& uri, 132 const UriComponents& uri,
133 const Arguments& headers, 133 const Arguments& headers,
134 const Arguments& arguments, 134 const Arguments& arguments,
135 const std::string&) 135 const std::string&)
136 { 136 {
137 if (method != HttpMethod_Get) 137 if (method != HttpMethod_Get)
138 { 138 {
139 output.SendMethodNotAllowedError("GET"); 139 output.SendMethodNotAllowedError("GET");
140 return; 140 return true;
141 } 141 }
142 142
143 namespace fs = boost::filesystem; 143 namespace fs = boost::filesystem;
144 144
145 fs::path p = pimpl_->root_; 145 fs::path p = pimpl_->root_;
162 } 162 }
163 else 163 else
164 { 164 {
165 output.SendHeader(HttpStatus_404_NotFound); 165 output.SendHeader(HttpStatus_404_NotFound);
166 } 166 }
167
168 return true;
167 } 169 }
168 } 170 }