You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Csongor Fagyal <co...@conceptonline.hu> on 2003/01/09 15:21:12 UTC

Compress::Zlib

Hi,

This might be a bit off-topic.

I am using Compress::Zlib in Apache::ASP to give me compressed content 
baceuse I am transfering lots of XML data periodically. Now the 
question: how can I fetch zipped content using Perl? If I simply use LWP 
(say LWP::Request::Common), will it automatically tell the server that 
it can accept gzipped encoding? Do I have to set that manually? (It it 
possible at all?)

Another, less off-topic :-)

If I have an include, say include.asp which contains something like
my $variable;
this variable is visible in example.asp if I do
<!--#include file="include.asp"-->
in it.

Will this behaviour change if I se DynamicIncludes to 1?

- Csongor


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Compress::Zlib

Posted by Josh Chamas <jo...@chamas.com>.
Csongor Fagyal wrote:
> Hi,
> 
> This might be a bit off-topic.
> 
> I am using Compress::Zlib in Apache::ASP to give me compressed content 
> baceuse I am transfering lots of XML data periodically. Now the 
> question: how can I fetch zipped content using Perl? If I simply use LWP 
> (say LWP::Request::Common), will it automatically tell the server that 
> it can accept gzipped encoding? Do I have to set that manually? (It it 
> possible at all?)

If you set

          Accept-Encoding: gzip

as an client HTTP header, then you would get gzip output.
But then you might be stuck ungzipping the document body.

> 
> Another, less off-topic :-)
> 
> If I have an include, say include.asp which contains something like
> my $variable;
> this variable is visible in example.asp if I do
> <!--#include file="include.asp"-->
> in it.
> 
> Will this behaviour change if I se DynamicIncludes to 1?
> 

Yes, DynamicIncludes is similar to calling the include as

   <% $Response->Include('include.asp'); %>

So you do not see the variables in the same scope.

The nice thing is that includes can be shared between
scripts and only compiled once per process.

Regards,

Josh

________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org