question: public static void checkHTTPRequestLength ( HttpServletRequest request ) throws ServletException { int maxContentLength = SAMLUtils . getMaxContentLength ( ) ; if ( maxContentLength != 0 ) { int length = request . getContentLength ( ) ; if ( length == - 1 ) { throw new ServletException ( bundle . getString ( "unknownLength" ) ) ; } if ( length > maxContentLength ) { if ( debug . messageEnabled ( ) ) { debug . message ( "FSUtils.checkHTTPRequestLength: " + "content length too large" + length ) ; } throw new ServletException ( bundle . getString ( "largeContentLength" ) ) ; } } }
target:  Checks content length of a http request to avoid dos attack. In case IDFF inter-op with other IDFF vendor who may not provide content length in HttpServletRequest. We decide to support no length restriction for Http communication. Here, we use a special value (e.g. 0) to indicate that no enforcement is required.