an infinite loop bug
yeshengchen opened this issue · comments
Ethan commented
if the header exceeds 8192 bytes and the connection is keepalive, the following code will go into an infinite loop.
public class ClientHandler implements Runnable {
......
@Override
public void run() {
OutputStream outputStream = null;
try {
outputStream = this.acceptSocket.getOutputStream();
ITempFileManager tempFileManager = httpd.getTempFileManagerFactory().create();
HTTPSession session = new HTTPSession(httpd, tempFileManager, this.inputStream, outputStream, this.acceptSocket.getInetAddress());
while (!this.acceptSocket.isClosed()) {
session.execute(); //here
}
} catch (Exception e) {
......
} finally {
......
}
}
......
}