descriptor.doLogRequestInReplayLog(request2); inputStream = request2.getStringBufferInputStream();
descriptor.doLogRequestInReplayLog(requestWrapper); inputStream = requestWrapper.getStringBufferInputStream(); } else {   inputStream = request.getInputStream();
    public void doPost( HttpServletRequest request,                        HttpServletResponse response )         throws ServletException, IOException {    	        String user = "admin";        String password = null;        String auth = request.getHeader( "Authorization" );        if ( auth != null ) {            byte[] c = Base64.decode( auth.substring( 6 ).getBytes() );            String s = new String( c );            int p = s.indexOf( ':' );            user = s.substring( 0, p );            password = s.substring( p + 1 );        }                InputStream inputStream = request.getInputStream();		    	// Request logger		Descriptor descriptor = Descriptor.getDescriptorSingleton();    	if( descriptor.allowRequestLogging() ) {        	// Wrap HttpServletRequest, because both request Logger and xmlrpc     		// need the request InputStream, which is consumed when read.    		HttpServletRequestWrapper request2 =     			new HttpServletRequestWrapper(request, /*formEncoding*/ "utf-8" );    		descriptor.doLogRequestInReplayLog(request2);    		inputStream = request2.getStringBufferInputStream();    	}    			byte[] result =            xmlrpc.execute( inputStream, user, password );		response.setContentType( "text/xml" );        response.setContentLength( result.length );        OutputStream output = response.getOutputStream();        output.write( result );        output.flush();    }