Sorry to dig this one out of the past, but I'm trying to put together
a little site under Dreamhost using CGI/FastCGI and having some fun.
Ran into this problem when setting 2 or more cookies and this fix
resolved that issue nicely until I followed the cookies with a
redirect.  Doing this reverted to the original problem so I went
searching the CGI.pm module and discovered that this same fix needed
to be applied to the "sub redirect" method as well.  Now its working
like a champ and I wanted to pass this info on as this issue still
remains unfixed as of CGI version 3.41.  So if you have cookie funny
business and are running under CGIhandler you may wish to apply this
fix.

In a nutshell, 'SET-COOKIE' needs to be added to the rearrange()
argument list within the array reference that has ['COOKIE',
'COOKIES'] for the sub(s) 'header' and 'redirect'.

On Fri, Oct 13, 2006 at 10:16 AM, John Williams <willi...@tni.com> wrote:
> This is a bug or misfeature in CGI.pm.  I reported it some time ago on
> cpan's bugtracker.
> http://rt.cpan.org/Public/Bug/Display.html?id=15065
>
> You can apply the patch from there if you want mod_perl/CGI compatibility,
> or you can just set the 'Cookie' header instead of 'Set-cookie' and it
> will work.
>
> ~ John Williams
>
>
> On Fri, 13 Oct 2006, RJ Herrick wrote:
>
>> I'm using a Mason::CGIHandler and trying to set multiple cookie headers
>> in a single response.
>>
>> Looking into and toying with HTML::Mason::FakeApache->headers_out->add,
>> it seems that multiple identical ('Set-cookie') headers will turn the
>> value into an array ref, which it seems is simply sent stringified as
>> the value, instead of each value as a separate header. This produces one
>> nameless cookie with ARRAY(0xYADDDDA) as the value instead of two
>> distinct cookies.
>>
>> RJ Herrick
>>
>>
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Mason-users mailing list
>> Mason-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mason-users
>>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>



-- 
Jonathan Craig

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to