You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Brian Mearns <me...@gmail.com> on 2009/04/13 18:19:41 UTC

Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

On Mon, Apr 13, 2009 at 11:53 AM, Arabinda Sahoo <Ar...@s1.com> wrote:
> Hi,
>
> My Apache Web Server is compression enabled using – MOD_DEFLATE module.
>
> It works fine except when the folloing URL is invoked.
>
> https://punirtweb1/acweb/servlet/ViewPage?outputType=ROI&outputname=%2fs1%2fBtmu%2fGiroDetails%2eroi&id=10&serverurl=http%3a%2f%2fpunirtapp1%3a8000&connectionHandle=s7whmBpUho%2btg5MUYUgZxq1%2brbtKHLkAq7RmnwSbegyRYEMWxKx8m0pEgUAaXCZHB8OyjFlgo4wmr6%2bgY7wBuIMEv18lQxjMqYBDZL6PJauwr3iZqoReZ6WDG2wLwrh9Vj99AyqFYQrZpg%3d%3d&volume=punirtapp1&closex=false&%5f%5fexecutableid=680&saveoutput=false&format=DHTML&page=1&scalingfactor=100
>
> Then when using Fiddler to view Response Header – it gives Content-Encoding
> as Null.
>
> I have added a screenshot here too.
>
> So, my IE7 browser is not able to open it up – although it’s a text/html –
> gzipped file.
>
> Please note that the URL says – format=DHTML.
>
> How can I make it work?
>
> Content-Encoding:
>
> Appreciate your help on this.
>
> Regards
>
> Arabinda


Quoting:
> Please note that the URL says – format=DHTML.
That's irrelevant to us...it's a parameter to your applet, not to the
server, unless you've specifically configured your server to look for
that. My guess is one of the arguments your passing in the URL are
telling your application to set the content-encoding, and it's doing
it wrong, in which case no-one here can help you. If you have strong
reason to believe that your application is not responsible, then get
back to us and let us know why you think that.

Cheers,
-Brian


-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by André Warnier <aw...@ice-sa.com>.
Arabinda Sahoo wrote:
> Yes, I can always indentify my URL where Content-Encoding="" by a pattern.

Good, that is something we might be able to use.
> 
> Basically the application is Actuate Reports version 8.

