Implementing handling for cases in which non-XML content is returned