Mercurial > hg > orthanc
diff Core/HttpServer/MongooseServer.cpp @ 1446:8dc80ba768aa
refactoring: IHttpHandler does not use std::string to hold the request body
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 01 Jul 2015 13:16:12 +0200 |
parents | 895ab369d63c |
children | f967bdf8534e |
line wrap: on
line diff
--- a/Core/HttpServer/MongooseServer.cpp Wed Jul 01 12:30:19 2015 +0200 +++ b/Core/HttpServer/MongooseServer.cpp Wed Jul 01 13:16:12 2015 +0200 @@ -622,6 +622,9 @@ // Extract the body of the request for PUT and POST + + // TODO Avoid unneccessary memcopy of the body + std::string body; if (method == HttpMethod_Post || method == HttpMethod_Put) @@ -689,7 +692,7 @@ { if (that->HasHandler()) { - found = that->GetHandler().Handle(output, method, uri, headers, argumentsGET, body); + found = that->GetHandler().Handle(output, method, uri, headers, argumentsGET, body.c_str(), body.size()); } } catch (OrthancException& e)