Forum Discussion
Kevin_Stewart
Dec 10, 2013Employee
You could go either I think, but you'd more or less have to define all page objects or all non-page objects, or at least object extensions. Here's an example that defines non-page objects from a data group.
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] ends_with objectlist] } {
set do_not_err 1
}
}
when HTTP_RESPONSE {
if { [info exists do_not_err] } {
unset do_not_err
return
} elseif { ( [HTTP::status] starts_with "40" ) or ( [HTTP::status] starts_with "50" ) } {
HTTP::respond 200 content "Broken"
}
}
where objectlist is a string-based data group that contains the lowercased extensions of known object types that you might encounter on a page. Example.
jpg
gif
png
js
css