Got it. I was skimming the other emails - the jpeg example made be
believe the data was in a file. I was wondering why anyone would read
a file then return $contents. LOL
M
On Apr 19, 2007, at 3:45 PM, Rusty Brooks wrote:
Of course. But naturally there is overhead associated with writing
to a file, then returning it, then deleting it, not to mention
unecessary code. In fact this is what I did, although some years
ago I borrowed a function from someone else that replaced
ns_return, which did a compression step (like, ns_returnz).
Anyway, the fact that there are hacks to get around ns_return's
inability to handle binary data, doesn't mean that it isn't a bug...
Rusty
Michael Andrews wrote:
Can't you just do a ns_returnfile?
M
On Apr 19, 2007, at 2:27 PM, Rusty Brooks wrote:
Excellent. I'd be happy even if it was just a flag or something
like ns_return -binary 200 image/jpeg $mydata
John pointed out to me that you can fake it OK by using ns_write
and doing all the headers and what not yourself.
Rusty
Dossy Shiobara wrote:
On 2007.04.19, Rusty Brooks <[EMAIL PROTECTED]> 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
I'm going to work on making ns_return handle binary data
correctly for
4.5. If it's not too much hassle, I'll backport to 4.0 too.
I'd consider this lack of proper binary handling a bug, FYI.
-- Dossy
--
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.
--
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.
--
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.
--
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.