[BUG] tarpit did not work anymore
Tarpit was broken by recent splitting of analysers. It would still
let the connection go to the server due to a missing buffer_write_dis().
Also, it was performed too late (after content switching rules).
diff --git a/src/session.c b/src/session.c
index 6983212..3e7484d 100644
--- a/src/session.c
+++ b/src/session.c
@@ -823,18 +823,18 @@
break;
}
- if (s->req->analysers & AN_REQ_HTTP_INNER) {
- last_ana |= AN_REQ_HTTP_INNER;
- if (!http_process_request(s, s->req, AN_REQ_HTTP_INNER))
- break;
- }
-
if (s->req->analysers & AN_REQ_HTTP_TARPIT) {
last_ana |= AN_REQ_HTTP_TARPIT;
if (!http_process_tarpit(s, s->req, AN_REQ_HTTP_TARPIT))
break;
}
+ if (s->req->analysers & AN_REQ_HTTP_INNER) {
+ last_ana |= AN_REQ_HTTP_INNER;
+ if (!http_process_request(s, s->req, AN_REQ_HTTP_INNER))
+ break;
+ }
+
if (s->req->analysers & AN_REQ_HTTP_BODY) {
last_ana |= AN_REQ_HTTP_BODY;
if (!http_process_request_body(s, s->req, AN_REQ_HTTP_BODY))