You'd also have to account for other XML Content-types, such as application/xml, application/xhtml+xml, application/rdf+xml, and so on.
Something like this might work:
if ($content_type =~ m!(application|text)/(.*\+)?xml!) { # Treat as XML }
In reply to Re^2: xml/html detection script
by dorward
in thread xml/html detection script
by slloyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |