Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread John Buckman
Below is a ns_return_gzipped proc that replaces ns_return and sends back gzipped output. It worked fine everywhere, *except* with a debugging http proxy I used (in ActiveState's Komodo) where pages stalled. I was thinking perhaps the problem is that "Connection: close" wasn't being honored

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread Michael Andrews
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

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread Rusty Brooks
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

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread Michael Andrews
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 a

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread Derek
Write the gzip data to a file then do an ns_returnfile. That's what I'm doing. Quoting John Buckman <[EMAIL PROTECTED]>: How do you enable gzip page compression on ns_register_proc pages? The adp gzip compression occurs in C code, in Ns_ConnFlush(), which checks for "Accept-Encoding: gzip" S

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread Rusty Brooks
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 PR

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread Nathan Folkman
I'd have to look again to confirm whether or not ns_return wasn't binary safe, but I wouldn't be surprised. I recently patched ns_http to correctly handle the sending and receiving of binary data. I'll try and take a look at as ns_return next. Would you mind adding this as a bug? Thanks! - n On

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread John Buckman
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

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread Dossy Shiobara
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

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread Rusty Brooks
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 Rusty John Buckman wrote: How do you enable gzip page compression on ns_r

Re: [AOLSERVER] (Resolved) Re: nsthreadtest and segmentation fault

2007-04-19 Thread Nathan Folkman
That's just a hunch about that being the cause, but it is true, AOLserver has not been thoroughly reviewed or tested as to be truly 64-bit clean, so you may see issues. - n On 4/17/07, aT <[EMAIL PROTECTED]> wrote: I found out (thanks to Nathan) that nsthreadtest is crashing on my servers beca

Re: [AOLSERVER] ns_zlib compress

2007-04-19 Thread aT
aolserver 4.0.10 , compressed contents are not browsable in any browser except firefox .. Is this the case with others ? Aolserver 4.5.0 seems fine in all browsers, i checked opera 9+ , Konqueror , Firefox 1.5 and 2, IE 7&6 Derek wrote: works for me too on 4.5. since it only compresses