Ignore request instrumentation when accept header is not targeting HTML page

Description

Currently we are always instrumenting the HTML response in order to check if the response should be modified and our small spinet added.

If the implementation is following the Servlet API then we are skipping the injection if we can read that the returned type is not html/xml (this is not the case with DVD store that is setting the content type header later).

However, we could completely skip the instrumentation of the response if he see that the requested content is not html page. For example:

This should save lot of performance overhead, especially that usually number of non-HTML requests is higher than the HTML pages.

We should check if the request accept header contains html or xml, should be enough.

Environment

None

Status

Assignee

Jonas Kunz

Reporter

Ivan Senic

Labels

None

Pull Request

None

Integrator

None

Sprint

None

Fix versions

Affects versions

Priority

High
Configure