You already mentioned that. But you should not assume that the rest of 
the world knows what "Actuate Reports version 8" actually is. I have no 
idea if this is a cgi-bin that you wrote yourself, a PHP application you 
downloaded from the web, a java application running on some java servlet 
engine to which you proxy with Apache (that's a guess), or whatever.

> 
> The URL for this page which doesn't set header properly - is https://punirtweb1/acweb/servlet/ViewPage?outputType=ROI&outputname=%2fs1%2fBtmu%2fGiroDetails%2eroi&id=10&serverurl=http%3a%2f%2fpunirtapp1%3a8000&connectionHandle=s7whmBpUho%2btg5MUYUgZxq1%2brbtKHLkAq7RmnwSbegyRYEMWxKx8m0pEgUAaXCZHB8OyjFlgo4wmr6%2bgY7wBuIMEv18lQxjMqYBDZL6PJauwr3iZqoReZ6WDG2wLwrh9Vj99AyqFYQrZpg%3d%3d&volume=punirtapp1&closex=false&%5f%5fexecutableid=680&saveoutput=false&format=DHTML&page=1&scalingfactor=100

That's an internal URL that does not help us a lot.

> 
> I can identify all these pages - by "format=DHTML" in the URL string.
> Also, there is a server URL involved " serverurl=http://...."

Good, that is something we might be able to use.
> 
> Actuate Report Server has its own servlets to create content and set type and send them. It is a paginated report - first page, next page etc - type - text/html

"servlets" sounds java, which sounds back-end servlet engine. Tomcat ?
We really need to pull out these things from you one by one, don't we ?
:-(

So, these are URLs that your front-end Apache is proxying to another 
server at the back-end. It even looks like there may be even another hop 
behind.

What you (and we) would really need to know, is if that back-end itself 
sends any kind of headers that could interfere with mod_deflate doing 
it's job and setting headers properly.

Is there any chance that you can access that back-end server directly, 
without going through Apache, and see what you then get as HTTP headers 
back ?
(All of them, not just the content-encoding one).

Can you also tell us /how/ the Apache front-end passes these request to 
the back-end ? in other words, if you are doing proxying, with what ?


Else you could try the following :

SetEnvIf Request_URI "format=DHTML" when-bad
Header unset Content-Encoding env=when-bad
Header set Content-Encoding "gzip" env=when-bad

One issue is that there is an order in which various output filters are 
called by Apache, and I am not quite sure whether the DEFLATE filter is 
called before or after the Headers filter.
Maybe the order in which you specify them in the apache conf file 
matters, so I would try the lines above, either before, or after the
SetOutputFilter DEFLATE


But it's a bit like groping in the dark at this stage..
Nick is probably going to mumble again (and he'll be right).

Now also just in case : if your back-end server is Tomcat, there exists 
also the possibility of having /it/ compress what it sends back to 
Apache.  And I am quite sure that if Apache gets something that is 
already compressed, DEFLATE is smart enough not to do it again.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Arabinda Sahoo <Ar...@S1.com>.
Yes, I can always indentify my URL where Content-Encoding="" by a pattern.

Basically the application is Actuate Reports version 8.

The URL for this page which doesn't set header properly - is https://punirtweb1/acweb/servlet/ViewPage?outputType=ROI&outputname=%2fs1%2fBtmu%2fGiroDetails%2eroi&id=10&serverurl=http%3a%2f%2fpunirtapp1%3a8000&connectionHandle=s7whmBpUho%2btg5MUYUgZxq1%2brbtKHLkAq7RmnwSbegyRYEMWxKx8m0pEgUAaXCZHB8OyjFlgo4wmr6%2bgY7wBuIMEv18lQxjMqYBDZL6PJauwr3iZqoReZ6WDG2wLwrh9Vj99AyqFYQrZpg%3d%3d&volume=punirtapp1&closex=false&%5f%5fexecutableid=680&saveoutput=false&format=DHTML&page=1&scalingfactor=100

I can identify all these pages - by "format=DHTML" in the URL string.
Also, there is a server URL involved " serverurl=http://...."

Actuate Report Server has its own servlets to create content and set type and send them. It is a paginated report - first page, next page etc - type - text/html

1) Fiddler - header for the above page
   Content-Encoding:

2) For other pages
   Content-Encoding: gzip

So, how can I force this in Apache?


Regards,
Arabinda

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Wednesday, May 06, 2009 3:16 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Arabinda Sahoo wrote:
> Yes, Andre. 
> 
> MOD_DEFLATE setting as done in my httpd.conf as follows - perfectly does - one part of work - which is - Compression - for all Pages.
> 
> <Location />
>    SetOutputFilter DEFLATE
>    SetEnvIfNoCase Request_URI \
>       \.(?:gif|jpe?g|png|tar)$ no-gzip dont-vary
> </Location>
> 
> And also it does set "Content-Encoding=gzip" (Which I can see using "Fiddler" tool) - 90% of the time.
> 
> But for 10% of my pages - the Compression happens, but Content-Encoding="" is set. I can check this using Fiddler again.
> 
> I will tend to think that it is an Apache issue.
> Because, my application is not aware that - Apache compression has been enabled.
> 
> And if Apache is indeed compressing a page, now whose responsibility it becomes - to set the Content-Encoding=gzip???
> 
> Apache is not behaving as expected.
> So, IE7 explorer cannot recognize this as a compressed page and fails.
> 
> I am happy to send you and Nick the entire httpd.conf file - if attachments are allowed in this forum.
> 
Ok, taking all that you write above at face value,
is there /something/ (URL, size, type, whatever) that distinguishes the 
10% of pages that result in a 'Content-encoding: "" ' header, from the 
others ?

Also, can you give us a short explanation of how these pages are being 
generated ?  I mean what is the application that generates them, where 
does it live, how does Apache get that content, etc..
And does that application /ever/ by itself generate compressed content ?

Can you give us an example of the response headers in both cases (copy 
and paste from Fiddler) ?

I'm just plucking at straws here, trying to figure out the reason for 
the 10%..


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by André Warnier <aw...@ice-sa.com>.
Arabinda Sahoo wrote:
> Yes, Andre. 
> 
> MOD_DEFLATE setting as done in my httpd.conf as follows - perfectly does - one part of work - which is - Compression - for all Pages.
> 
> <Location />
>    SetOutputFilter DEFLATE
>    SetEnvIfNoCase Request_URI \
>       \.(?:gif|jpe?g|png|tar)$ no-gzip dont-vary
> </Location>
> 
> And also it does set "Content-Encoding=gzip" (Which I can see using "Fiddler" tool) - 90% of the time.
> 
> But for 10% of my pages - the Compression happens, but Content-Encoding="" is set. I can check this using Fiddler again.
> 
> I will tend to think that it is an Apache issue.
> Because, my application is not aware that - Apache compression has been enabled.
> 
> And if Apache is indeed compressing a page, now whose responsibility it becomes - to set the Content-Encoding=gzip???
> 
> Apache is not behaving as expected.
> So, IE7 explorer cannot recognize this as a compressed page and fails.
> 
> I am happy to send you and Nick the entire httpd.conf file - if attachments are allowed in this forum.
> 
Ok, taking all that you write above at face value,
is there /something/ (URL, size, type, whatever) that distinguishes the 
10% of pages that result in a 'Content-encoding: "" ' header, from the 
others ?

Also, can you give us a short explanation of how these pages are being 
generated ?  I mean what is the application that generates them, where 
does it live, how does Apache get that content, etc..
And does that application /ever/ by itself generate compressed content ?

Can you give us an example of the response headers in both cases (copy 
and paste from Fiddler) ?

I'm just plucking at straws here, trying to figure out the reason for 
the 10%..


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Arabinda Sahoo <Ar...@S1.com>.
Yes, Andre. 

MOD_DEFLATE setting as done in my httpd.conf as follows - perfectly does - one part of work - which is - Compression - for all Pages.

<Location />
   SetOutputFilter DEFLATE
   SetEnvIfNoCase Request_URI \
      \.(?:gif|jpe?g|png|tar)$ no-gzip dont-vary
</Location>

And also it does set "Content-Encoding=gzip" (Which I can see using "Fiddler" tool) - 90% of the time.

But for 10% of my pages - the Compression happens, but Content-Encoding="" is set. I can check this using Fiddler again.

I will tend to think that it is an Apache issue.
Because, my application is not aware that - Apache compression has been enabled.

And if Apache is indeed compressing a page, now whose responsibility it becomes - to set the Content-Encoding=gzip???

Apache is not behaving as expected.
So, IE7 explorer cannot recognize this as a compressed page and fails.

I am happy to send you and Nick the entire httpd.conf file - if attachments are allowed in this forum.


Regards,
Arabinda

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Wednesday, May 06, 2009 2:46 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Nick Kew wrote:
> On 6 May 2009, at 08:41, Arabinda Sahoo wrote:
> 
>> Actually I have a compelling reason to set - Content-Encoding to gzip 
>> - for performance improvement.
> 
> For ****s sake, take a step back!
> 
> There's no way Apache makes such a meal of this.  You have either a very 
> broken
> application or a very confused configuration.  Maybe both.
> 
>> Although Compression is set for Apache - DEFLATE module, a few Pages 
>> which are rendered by Actuate 8 report server - don't honour them.
> 
> That just doesn't make sense (maybe English isn't your first language?).
> What are you expecting of mod_deflate, and how is it not performing?
> 
>> As per you - I tried - mod_headers - but unsuccessfully
>> (Although Apache doc for mod_headers say that  - these settings take 
>> effect just before it is sent over the network!!!!)
> 
> mod_headers should not be necessary for this.  It adds to your complexity.
> 
> Bottom line: for contents that are stored compressed on the server, use
> AddEncoding.  For contents compressed on the fly, use mod_deflate.
> For anything else, RTFM and tell us why you're not using standard 
> solutions.
> 
Hi Nick.
No need to get upset.
As I understand the issue now (and as stated above by the OP), 
mod_deflate seems to be doing fine in most cases.
However, it also seems that /some/ pages which are rendered by something 
("Actuate 8 report server", which I have no idea what it is) are 
actually compressed (?), but do /not/ come out with the correct 
content-encoding.
 From all that, I gather (now) that these specific pages are not static, 
but generated on-the-fly (Arabinda, is that right ?).
So the question now would be : is there something (in the URI used to 
request such a page for example) that allows to distinguish it from 
other pages that do work ?
And does the problem concern /all/ the pages produced by that "Actuate 8 
report server", or just some of them ?


Also (for Nick), while we are at it, /why/ would it be that a 
content-encoding response header set unconditionally by mod_headers 
would not come out ?
(the OP earlier posted the "Header" line used.)





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Nick Kew <ni...@webthing.com>.
On 6 May 2009, at 10:16, André Warnier wrote:

> Also (for Nick), while we are at it, /why/ would it be that a  
> content-encoding response header set unconditionally by mod_headers  
> would not come out ?
> (the OP earlier posted the "Header" line used.)

mod_deflate will check content-encoding, to avoid nonsense like  
compressing
already-gzipped contents.

If you're *also* messing with mod_headers, that could screw with  
mod_deflate.

-- 
Nick Kew
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by André Warnier <aw...@ice-sa.com>.
Nick Kew wrote:
> On 6 May 2009, at 08:41, Arabinda Sahoo wrote:
> 
>> Actually I have a compelling reason to set - Content-Encoding to gzip 
>> - for performance improvement.
> 
> For ****s sake, take a step back!
> 
> There's no way Apache makes such a meal of this.  You have either a very 
> broken
> application or a very confused configuration.  Maybe both.
> 
>> Although Compression is set for Apache - DEFLATE module, a few Pages 
>> which are rendered by Actuate 8 report server - don't honour them.
> 
> That just doesn't make sense (maybe English isn't your first language?).
> What are you expecting of mod_deflate, and how is it not performing?
> 
>> As per you - I tried - mod_headers - but unsuccessfully
>> (Although Apache doc for mod_headers say that  - these settings take 
>> effect just before it is sent over the network!!!!)
> 
> mod_headers should not be necessary for this.  It adds to your complexity.
> 
> Bottom line: for contents that are stored compressed on the server, use
> AddEncoding.  For contents compressed on the fly, use mod_deflate.
> For anything else, RTFM and tell us why you're not using standard 
> solutions.
> 
Hi Nick.
No need to get upset.
As I understand the issue now (and as stated above by the OP), 
mod_deflate seems to be doing fine in most cases.
However, it also seems that /some/ pages which are rendered by something 
("Actuate 8 report server", which I have no idea what it is) are 
actually compressed (?), but do /not/ come out with the correct 
content-encoding.
 From all that, I gather (now) that these specific pages are not static, 
