You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jason Leidigh <jl...@uol.com.ar> on 2000/12/21 20:31:46 UTC

Transfering Headers... w/ miltiple 'Set_Cookie'

Hi,

I have a problem with a "procy" I'm writing.  The proxy mut pass the headers from the response to the response that the Apache will return to the client.  I am using the following method as read from The Egal Book (Writing Apache Modules....)

        $headers->scan(sub {
                                $r->header_out(@_);
                                });

Where $headers is a HTTP::Response object... the problem is that there are many Set-Cookie instructions in $headers but mod_perl seems to use a tied hash to link to the request table and so each set cookie replaces the last as the hash key is seen to equal....?  How do I get around this....I tried:

$r->headers_out->add('Set-Cookie' => $cookieString);

Inside a loop which modifies $cookieString each time through but it had the same effect.  In the end Apache sens you a single cookie which is equivelent to the last set.....

Thanks in advance......

Jason

PS I am still waiting for a good sugguestion on how to protect code:

I have a mod_perl module which I would like to protect.  The code is very "private" and I would like to have it exist only as perl byte code... which can be used each time the server may be restarted... is this possible?  How?  Thanks in advance and to those wo responded to may last question "Help me beat Java..." 

The goal is not to prevent decompiling which seemed to be one persons sugguestion using obfuscation...but simply to make it impossible to open and read the .pm. Make it a prcompiled Perl Byte Code which Apache can insert into its parent and child processes whithout expecting a raw perl script which requires compiling.......

Jason Z. Leidigh
Project Leader
UOL Internacional
Av.Libertador 1068 - Piso 3
Capital Federal - ( C1112ABN )
Buenos Aires - Argentina
T.E: 0054-11-5777-2446
Fax:      0054-11-5777-2402
www.uol.com.ar
jleidigh@uol.com.ar

Jason Z. Leidigh
Project Leader
UOL Internacional
Av.Libertador 1068 - Piso 3
Capital Federal - ( C1112ABN )
Buenos Aires - Argentina
T.E: 0054-11-5777-2446
Fax:      0054-11-5777-2402
www.uol.com.ar
jleidigh@uol.com.ar