Преглед изворни кода

server : allow requests larger than 8K (#4500)

mzcu пре 2 година
родитељ
комит
62bd52b7bf
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      examples/server/server.cpp

+ 2 - 1
examples/server/server.cpp

@@ -10,7 +10,8 @@
 // crash the server in debug mode, otherwise send an http 500 error
 #define CPPHTTPLIB_NO_EXCEPTIONS 1
 #endif
-
+// increase max payload length to allow use of larger context size
+#define CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH 1048576
 #include "httplib.h"
 #include "json.hpp"