Mercurial > hg > orthanc
changeset 4152:36257d6f348f
Support of multipart messages larger than 2GB in the embedded HTTP server
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Aug 2020 15:22:03 +0200 |
parents | 8c559dd5034b |
children | a4664f169cd7 |
files | NEWS OrthancFramework/Sources/HttpServer/HttpServer.cpp |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Wed Aug 19 11:59:02 2020 +0200 +++ b/NEWS Wed Aug 19 15:22:03 2020 +0200 @@ -13,6 +13,7 @@ * Fix DICOM SCP filters if some query tag has more than 256 characters * "/series/.../ordered-slices" supports spaces in Image Position/Orientation Patient tags * Fix possible crash in HttpClient if sending multipart body (can occur in STOW-RS) +* Support of multipart messages larger than 2GB in the embedded HTTP server Version 1.7.2 (2020-07-08)
--- a/OrthancFramework/Sources/HttpServer/HttpServer.cpp Wed Aug 19 11:59:02 2020 +0200 +++ b/OrthancFramework/Sources/HttpServer/HttpServer.cpp Wed Aug 19 15:22:03 2020 +0200 @@ -297,10 +297,10 @@ struct mg_connection *connection, const std::string& contentLength) { - int length; + size_t length; try { - length = boost::lexical_cast<int>(contentLength); + length = boost::lexical_cast<size_t>(contentLength); } catch (boost::bad_lexical_cast&) { @@ -323,7 +323,7 @@ return PostDataStatus_Failure; } - assert(r <= length); + assert(static_cast<size_t>(r) <= length); length -= r; pos += r; }