# HG changeset patch # User Sebastien Jodogne # Date 1597843323 -7200 # Node ID 36257d6f348f1145c3bf1da63497934434dd3a70 # Parent 8c559dd5034b1fa2ae8e5195ece7ab744f803a20 Support of multipart messages larger than 2GB in the embedded HTTP server diff -r 8c559dd5034b -r 36257d6f348f NEWS --- 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) diff -r 8c559dd5034b -r 36257d6f348f OrthancFramework/Sources/HttpServer/HttpServer.cpp --- 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(contentLength); + length = boost::lexical_cast(contentLength); } catch (boost::bad_lexical_cast&) { @@ -323,7 +323,7 @@ return PostDataStatus_Failure; } - assert(r <= length); + assert(static_cast(r) <= length); length -= r; pos += r; }