httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie Apache__Cookie.h Cookie_pm
Date Wed, 12 Nov 2003 19:29:36 GMT
joes        2003/11/12 11:29:36

  Modified:    glue/perl/t/apreq cookie.t
               glue/perl/t/response/TestApReq cookie.pm
               glue/perl/xsbuilder/Apache/Cookie Apache__Cookie.h Cookie_pm
  Log:
  Fix segfault in apreq_xs_cookie_set_attr-replace sv -> SvRV(sv); corresponding simple
cookie test added. Also remove bogus Devel::Peek from Cookie_pm.
  
  Revision  Changes    Path
  1.6       +8 -1      httpd-apreq-2/glue/perl/t/apreq/cookie.t
  
  Index: cookie.t
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/apreq/cookie.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- cookie.t	13 Jul 2003 17:54:59 -0000	1.5
  +++ cookie.t	12 Nov 2003 19:29:36 -0000	1.6
  @@ -7,10 +7,17 @@
   use Apache::TestRequest qw(GET_BODY GET_HEAD);
   use HTTP::Cookies;
   
  -plan tests => 5;
  +plan tests => 6;
   
   my $location = "/TestApReq__cookie";
   
  +{
  +    my $test  = 'new';
  +    my $value = 'bar';
  +    ok t_cmp($value,
  +             GET_BODY("$location?test=new"),
  +             $test);
  +}
   {
       my $test  = 'netscape';
       my $key   = 'apache';
  
  
  
  1.7       +11 -1     httpd-apreq-2/glue/perl/t/response/TestApReq/cookie.pm
  
  Index: cookie.pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/response/TestApReq/cookie.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- cookie.pm	17 Jul 2003 02:59:33 -0000	1.6
  +++ cookie.pm	12 Nov 2003 19:29:36 -0000	1.7
  @@ -11,7 +11,6 @@
   use Apache::Cookie ();
   use Apache::Request ();
   
  -
   sub handler {
       my $r = shift;
       my $req = Apache::Request->new($r);
  @@ -29,6 +28,17 @@
               $cookies{$key}->bake2;
           }
           $r->print($cookies{$key}->value);
  +    }
  +    else {
  +        my $cookie = Apache::Cookie->new($r, name => "foo",
  +                                            value => "bar");
  +        if ($test eq "bake") {
  +            $cookie->bake;
  +        }
  +        elsif ($test eq "bake2") {
  +            $cookie->bake2;
  +        }
  +        $r->print($cookie->value);
       }
   
   
  
  
  
  1.16      +1 -1      httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Apache__Cookie.h
  
  Index: Apache__Cookie.h
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Apache__Cookie.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Apache__Cookie.h	17 Oct 2003 14:23:29 -0000	1.15
  +++ Apache__Cookie.h	12 Nov 2003 19:29:36 -0000	1.16
  @@ -154,7 +154,7 @@
           XSRETURN_UNDEF;
   
       c = apreq_value_to_cookie(apreq_xs_sv2(cookie,ST(0)));
  -    p = apreq_env_pool(apreq_xs_sv2env(ST(0)));
  +    p = apreq_env_pool(apreq_xs_sv2env(SvRV(ST(0))));
   
       for (j = 1; j + 1 < items; j += 2) {
           STRLEN alen, vlen;
  
  
  
  1.11      +0 -1      httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Cookie_pm
  
  Index: Cookie_pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Cookie_pm,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Cookie_pm	15 Jul 2003 13:15:10 -0000	1.10
  +++ Cookie_pm	12 Nov 2003 19:29:36 -0000	1.11
  @@ -12,7 +12,6 @@
   
   
   package Apache::Cookie;
  -use Devel::Peek;
   
   sub jar {
       my $self = shift;
  
  
  

Mime
View raw message