dougm       02/05/13 18:14:19

  Modified:    .        Changes
               lib/Apache compat.pm
               t/response/TestApache compat2.pm
               xs/Apache/URI Apache__URI.h
               xs/maps  apache_functions.map
  Log:
  add Apache::Util::unescape_uri alias to Apache::unescape_url in Apache::compat
  
  change Apache::unescape_url to return the escaped url as 1.x does
  
  Revision  Changes    Path
  1.10      +4 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Changes   14 May 2002 00:27:16 -0000      1.9
  +++ Changes   14 May 2002 01:14:19 -0000      1.10
  @@ -10,6 +10,10 @@
   
   =item 1.99_02-dev
   
  +add Apache::Util::unescape_uri alias to Apache::unescape_url in Apache::compat
  +
  +change Apache::unescape_url to return the escaped url as 1.x does
  +
   disabled term coloring by default (enable with env var APACHE_TEST_COLOR=1)
   
   fix for APR::IpSubnet->new to check return status apr_ipsubnet_create
  
  
  
  1.42      +3 -0      modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- compat.pm 12 May 2002 23:48:16 -0000      1.41
  +++ compat.pm 14 May 2002 01:14:19 -0000      1.42
  @@ -26,6 +26,7 @@
   use Apache::RequestUtil ();
   use Apache::Response ();
   use Apache::Log ();
  +use Apache::URI ();
   use APR::Table ();
   use APR::Pool ();
   use APR::URI ();
  @@ -383,6 +384,8 @@
   
       return $size;
   }
  +
  +*unescape_uri = \&Apache::unescape_url;
   
   sub Apache::URI::parse {
       my($class, $r, $uri) = @_;
  
  
  
  1.6       +12 -1     modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- compat2.pm        11 Apr 2002 11:08:44 -0000      1.5
  +++ compat2.pm        14 May 2002 01:14:19 -0000      1.6
  @@ -24,7 +24,7 @@
   sub handler {
       my $r = shift;
   
  -    plan $r, tests => 33;
  +    plan $r, tests => 35;
   
       $r->send_http_header('text/plain');
   
  @@ -187,6 +187,17 @@
               ok t_cmp($v, Apache::Util::size_string($k));
           }
       }
  +
  +    my $uri = "http://foo.com/a%20file.html";;
  +    my $uri2 = $uri;
  +
  +    ok t_cmp(Apache::unescape_url($uri),
  +             Apache::Util::unescape_uri($uri2),
  +             "Apache::URI::unescape_uri vs Apache::Util::unescape_uri");
  +
  +    ok t_cmp($uri,
  +             $uri2,
  +             "Apache::URI::unescape_uri vs Apache::Util::unescape_uri");
   
       OK;
   }
  
  
  
  1.5       +2 -2      modperl-2.0/xs/Apache/URI/Apache__URI.h
  
  Index: Apache__URI.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/Apache/URI/Apache__URI.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Apache__URI.h     19 Aug 2001 17:33:32 -0000      1.4
  +++ Apache__URI.h     14 May 2002 01:14:19 -0000      1.5
  @@ -9,7 +9,7 @@
       return (apr_uri_t *)uri;
   }
   
  -static MP_INLINE int mpxs_ap_unescape_url(pTHX_ SV *url)
  +static MP_INLINE char *mpxs_ap_unescape_url(pTHX_ SV *url)
   {
       int status;
       STRLEN n_a;
  @@ -20,5 +20,5 @@
           SvCUR_set(url, strlen(SvPVX(url)));
       }
   
  -    return status;
  +    return SvPVX(url);
   }
  
  
  
  1.49      +1 -1      modperl-2.0/xs/maps/apache_functions.map
  
  Index: apache_functions.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- apache_functions.map      10 May 2002 17:01:30 -0000      1.48
  +++ apache_functions.map      14 May 2002 01:14:19 -0000      1.49
  @@ -260,7 +260,7 @@
    ap_os_escape_path
   
   MODULE=Apache::URI   PACKAGE=guess
  - ap_unescape_url | mpxs_ | SV *:url
  + char *:ap_unescape_url | mpxs_ | SV *:url
    ap_parse_uri
    ap_construct_url    | | r, uri=r->uri, p=r->pool
    ap_construct_server | | r, hostname=ap_get_server_name(r), \
  
  
  


Reply via email to