but generated on-the-fly (Arabinda, is that right ?).
So the question now would be : is there something (in the URI used to 
request such a page for example) that allows to distinguish it from 
other pages that do work ?
And does the problem concern /all/ the pages produced by that "Actuate 8 
report server", or just some of them ?


Also (for Nick), while we are at it, /why/ would it be that a 
content-encoding response header set unconditionally by mod_headers 
would not come out ?
(the OP earlier posted the "Header" line used.)





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Nick Kew <ni...@webthing.com>.
On 6 May 2009, at 08:41, Arabinda Sahoo wrote:

> Actually I have a compelling reason to set - Content-Encoding to  
> gzip - for performance improvement.

For ****s sake, take a step back!

There's no way Apache makes such a meal of this.  You have either a  
very broken
application or a very confused configuration.  Maybe both.

> Although Compression is set for Apache - DEFLATE module, a few  
> Pages which are rendered by Actuate 8 report server - don't honour  
> them.

That just doesn't make sense (maybe English isn't your first language?).
What are you expecting of mod_deflate, and how is it not performing?

> As per you - I tried - mod_headers - but unsuccessfully
> (Although Apache doc for mod_headers say that  - these settings  
> take effect just before it is sent over the network!!!!)

mod_headers should not be necessary for this.  It adds to your  
complexity.

