orthecreedence / wookie

Asynchronous HTTP server in common lisp
http://wookie.lyonbros.com/
MIT License
189 stars 19 forks source link

send-response, fell through etypecase expression, string, simple-base-string expected #48

Closed nightshade427 closed 10 years ago

nightshade427 commented 10 years ago

How do I send binary data like images with send-response? I get the above error if I try to send binary data with send-response. Does send-response support sending binary data, like this :body binary-data? Do I have to use start-response?

orthecreedence commented 10 years ago

Can you post your send-response line?

nightshade427 commented 10 years ago

Looks like it expects strings only as body.

https://github.com/orthecreedence/wookie/blob/master/request-response.lisp#L113

Is there a way to add a key parameter to indicate it's already binary?

Basically I'm using wookie as a proxy and processing only certain content, the rest of the context I just forward on (sometimes it's images, CSS, json, etc)

orthecreedence commented 10 years ago

Oh, that's dumb. Patch incoming...

orthecreedence commented 10 years ago

Hey, can you do a pull and test? I didn't get a chance to test extensively, but I think I fixed it. If you pass in a vector, make sure its elements are encoded with type '(unsigned-byte 8)

nightshade427 commented 10 years ago

Sure thing, thanks! I will pull it tonight and report back.

nightshade427 commented 10 years ago

worked flawless!! thanks :)

orthecreedence commented 10 years ago

Good to hear!