The title of the question might be a little misleading. I could not quite think about anything better.

Here's my problem. I'm developing an Apache module that must manipulate a little of content within the asked for HTML document (this document could be a file around the disk or might be dynamically produced by CGI or PHP) therefore i am using libxml2 by using it.

I developed something working, but however , once the browser demands for any page, let us say

http://localhost/a.html

the module does it's job. But when that page has references to some javascript file, a.js, or perhaps a stylesheet file, a.css, they aren't getting offered.

The main reason when i perceived by analyzing the logs is the fact that, because the browser transmits demands for any javascript file let us say

[http://localhost/a.js] //putting [] due to limit of just one url per publish.

Apache again runs my module, the module utilizes a HTML parser, then when this content isn't HTML, it gives error and exits, the request is abandoned.

How do i make my module to operate just for text/html demands ?

I'm not sure steps to make your module to say no the request. But when you do not figure how to get it done you can easily configure it in httpd.conf

AddHandler my-handler .html