<commit_before>/*
*	part of regex_ban plugin: set of callbacks being called by ATS
*   as most of the functions are call back this class is more like
*   a collection of static functions
*
*       Vmon: May 2013: Initial version.
*/
#ifndef ATS_EVENT_HANDLER_H
#define ATS_EVENT_HANDLER_H

#define MAX_URL_LENGTH        4096;
#define MAX_UA_LENGTH         4096;
#define MAX_REQUEST_LENGTH    16384;
#define MAX_COOKIE_LENGTH     8192;

class BanjaxContinuation;
class Banjax;

class ATSEventHandler
{
  friend class Banjax;
protected:
  static Banjax* banjax; //As we only have one banjax main object it
  //make sense to have it as an static member. In fact there is no 
  //fundamental different between ATSEventHandler and Banjax,
  //It is just that Banjax is taking care of more high level tasks
  //And ATSEventHandler talks to ATS. that is why they are both
  //friend of each other
  static TSCont global_contp;

public:
  /**
     runs all filters to make decsion based on request header
     <commit_msg>Remove an unused global variable ASTEventHandler::global_contp<commit_after>/*
*	part of regex_ban plugin: set of callbacks being called by ATS
*   as most of the functions are call back this class is more like
*   a collection of static functions
*
*       Vmon: May 2013: Initial version.
*/
#ifndef ATS_EVENT_HANDLER_H
#define ATS_EVENT_HANDLER_H

#define MAX_URL_LENGTH        4096;
#define MAX_UA_LENGTH         4096;
#define MAX_REQUEST_LENGTH    16384;
#define MAX_COOKIE_LENGTH     8192;

class BanjaxContinuation;
class Banjax;

class ATSEventHandler
{
  friend class Banjax;
protected:
  static Banjax* banjax;

public:
  /**
     runs all filters to make decsion based on request header
     
{'fraction_non_alphanumeric': 0.05358182877111241, 'fraction_numerical': 0.0244612696563774, 'mean_word_length': 3.6307277628032346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3914375', 'n_tokens_mistral': 557, 'n_tokens_neox': 529, 'n_words': 215}