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
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
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
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
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
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
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 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
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
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
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
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
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
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
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
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,
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
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
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
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.
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
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
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
23 matches
Mail list logo