]> granicus.if.org Git - icinga2/commitdiff
Fix incorrect size of request limits
authorJean Flach <jean-marcel.flach@icinga.com>
Fri, 23 Feb 2018 13:29:18 +0000 (14:29 +0100)
committerJean Flach <jean-marcel.flach@icinga.com>
Fri, 23 Feb 2018 13:44:44 +0000 (14:44 +0100)
refs #6103

lib/remote/httpserverconnection.cpp

index 8a14b00e1edff5d089e37fb4927b0712a951eece..d5837a8560dab469fafad55c24db71226788389a 100644 (file)
@@ -189,14 +189,14 @@ bool HttpServerConnection::ProcessMessage(void)
 
 bool HttpServerConnection::ManageHeaders(HttpResponse& response)
 {
-       static const size_t defaultContentLengthLimit = 1 * 1028 * 1028;
+       static const size_t defaultContentLengthLimit = 1 * 1024 * 1024;
        static const Dictionary::Ptr specialContentLengthLimits = new Dictionary;
-    specialContentLengthLimits->Set("*", 512 * 1028 * 1028);
-       specialContentLengthLimits->Set("config/modify", 512 * 1028 * 1028);
-       specialContentLengthLimits->Set("console", 512 * 1028 * 1028);
-       specialContentLengthLimits->Set("objects/create", 512 * 1028 * 1028);
-       specialContentLengthLimits->Set("objects/modify", 512 * 1028 * 1028);
-       specialContentLengthLimits->Set("objects/delete", 512 * 1028 * 1028);
+    specialContentLengthLimits->Set("*", 512 * 1024 * 1024);
+       specialContentLengthLimits->Set("config/modify", 512 * 1024 * 1024);
+       specialContentLengthLimits->Set("console", 512 * 1024 * 1024);
+       specialContentLengthLimits->Set("objects/create", 512 * 1024 * 1024);
+       specialContentLengthLimits->Set("objects/modify", 512 * 1024 * 1024);
+       specialContentLengthLimits->Set("objects/delete", 512 * 1024 * 1024);
 
        if (m_CurrentRequest.Headers->Get("expect") == "100-continue") {
                String continueResponse = "HTTP/1.1 100 Continue\r\n\r\n";