Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an infinite loop bug #621

Open
yeshengchen opened this issue Feb 9, 2022 · 0 comments
Open

an infinite loop bug #621

yeshengchen opened this issue Feb 9, 2022 · 0 comments

Comments

@yeshengchen
Copy link

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 {
            ......
        }
    }
    ......
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant