Re: [AOLSERVER] ns_zlib compress

2007-04-21 Thread John Buckman
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 Since a ns_register_proc uses ns_return, like this: ns_return $conn 200 text/html $html I believe it's bypassing this gzip

Re: [AOLSERVER] ns_zlib compress

2007-04-20 Thread Derek
works for me too on 4.5. since it only compresses adp files when specified server-wide, i wrote a filter based on daniel stasinski's earlier message to automatically gzip static requests (if not already) and serve them. working without a problem. thanks everybody for the help. Quoting

Re: [AOLSERVER] ns_zlib compress

2007-04-20 Thread aT
Thanks everyone , specially Vlad , gzip seems to be working fine on both aolserver 4.0.10 and aolserver 4.5.0 here are my finding which might help others. Aolserver 4.0.10 ns_section ns/server/myserver/adp/compress ns_param enable true ns_param minsize 1024 and put ns_adp_compress 1 before

Re: [AOLSERVER] ns_zlib compress

2007-04-20 Thread John Buckman
I have ns_param gzip on , but do i still need to set some headers ? I don't know. How do i know its gzipping anything ? telnet www.yourwebserver.com 80 And send a GET request. That won't invoke compression unless you include the appropriate Accept-encoding header. You need to sent a

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 76 Derek wrote: works for me too on 4.5. since it only compresses

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

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 work

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 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 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

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

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

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
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-18 Thread aT
I am also waiting for someone to reply to this message. I have ns_param gzip on , but do i still need to set some headers ? How do i know its gzipping anything ? Derek Keller wrote: Quoting Dossy Shiobara [EMAIL PROTECTED]: On 2007.04.11, Ali Salem [EMAIL PROTECTED] wrote: With

Re: [AOLSERVER] ns_zlib compress

2007-04-18 Thread Juan José del Río
aT wrote: I have ns_param gzip on , but do i still need to set some headers ? I don't know. How do i know its gzipping anything ? telnet www.yourwebserver.com 80 And send a GET request. Regards, Juan José -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list,

Re: [AOLSERVER] ns_zlib compress

2007-04-18 Thread Dossy Shiobara
On 2007.04.18, aT [EMAIL PROTECTED] wrote: I am also waiting for someone to reply to this message. I have ns_param gzip on , but do i still need to set some headers ? How do i know its gzipping anything ? You could sniff the network and see that the HTTP response is compressed? AOLserver

Re: [AOLSERVER] ns_zlib compress

2007-04-18 Thread Daniel P. Stasinski
One of the things I did in addition to using gzip in AOLserver is to also pre-gzip all of my static content and use a filter to serve them correctly. ### ns_share gzFilter if { ![info exists gzFilter] } { set gzFilter 0 } if { !$gzFilter } { ns_register_filter postauth GET /*.html

Re: [AOLSERVER] ns_zlib compress

2007-04-18 Thread Jeff Rogers
Juan José del Río wrote: aT wrote: I have ns_param gzip on , but do i still need to set some headers ? I don't know. How do i know its gzipping anything ? telnet www.yourwebserver.com 80 And send a GET request. That won't invoke compression unless you include the appropriate

[AOLSERVER] ns_zlib compress

2007-04-11 Thread Ali Salem
With reference to gzip compression support in aolserver 4.5.0, where should I place the [ns_zlib compress $file_requested] in order to guarantee the compression of every file being requested? Note that I am using ACS 3.4. Excuse my amateur knowledge in this area, and thank you for your help.

Re: [AOLSERVER] ns_zlib compress

2007-04-11 Thread Dossy Shiobara
On 2007.04.11, Ali Salem [EMAIL PROTECTED] wrote: With reference to gzip compression support in aolserver 4.5.0, where should I place the [ns_zlib compress $file_requested] in order to guarantee the compression of every file being requested? Note that I am using ACS 3.4. Excuse my amateur

Re: [AOLSERVER] ns_zlib compress

2007-04-11 Thread Ali Salem
Thank you On 4/11/07, Dossy Shiobara [EMAIL PROTECTED] wrote: On 2007.04.11, Ali Salem [EMAIL PROTECTED] wrote: With reference to gzip compression support in aolserver 4.5.0, where should I place the [ns_zlib compress $file_requested] in order to guarantee the compression of every file

Re: [AOLSERVER] ns_zlib compress

2007-04-11 Thread Derek Keller
Quoting Dossy Shiobara [EMAIL PROTECTED]: On 2007.04.11, Ali Salem [EMAIL PROTECTED] wrote: With reference to gzip compression support in aolserver 4.5.0, where should I place the [ns_zlib compress $file_requested] in order to guarantee the compression of every file being requested? Note that I