[Bese-devel] Re: streaming binary data

Marco Baringer mb at bese.it
Fri Jun 16 08:41:24 UTC 2006


Rtveliashvili Denys <rtvd at mail.ru> writes:

> Hi,
>
> I am looking for a possibility to stream a binary data to user
> instead of HTML.

it only works with mod_lisp and httpd backends atm (it's doable on
portableaserve, but hasn't been done, araneida is more complicated
since araneida assumes characters streams).

what you'll need to do is: 

1) set the request's Content-Type headers using (setf (get-header
response "Content-Type") "application/pdf"); 

2) send the headers before sending any of the data, and after setting
all the interesting headers. use (send-headers response);

3) write the binary data to the response's network-stream. this an
(unsinged-byte 8) stream attached directly to the client's browser (or
apache in the case of mod_lisp).

hth
-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen




More information about the bese-devel mailing list