my handler is like following:
(defun image-handler ()
(no-cache)
(setf (hunchentoot:content-type) "image/jpeg")
(let ((stream (send-headers)))
(create-image-to-stream some-args stream)))
If I set content-type to application/octet-stream the web-browser
instead of showing an image asks me to save a file to the disk.
As you can see I send an image to stream, yes the handler gets called.
I wonder why some conversion happens? I'll try to return a binary
array from the function.
On Thu, Feb 26, 2009 at 4:06 AM, Leslie P. Polzer <[email protected]> wrote:
>
> On Feb 26, 1:18 am, Andrei Stebakov <[email protected]> wrote:
>
>> (http-request "http://www.mydomain/test/text.img")
>> #(195 191 195 152 195 191 195 160
> ^^^ this looks suspiciously like UTF8 to me.
>
> Can you show us your handler?
>
> Does it help to set the content-type to application/octet-stream?
> Do you return a string or an octet vector from your handler?
> Can you verify that your handler gets called?
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---