On Apr 19, 2007, at 10:11 AM, Rusty Brooks wrote:

I don't believe you can use ns_return with binary data.

By the way, are there any plans to change that? Or make a ns_return_binary or something? I have a lot of code that writes to a file and then does ns_returnfile

ns_write is what you should use for binary data:

set h [subst {HTTP/1.1 200 OK
MIME-Version: 1.0
Server: MoochServer/4.5.0a
Content-Type: image/jpeg
Content-Length: [string length $d]
Connection: close

$d}]
        ns_write $conn $h
    return TCL_OK

so I guess I should do that for my ns_compress code, but anyhow, that's not the problem

-john


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to