protected boolean matchBodyPattern ( HttpMessage msg , Pattern pattern , StringBuilder sb ) { // ZAP: Changed the type of the parameter "sb" to StringBuilder. Matcher matcher = pattern . matcher ( msg . getResponseBody ( ) . toString ( ) ) ; boolean result = matcher . find ( ) ; if ( result ) { if ( sb != null ) { sb . append ( matcher . group ( ) ) ; } } return result ; }
Check if the given pattern can be found in the msg body . If the supplied StringBuilder is not null append the result to the StringBuilder .