To validate against an object's HTTP headers, add a Custom action and a Validate action to the script.
Add the Custom action at the beginning of the step where the specific object will be downloaded. Use the
indexOf() function to specify the object for which you want to capture the HTTP header.
Add the Validate action at the end of the step. Make sure the match text in the Validate action does not exist in the source of the step's object.
The sample code below uses the object
'. The matching text is '
validate_error if an object's response code contains HIT.