Mercurial > hg > orthanc
comparison Core/HttpServer/HttpServer.cpp @ 3836:0c16051dfd56
test
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 15 Apr 2020 17:28:15 +0200 |
parents | 9fe1d64a748c |
children |
comparison
equal
deleted
inserted
replaced
3833:a3e38994d95a | 3836:0c16051dfd56 |
---|---|
168 } | 168 } |
169 }; | 169 }; |
170 | 170 |
171 | 171 |
172 | 172 |
173 class ChunkStore | 173 class ChunkStore : public boost::noncopyable |
174 { | 174 { |
175 private: | 175 private: |
176 typedef std::list<ChunkedFile*> Content; | 176 typedef std::list<ChunkedFile*> Content; |
177 Content content_; | 177 Content content_; |
178 unsigned int numPlaces_; | 178 unsigned int numPlaces_; |
306 | 306 |
307 static PostDataStatus ReadBodyWithContentLength(std::string& body, | 307 static PostDataStatus ReadBodyWithContentLength(std::string& body, |
308 struct mg_connection *connection, | 308 struct mg_connection *connection, |
309 const std::string& contentLength) | 309 const std::string& contentLength) |
310 { | 310 { |
311 int length; | 311 int length; |
312 try | 312 try |
313 { | 313 { |
314 length = boost::lexical_cast<int>(contentLength); | 314 length = boost::lexical_cast<int>(contentLength); |
315 } | 315 } |
316 catch (boost::bad_lexical_cast&) | 316 catch (boost::bad_lexical_cast&) |
902 default: | 902 default: |
903 throw OrthancException(ErrorCode_InternalError); | 903 throw OrthancException(ErrorCode_InternalError); |
904 } | 904 } |
905 } | 905 } |
906 | 906 |
907 | |
908 if (!found && | 907 if (!found && |
909 server.HasHandler()) | 908 server.HasHandler()) |
910 { | 909 { |
911 found = server.GetHandler().Handle(output, RequestOrigin_RestApi, remoteIp, username.c_str(), | 910 found = server.GetHandler().Handle(output, RequestOrigin_RestApi, remoteIp, username.c_str(), |
912 method, uri, headers, argumentsGET, body.c_str(), body.size()); | 911 method, uri, headers, argumentsGET, body.c_str(), body.size()); |