Daniel Fagerstrom wrote:
Looking at the AbstractProcessingPipeline the getMimeType method of the serializer is called from the setMimeTypeForSerializer method that in turn is called in the beginning of the processXMLPipeline method *before* the generator.generate() method that lead to the actual execution of the serializer. I might be missing something, but AFAICS the call of the setMimeTypeForSerializer method call could be moved to *after* the generator.generate call without changing the result at all.
IIRC, no, this call can't be moved: mime type has to be determined before response is generated, because mime type is part of the response header, which must be serialized before response data is sent out.
Moving this call means delaying sending response header till complete response body is generated and this breaks one of Cocoon's staples -- ability to produce response data and send it to the client before complete response is generated.
Vadim
