agent/wpthook/requests.cc
/*-----------------------------------------------------------------------------
  See if the beginning of the bugger matches any known HTTP method
  TODO: See if there is a more reliable way to detect HTTP traffic
-----------------------------------------------------------------------------*/
See if the beginning of the bugger matches any known HTTP method
TODO: See if there is a more reliable way to detect HTTP traffic
See if the beginning of the bugger matches any known HTTP method TODO : See if there is a more reliable way to detect HTTP traffic
bool Requests::IsHttpRequest(const DataChunk& chunk) const {
  bool ret = false;
  for (int i = 0; i < _countof(HTTP_METHODS) && !ret; i++) {
    const char * method = HTTP_METHODS[i];
    unsigned long method_len = strlen(method);
    if (chunk.GetLength() >= method_len &&
        !memcmp(chunk.GetData(), method, method_len)) {
      ret = true;
    }
  }
  return ret;
}
bool Requests :: IsHttpRequest ( const DataChunk & chunk ) const { bool ret = false ; for ( int i = 0 ; i < _countof ( HTTP_METHODS ) && ! ret ; i ++ ) { const char * method = HTTP_METHODS [ i ] ; unsigned long method_len = strlen ( method ) ; if ( chunk . GetLength ( ) >= method_len && ! memcmp ( chunk . GetData ( ) , method , method_len ) ) { ret = true ; } } return ret ; }
See if the beginning of the bugger matches any known HTTP method
TODO: See if there is a more reliable way to detect HTTP traffic
See if the beginning of the bugger matches any known HTTP method TODO : See if there is a more reliable way to detect HTTP traffic