Bottom line: for contents that are stored compressed on the server, use
AddEncoding.  For contents compressed on the fly, use mod_deflate.
For anything else, RTFM and tell us why you're not using standard  
solutions.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Arabinda Sahoo <Ar...@S1.com>.
Hi,
Thanks.


Actually I have a compelling reason to set - Content-Encoding to gzip - for performance improvement.

Although Compression is set for Apache - DEFLATE module, a few Pages which are rendered by Actuate 8 report server - don't honour them.

As per you - I tried - mod_headers - but unsuccessfully 
(Although Apache doc for mod_headers say that  - these settings take effect just before it is sent over the network!!!!)

So, who is changing my header?

Okay, I will try see - mod_perl and install it and see what else can I do.
Please guide me once you are back next week.


Regards
Arabinda

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Wednesday, May 06, 2009 12:49 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Arabinda Sahoo wrote:
> 
> Hi,
> 
> Thanks for the more detailed reply.
> Yes, I think that Content-Encoding may be of a category of "Content-Type".
> So, it will be useful for me at lease try the mod_perl once.
> 
> So, could you please let me know - what all you did?
> Steps for using mod_perl?
> And your sample code where you are setting "Content-Type" to the type you want.
> 
I will not have the time this week anymore. Next week is better.
Just this for now :

