Loading ...
Sorry, an error occurred while loading the content.

65741Re: Apache2::Cookie confusing path and domain

Expand Messages
  • Philip M. Gollucci
    Jun 30, 2005
    • 0 Attachment
      Gokul P. Nair wrote:
      > --- "Philip M. Gollucci" <pgollucci@...> wrote:
      >>Crap I missed the missing name.
      >>
      >>Didn't try expires. Its probably a bug.
      >>
      >>If you're interested in fixing it, you'll want to
      >>look at
      >>glue/perl/APR/Request/Cookie.xs
      I found the problem but I'm not sure where to implement the solution in
      the apreq-code base yet.

      Given this:

      my $cookie = APR::Request::Cookie->new($req, name => "foo", value =>
      time(), path => '/cookie');

      print STDERR "$cookie\n";
      print STDERR Dumper $cookie;
      print STDERR "name: " . $cookie->name() . "\n";

      Prints:
      1120197880
      $VAR1 = bless( do{\(my $o = 163598384)}, 'APR::Request::Cookie' );
      name: foo


      the first line should have been

      foo=1120197880; path=/cookie;

      the "as_string()" method being called by "" overloading is apparently
      not the same one as the Apache2::Cookie. The APR::Request::Cookie only
      returns the value not the full stringification.




      --
      END
      ------------------------------------------------------------
      What doesn't kill us can only make us stronger.
      Nothing is impossible.

      Philip M. Gollucci (pgollucci@...) 301.254.5198
      Consultant / http://p6m7g8.net/Resume/resume.shtml
      Senior Developer / Liquidity Services, Inc.
      http://www.liquidityservicesinc.com
    • Show all 25 messages in this topic