#include #include "cgiResult.h" class WritableToCgiResult : public TransformImpl { public: void transform(const WritableContent * wc, CgiResult * cr) const { cr->header->addHeader("Content-Type", Glib::ustring::compose("%1; charset=%2", wc->getContentType(), cr->encoding)); cr->header->addHeader("Cache-control", "no-cache"); cr->header->render(cr->stream); wc->writeTo(cr->stream, cr->encoding); } }; DECLARE_TRANSFORM(WritableToCgiResult);