If you have no prior exposure to mod_perl : mod_perl is a very powerful 
piece of software, allowing one to really do interesting things with 
Apache, things you could not do with anything else apart from writing 
your own Apache add-on modules in C.  I personally love it and use it on 
all my servers.  But there are implications :
- it has a learning curve (perl, for instance)
- it can be heavy on the server (memory)
- it may or may not be easy to install, depending on the platform (and I 
don't know about AIX).

So, if mod_perl is not yet installed on your machine (*), and before you 
go in that direction :
- really make sure first that you have the problem well-understood, and 
that the other alternatives do not work
- find out what is needed to install perl and mod_perl on your AIX 
machine (for example, if there exists some standard package under the 
AIX package manager)

(*) the first line in the Apache error log after restarting Apache, will 
tell you so. If mod_perl is installed, it will show up like this :

Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_jk/1.2.18 PHP/4.4.4-8+etch4 
mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 configured -- 
resuming normal operations

In other words, if modifying this Content-encoding response header is 
all you ever want to do with mod_perl, I am not sure that I would 
recommend installing mod_perl just for that.
Unless it is a really critical issue, and you have really no solution 
with standard Apache modules.

If after all the above, you decide to persist, then I will gladly try to 
help you, because I cannot resist trying to convince someone else of the 
beauties of mod_perl. But I will not be able to do that before next week.
In the meantime then, install perl and mod_perl, and start reading the 
documentation, here :
http://perl.apache.org/
and here :
http://perl.apache.org/docs/2.0/user/index.html


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by André Warnier <aw...@ice-sa.com>.
Arabinda Sahoo wrote:
> 
> Hi,
> 
> Thanks for the more detailed reply.
> Yes, I think that Content-Encoding may be of a category of "Content-Type".
> So, it will be useful for me at lease try the mod_perl once.
> 
> So, could you please let me know - what all you did?
> Steps for using mod_perl?
> And your sample code where you are setting "Content-Type" to the type you want.
> 
I will not have the time this week anymore. Next week is better.
Just this for now :

If you have no prior exposure to mod_perl : mod_perl is a very powerful 
piece of software, allowing one to really do interesting things with 
Apache, things you could not do with anything else apart from writing 
your own Apache add-on modules in C.  I personally love it and use it on 
all my servers.  But there are implications :
- it has a learning curve (perl, for instance)
- it can be heavy on the server (memory)
- it may or may not be easy to install, depending on the platform (and I 
don't know about AIX).

So, if mod_perl is not yet installed on your machine (*), and before you 
go in that direction :
- really make sure first that you have the problem well-understood, and 
that the other alternatives do not work
- find out what is needed to install perl and mod_perl on your AIX 
machine (for example, if there exists some standard package under the 
AIX package manager)

(*) the first line in the Apache error log after restarting Apache, will 
tell you so. If mod_perl is installed, it will show up like this :

Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_jk/1.2.18 PHP/4.4.4-8+etch4 
mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 configured -- 
resuming normal operations

In other words, if modifying this Content-encoding response header is 
all you ever want to do with mod_perl, I am not sure that I would 
recommend installing mod_perl just for that.
Unless it is a really critical issue, and you have really no solution 
with standard Apache modules.

If after all the above, you decide to persist, then I will gladly try to 
help you, because I cannot resist trying to convince someone else of the 
beauties of mod_perl. But I will not be able to do that before next week.
In the meantime then, install perl and mod_perl, and start reading the 
documentation, here :
http://perl.apache.org/
and here :
http://perl.apache.org/docs/2.0/user/index.html


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Arabinda Sahoo <Ar...@S1.com>.

Hi,

Thanks for the more detailed reply.
Yes, I think that Content-Encoding may be of a category of "Content-Type".
So, it will be useful for me at lease try the mod_perl once.

So, could you please let me know - what all you did?
Steps for using mod_perl?
And your sample code where you are setting "Content-Type" to the type you want.

Thanks in advance.



Regards,
Arabinda

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Tuesday, May 05, 2009 9:30 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Arabinda Sahoo wrote:
> Hi Andre,
> 
> Can you send me the real good nuanced answer?
> 
:-)

Well, it might take a lot of time to get this right.
mod_headers is the general solution for setting headers.

But a first issue if that not all HTTP response headers can be set this 
way.  I know that for example the Content-Type is a different animal, 
because no matter what you do, Apache will reset it anyway.  the same 
may be true with Content-encoding, I just don't know.

Then the second aspect is that by setting this header with mod_headers, 
you probably would set it "too much", indiscriminately, for all pages in 
the same location, and not all your content necessarily matches that.
So you'll need to play with SetEnvIf and only do it in some cases, probably.

In a similar case before, I had to resort to a mod_perl output filter, 
to do this right.  This was with the Content-type header though, so I'm 
not really sure it is necessary in this case.

Is this nuanced enough ?



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by André Warnier <aw...@ice-sa.com>.
Arabinda Sahoo wrote:
> Hi Andre,
> 
> Can you send me the real good nuanced answer?
> 
:-)

Well, it might take a lot of time to get this right.
mod_headers is the general solution for setting headers.

But a first issue if that not all HTTP response headers can be set this 
way.  I know that for example the Content-Type is a different animal, 
because no matter what you do, Apache will reset it anyway.  the same 
may be true with Content-encoding, I just don't know.

Then the second aspect is that by setting this header with mod_headers, 
you probably would set it "too much", indiscriminately, for all pages in 
the same location, and not all your content necessarily matches that.
So you'll need to play with SetEnvIf and only do it in some cases, probably.

In a similar case before, I had to resort to a mod_perl output filter, 
to do this right.  This was with the Content-type header though, so I'm 
not really sure it is necessary in this case.

Is this nuanced enough ?



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Arabinda Sahoo <Ar...@S1.com>.
Hi Andre,

Can you send me the real good nuanced answer?

Appreciate your help?

