protected int checkRequestHeader(){
  int retVal=0;
  debug.message("{}.checkRequestHeader:",ADAPTIVE);
  HttpServletRequest req=getHttpServletRequest();
  if (req != null) {
    Enumeration<String> eHdrs=req.getHeaderNames();
    while (eHdrs.hasMoreElements()) {
      String header=eHdrs.nextElement();
      if (reqHeaderName.equalsIgnoreCase(header)) {
        if (debug.messageEnabled()) {
          debug.message("{}.checkRequestHeader: Found header: {}",ADAPTIVE,header);
        }
        if (reqHeaderValue != null) {
          Enumeration<String> eVals=req.getHeaders(header);
          while (eVals.hasMoreElements()) {
            String val=eVals.nextElement();
            if (reqHeaderValue.equalsIgnoreCase(val)) {
              if (debug.messageEnabled()) {
                debug.message("{}.checkRequestHeader: Found header Value: {}",ADAPTIVE,val);
              }
              retVal=reqHeaderScore;
            }
          }
        }
 else {
          retVal=reqHeaderScore;
        }
        break;
      }
    }
  }
  if (!reqHeaderInvert) {
    retVal=reqHeaderScore - retVal;
  }
  return retVal;
}

protected int checkRequestHeader ( ) { int retVal = 0 ; debug . message ( "{}.checkRequestHeader:" , ADAPTIVE ) ; HttpServletRequest req = getHttpServletRequest ( ) ; if ( req != null ) { Enumeration < String > eHdrs = req . getHeaderNames ( ) ; while ( eHdrs . hasMoreElements ( ) ) { String header = eHdrs . nextElement ( ) ; if ( reqHeaderName . equalsIgnoreCase ( header ) ) { if ( debug . messageEnabled ( ) ) { debug . message ( "{}.checkRequestHeader: Found header: {}" , ADAPTIVE , header ) ; } if ( reqHeaderValue != null ) { Enumeration < String > eVals = req . getHeaders ( header ) ; while ( eVals . hasMoreElements ( ) ) { String val = eVals . nextElement ( ) ; if ( reqHeaderValue . equalsIgnoreCase ( val ) ) { if ( debug . messageEnabled ( ) ) { debug . message ( "{}.checkRequestHeader: Found header Value: {}" , ADAPTIVE , val ) ; } retVal = reqHeaderScore ; } } } else { retVal = reqHeaderScore ; } break ; } } } if ( ! reqHeaderInvert ) { retVal = reqHeaderScore - retVal ; } return retVal ; }
check to see if the client has a cookie with optional value
