Skip to content

Commit 124c050

Browse files
committed
更新http package size 为4MB
1 parent b0cccd8 commit 124c050

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cetty-core/src/cetty/handler/codec/http/HttpPackageDecoder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ using namespace cetty::handler::codec;
4242

4343
const int HttpPackageDecoder::MAX_INITIAL_LINE_LENGTH = 4096;
4444
const int HttpPackageDecoder::MAX_HEADER_SIZE = 8192;
45-
const int HttpPackageDecoder::MAX_CHUNK_SIZE = 655350;
45+
const int HttpPackageDecoder::MAX_CHUNK_SIZE = 4 * 1024 * 1024;
4646

4747
HttpPackageDecoder::HttpPackageDecoder(DecodingType decodingType)
4848
: isDecodingRequest_(decodingType == REQUEST),

include/cetty/handler/codec/http/HttpServerCodec.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class HttpServerCodec : private boost::noncopyable {
6767
* <tt>maxChunkSize (8192)</tt>).
6868
*/
6969
HttpServerCodec()
70-
: requestDecoder_(HttpPackageDecoder::REQUEST, 4096, 8192, 8192) {
70+
: requestDecoder_(HttpPackageDecoder::REQUEST, 4096, 8192, 8 * 1024 * 1024) {
7171
init();
7272
}
7373

0 commit comments

Comments
 (0)