3 ms·
I can see you've spent a lot of time thinking about things like slowloris. What do you think of the approach that redbean takes? https://justine.lol/redbean/ind
by jart 6y ago
I can see you've spent a lot of time thinking about things like slowloris. What do you think of the approach that redbean takes? https://justine.lol/redbean/index.html https://justine.lol/redbean/index.html It still needs more unit tests, but basically what it has is a meltdown mode so that when fork() starts to fail it sends SIGUSR2 to the process group to EINTR recv() calls so that lingering processes can exit gracefully. Its parser also isn't cubic, so even for a fragmented messages, it only needs to consider each character a single time: https://github.com/jart/cosmopolitan/blob/master/net/http/parsehttprequest.c https://github.com/jart/cosmopolitan/blob/master/net/http/pa...