>> This object does some basic things for generating XML, hence the >> content_type. This, again, works fine. Now the problem - if an >> unexisting action for this "XML subclass" is requested, the AUTOLOAD >> kicks in. The AUTOLOAD sets the content-type back to HTML >> ($r->content_type('text/html')) but this is completely ignored...
Solved my own problem, but thought sharing would be good... Apparently it was not the content_type call that was ignored. What happens is that Apache does an add_output_filter_by_type on each call to ap_set_content_type (which is the Apache equivalent of $r->content_type). Output filters are however never removed... So if you have (like I did) an output filter for a specific type then this happens: $r->content_type('my/type'); # content_type set AND output filter added $r->content_type('text/html'); # content_type changed, output filter REMAINS I don't know if this behaviour is as one would expect and it certainly is not a discussion for this list (as it is standard Apache behaviour) but worth to know... Thanks Frank W. for sharing your thoughts. Regards, Frank M.