Skip to content

Commit 2fd58c9

Browse files
authored
remove headerLimiter (#6835)
* update smart-servlet to 0.1.3-SNAPSHOT * update aio-enhance to 1.0.3-SNAPSHOT * smart-servlet bugfix * bugfix * update smart-socket to 1.5.6-SNAPSHOT * remove file * update aio-enhance to 1.0.4-SNAPSHOT * 优化代码 * 优化代码 * update smart-socket to 1.5.6 * config threadNum * update smart-socket to 1.5.7-SNAPSHOT * 优化代码 * update smart-socket to 1.5.10-SNAPSHOT * 优化代码 * 优化代码 * 优化代码 * 异常aio-enhance * 优化代码 * 优化代码 * 优化代码 * remove aio-pro * remove headerLimiter
1 parent e5f38b2 commit 2fd58c9

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

frameworks/Java/smart-socket/src/main/java/org/smartboot/http/Bootstrap.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
import org.smartboot.http.server.HttpResponse;
1717
import org.smartboot.http.server.HttpServerHandler;
1818
import org.smartboot.http.server.handler.HttpRouteHandler;
19-
import org.smartboot.http.server.impl.Request;
20-
import org.smartboot.socket.StateMachineEnum;
21-
import org.smartboot.socket.extension.processor.AbstractMessageProcessor;
22-
import org.smartboot.socket.transport.AioSession;
2319

2420
import javax.sql.DataSource;
2521
import java.io.IOException;
@@ -55,22 +51,10 @@ public void handle(HttpRequest request, HttpResponse response) throws IOExceptio
5551
HttpBootstrap bootstrap = new HttpBootstrap();
5652
bootstrap.configuration()
5753
.threadNum(cpuNum)
58-
.headerLimiter(0)
5954
.readBufferSize(1024 * 4)
6055
.writeBufferSize(1024 * 4)
6156
.readMemoryPool(16384 * 1024 * 4)
62-
.writeMemoryPool(10 * 1024 * 1024 * cpuNum, cpuNum)
63-
.messageProcessor(processor -> new AbstractMessageProcessor<>() {
64-
@Override
65-
public void process0(AioSession session, Request msg) {
66-
processor.process(session, msg);
67-
}
68-
69-
@Override
70-
public void stateEvent0(AioSession session, StateMachineEnum stateMachineEnum, Throwable throwable) {
71-
processor.stateEvent(session, stateMachineEnum, throwable);
72-
}
73-
});
57+
.writeMemoryPool(10 * 1024 * 1024 * cpuNum, cpuNum);
7458
bootstrap.httpHandler(routeHandle).setPort(8080).start();
7559
}
7660

frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/Bootstrap.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,10 @@ public static void main(String[] args) {
4242
bootstrap.configuration()
4343
.threadNum(cpuNum)
4444
.bannerEnabled(false)
45-
.headerLimiter(0)
4645
.readBufferSize(1024 * 4)
4746
.writeBufferSize(1024 * 4)
4847
.readMemoryPool(16384 * 1024 * 4)
49-
.writeMemoryPool(10 * 1024 * 1024 * cpuNum, cpuNum)
50-
.messageProcessor(processor -> new AbstractMessageProcessor<>() {
51-
@Override
52-
public void process0(AioSession session, Request msg) {
53-
processor.process(session, msg);
54-
}
55-
56-
@Override
57-
public void stateEvent0(AioSession session, StateMachineEnum stateMachineEnum, Throwable throwable) {
58-
processor.stateEvent(session, stateMachineEnum, throwable);
59-
}
60-
});
48+
.writeMemoryPool(10 * 1024 * 1024 * cpuNum, cpuNum);
6149
bootstrap.setPort(8080)
6250
.httpHandler(new HttpServerHandler() {
6351
@Override

0 commit comments

Comments
 (0)