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

Apache: Short Lingering Close #3143

Open
studersi opened this issue May 15, 2024 · 3 comments
Open

Apache: Short Lingering Close #3143

studersi opened this issue May 15, 2024 · 3 comments
Assignees
Labels
2.x Related to ModSecurity version 2.x Platform - Apache

Comments

@studersi
Copy link

Looking through the source code of mod_reqtimeout, I saw that it uses the short-lingering-close request note to considerably shorten the potential duration of a lingering connection close:
https://github.com/apache/httpd/blob/trunk/modules/filters/mod_reqtimeout.c#L329-L335

I did not see this note being used in ModSecurity, though I'm not sure whether this is even applicable for ModSecurity or whether ModSecurity foregoes the lingering close completely.

@studersi studersi added the 2.x Related to ModSecurity version 2.x label May 15, 2024
@airween airween assigned airween and marcstern and unassigned airween and marcstern May 15, 2024
@marcstern
Copy link
Contributor

That mechanism is used to oblige the client to read the answer quicker than normal.
I don't see any reason to do that in ModSecurity, except maybe in hook_connection_early() when the client has too many open connections?

Additional question: Is this behaviour (SecConnReadStateLimit/SecConnWriteStateLimit) still useful?

  1. Many ISP (especially mobile) use Carrier NAT, so many users are using the same IP => blocking genuine users
  2. How does it interact with HTTP/2? You can have many requests in parallel in a single connection => limit not effective

@airween
Copy link
Member

airween commented Oct 14, 2024

@studersi, @marcstern is there any conclusions here?

@marcstern
Copy link
Contributor

I unfortunately have no more info than in my last remark: I don't see any reason to do that in ModSecurity, except maybe in hook_connection_early() when the client has too many open connections?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to ModSecurity version 2.x Platform - Apache
Projects
None yet
Development

No branches or pull requests

3 participants