[Klone-users] Unwanted newline added after the header
Petr Cizmar
petr at g.cizmar.org
Mon Sep 29 10:07:25 EDT 2008
Hello,
I'm trying to use klone to output different mime-types, for example PNG
images. Unfortunately klone adds a newline at the beginning of the
output which spoils the integrity of the PNG file. My code looks like
this:
response_set_content_type(response, rec->sup_mime_type);
response_set_field(response, "Pragma:", "no-cache");
response_set_field(response, "Cache-Control", "no-cache, no-store, must-revalidate");
response_set_field(response, "Expires:", "Mon, 26 Jul 1997 05:00:00 GMT");
io_codecs_remove(response_io(rs));
response_print_header(response);
do{
len = read(fileno(fi), buffer, CP_BUFF_SIZE);
io_write(out,buffer,len);
} while (len);
Does anybody know what do I do wrong or where could I get some more
information?
Thanks a lot,
Petr
More information about the klone-users
mailing list