tests/utils/monitor/org/apache/test/Response.java
/**
     * On platforms other than windows the CRLF's can get "helpfully" converted
     * So, check the last two digits for CRLF - if they are LFLF then this is
     * wrong and we will convert it to be correct. e.g. 0a 0a converts to 0d0a
     * 0d0a
     */
On platforms other than windows the CRLF's can get "helpfully" converted
So, check the last two digits for CRLF - if they are LFLF then this is
wrong and we will convert it to be correct.
On platforms other than windows the CRLF ' s can get " helpfully " converted So check the last two digits for CRLF - if they are LFLF then this is wrong and we will convert it to be correct .
private void CheckAndCorrectCRLF( )
    {
        String modifiedResponse="";
        if (chunked)
        {
            System.out.println("Information - Response is chunked.");
            String messageString= new String(getMessage());
            modifiedResponse = correctHTTPHeaderSection(messageString);
            if (messageString.indexOf("###") != -1)
                modifiedResponse +=(correctChunkedSizes(getPostHTTPHeaderData(messageString)));
            else
                modifiedResponse +=(correctChunkedData(getPostHTTPHeaderData(messageString)));
            message = modifiedResponse.toCharArray();
        }
        else
        {
            System.out.println("Information - Response is NOT chunked.");    
            if (System.getProperty("os.name").toLowerCase( ).startsWith("windows"))
                System.out.println("Windows operating system - not converting crlf's");
            else
            {
                String request=new String(getMessage( ));
                modifiedResponse = correctHTTPHeaderSection(request);
                message=modifiedResponse.toCharArray();
            }
        }
    }
private void CheckAndCorrectCRLF ( ) { String modifiedResponse = "" ; if ( chunked ) { System . out . println ( "Information - Response is chunked." ) ; String messageString = new String ( getMessage ( ) ) ; modifiedResponse = correctHTTPHeaderSection ( messageString ) ; if ( messageString . indexOf ( "###" ) != - 1 ) modifiedResponse += ( correctChunkedSizes ( getPostHTTPHeaderData ( messageString ) ) ) ; else modifiedResponse += ( correctChunkedData ( getPostHTTPHeaderData ( messageString ) ) ) ; message = modifiedResponse . toCharArray ( ) ; } else { System . out . println ( "Information - Response is NOT chunked." ) ; if ( System . getProperty ( "os.name" ) . toLowerCase ( ) . startsWith ( "windows" ) ) System . out . println ( "Windows operating system - not converting crlf's" ) ; else { String request = new String ( getMessage ( ) ) ; modifiedResponse = correctHTTPHeaderSection ( request ) ; message = modifiedResponse . toCharArray ( ) ; } } }
On platforms other than windows the CRLF's can get "helpfully" converted
 So, check the last two digits for CRLF - if they are LFLF then this is
 wrong and we will convert it to be correct.
On platforms other than windows the CRLF ' s can get " helpfully " converted So check the last two digits for CRLF - if they are LFLF then this is wrong and we will convert it to be correct .