@Override
  public HttpResponse filterRequest(HttpRequest request, HttpMessageContents contents, HttpMessageInfo messageInfo) {
    if (contents.getBinaryContents().length > threshold) {
      log.warning("Too large request " + messageInfo.getUrl() + ": " + contents.getBinaryContents().length + " bytes");
      if (log.isLoggable(Level.FINEST)) {
        log.finest("Request content: " + contents.getTextContents());
      }
    }
    return null;
  }
@ Override public HttpResponse filterRequest ( HttpRequest request , HttpMessageContents contents , HttpMessageInfo messageInfo ) { if ( contents . getBinaryContents ( ) . length > threshold ) { log . warning ( "Too large request " + messageInfo . getUrl ( ) + ": " + contents . getBinaryContents ( ) . length + " bytes" ) ; if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Request content: " + contents . getTextContents ( ) ) ; } } return null ; }
2 MB