Other Flow Control
The “break” and “continue” statements can be used to restart or exit loop or rules processing.
Inside a while loop, “break” causes execution of the loop to stop. Execution then continues to the statement after the loop. “continue” causes the loop code to restart.
Inside a rule (outside any containing loops), “break” causes execution of the rule to stop. Execution then proceeds to the next TrafficScript rule. “continue” causes the rule to be restarted from the beginning.
For example:
# We're only interested in processing HTTP text/html
# responses...
$mime = http.getResponseHeader( "Content-Type" );
if( !string.startsWith( $mime, "text/html" )) break;
# proceed with processing for text/html...