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

如果doRead()读取到的数据不包含\r\n\r\n,那么后续的doParse()方法应该会忽略这一数据,这是否是一处bug? #3

Open
hhx20120607 opened this issue Mar 21, 2020 · 1 comment

Comments

@hhx20120607
Copy link

如题,例如doRead()读取到的数据很少,极端情况下仅包含方法的一部分,那么doDecode()将会直接抛出异常,而这种情况应该也会存在的。

@94fzb
Copy link
Owner

94fzb commented Mar 24, 2020

@hhx20120607 说的很对,存在被恶意利用的情况,那么你认为的处理办法是?怎样认为非法请求(客户端一直不发送 \r\n\r\n),比如设置一个超时,用定时器清理掉这种连接?还是有更好的办法?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants