---- david delbecq <[EMAIL PROTECTED]> schrieb:
> Hello,
> 
> we would like to disable the extension filter of tomahawk from within a 
> component. The main reason is that the component's purpose is to create 
> binary output instead of text output, using context.responseComplete() 
> and request.reset()
> 
> However, the filter tries to parse and correct the response, replacing 
> bytes in the begin of response bye &#....; entities, then after 5 lines 
> stopping it with an error (saying it doesn't look like html, it stops 
> the parsing). As a result, begin of binary output is corrupted....
> 
> Is there a way to tell to tomahawk filter *not* to parse response from 
> within component?
> 

The ExtensionsFilter ignores any output that does not have an http content-type 
header with one of these types:

        return contentType.startsWith("text/html") ||
                contentType.startsWith("text/xml") ||
                contentType.startsWith("application/xhtml+xml") ||
                contentType.startsWith("application/xml");

So it appears that your code is serving up binary data but is still marking the 
page as being "text/html" or similar, which is wrong. Fix this and the 
ExtensionsFilter problem should go away.

Regards, 
Simon

Reply via email to