Re: [Cppcms-users] HTTP response and binary stream (libharu)
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2015-09-18 19:27:26
|
As BTW is shown in this example: http://libharu.sourceforge.net/how_to_use.html#Save_a_document_to_file_ Why? std::ostream assumes that buf is NUL terminated string so it would stop on NUL, and this what corrupts the stream. You need to use std::ostream::write, i.e. out().write(buf,siz) |