Regards,
Arabinda

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Tuesday, May 05, 2009 4:56 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Arabinda Sahoo wrote:
> Hi Brians,
> It's been sometime on this issue for me to respond.
> How can my application override the Content-Encoding setting done by
> Apache?
> 
http://httpd.apache.org/docs/2.2/mod/mod_headers.html
(that's a short answer, the real good answer is probably more nuanced)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Arabinda Sahoo <Ar...@S1.com>.
So, can you please give me an example, how to use this Header command.

I put it in my "Location" block as follows

Header set Content-Encoding "gzip"

But it is still showing "Content-Encoding" ""

How can I tell Apache to set Content-Encoding to "gzip" - just before it is sent back over the Network - protocol stack - so that my application cannot change it?

Please help.

Regards,
Arabinda

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Tuesday, May 05, 2009 4:56 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Arabinda Sahoo wrote:
> Hi Brians,
> It's been sometime on this issue for me to respond.
> How can my application override the Content-Encoding setting done by
> Apache?
> 
http://httpd.apache.org/docs/2.2/mod/mod_headers.html
(that's a short answer, the real good answer is probably more nuanced)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by André Warnier <aw...@ice-sa.com>.
Arabinda Sahoo wrote:
> Hi Brians,
> It's been sometime on this issue for me to respond.
> How can my application override the Content-Encoding setting done by
> Apache?
> 
http://httpd.apache.org/docs/2.2/mod/mod_headers.html
(that's a short answer, the real good answer is probably more nuanced)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled - Content-Encoding for a page - shows blank - although it's gzip encoded

Posted by Arabinda Sahoo <Ar...@S1.com>.
Hi Brians,
It's been sometime on this issue for me to respond.
How can my application override the Content-Encoding setting done by
Apache?

I believe Apache sets this header after doing compression.
The issue is Apache is doing compression and the "Content-Encoding"
header is not getting set.

Can we by some means force this through Apache?

I found that - by forcibly changing the "Content-Encoding=gzip" using
Fiddler Web Proxy - it works properly.

So, is there a server-side method - a light-weight web-proxy or another
way Apache can handle it?

Thanks and Regards,
Arabinda
-----Original Message-----
From: Brian Mearns [mailto:mearns.b@gmail.com] 
Sent: Monday, April 13, 2009 9:50 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache/2.0.47 - AIX - DEFLATE enabled -
Content-Encoding for a page - shows blank - although it's gzip encoded

On Mon, Apr 13, 2009 at 11:53 AM, Arabinda Sahoo <Ar...@s1.com>
wrote:
> Hi,
>
> My Apache Web Server is compression enabled using - MOD_DEFLATE
module.
>
> It works fine except when the folloing URL is invoked.
>
>
https://punirtweb1/acweb/servlet/ViewPage?outputType=ROI&outputname=%2fs
1%2fBtmu%2fGiroDetails%2eroi&id=10&serverurl=http%3a%2f%2fpunirtapp1%3a8
000&connectionHandle=s7whmBpUho%2btg5MUYUgZxq1%2brbtKHLkAq7RmnwSbegyRYEM
WxKx8m0pEgUAaXCZHB8OyjFlgo4wmr6%2bgY7wBuIMEv18lQxjMqYBDZL6PJauwr3iZqoReZ
6WDG2wLwrh9Vj99AyqFYQrZpg%3d%3d&volume=punirtapp1&closex=false&%5f%5fexe
cutableid=680&saveoutput=false&format=DHTML&page=1&scalingfactor=100
>
> Then when using Fiddler to view Response Header - it gives
Content-Encoding
> as Null.
>
> I have added a screenshot here too.
>
> So, my IE7 browser is not able to open it up - although it's a
text/html -
> gzipped file.
>
> Please note that the URL says - format=DHTML.
>
> How can I make it work?
>
> Content-Encoding:
>
> Appreciate your help on this.
>
> Regards
>
> Arabinda


Quoting:
> Please note that the URL says - format=DHTML.
That's irrelevant to us...it's a parameter to your applet, not to the
server, unless you've specifically configured your server to look for
that. My guess is one of the arguments your passing in the URL are
telling your application to set the content-encoding, and it's doing
it wrong, in which case no-one here can help you. If you have strong
reason to believe that your application is not responsible, then get
back to us and let us know why you think that.

Cheers,
-Brian


-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org