perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/t/net/perl api.pl
Date Mon, 08 Mar 1999 23:42:57 GMT
dougm       99/03/08 15:42:57

  Modified:    .        Changes ToDo
               src/modules/perl Apache.xs
               t/net/perl api.pl
  Log:
  $r->custom_response will now return the current ErrorDocument
  
  Revision  Changes    Path
  1.267     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.266
  retrieving revision 1.267
  diff -u -r1.266 -r1.267
  --- Changes	1999/03/04 15:37:52	1.266
  +++ Changes	1999/03/08 23:42:48	1.267
  @@ -8,6 +8,8 @@
   
   =item 1.18_01-dev
   
  +$r->custom_response will now return the current ErrorDocument
  +
   Semicolon support in $r->args [ Eric Cholet <cholet@logilune.com> ]
   
   issue with threads in perl_config.c [ Malcolm Beattie
  
  
  
  1.163     +0 -8      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /home/cvs/modperl/ToDo,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- ToDo	1999/03/04 15:37:52	1.162
  +++ ToDo	1999/03/08 23:42:48	1.163
  @@ -5,21 +5,13 @@
   
   - how to manipulate order of handlers (not just Perl*Handlers)
   
  -- tweak $r->custom_response to return the current ErrorDocument
  -
   - %Files doesnt work, nor does @DirectoryIndex outside of %Location
   
  -- test 5 in t/internal/redirect.t with CGI 2.48.
  -
   - -Duseperlio w/o -Dusesfio, #ifndef PERLIO_IS_STDIO, #define PERLIO_IS_STDIO
   
   - look at mysqlbug script
   
   - win32 socket bug (WSAStartup() needed for each thread?)
  -
  -- solaris troubles when Perl is build with -B/usr/ccs/bin/ but Apache is not
  -
  -- Embperl troubles w/ 1.18 but not 1.17
   
   - Makefile.PL should always push load_modules.pl for 'make test' 
   
  
  
  
  1.72      +11 -12    modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Apache.xs	1999/01/18 03:26:18	1.71
  +++ Apache.xs	1999/03/08 23:42:53	1.72
  @@ -230,12 +230,12 @@
   }
   #endif
   
  -#if MODULE_MAGIC_NUMBER < MMN_132
  -void ap_custom_response(request_rec *r, int status, char *string)
  +static char *custom_response(request_rec *r, int status, char *string)
   {
       core_dir_config *conf = 
   	get_module_config(r->per_dir_config, &core_module);
       int idx;
  +    char *retval = NULL;
   
       if(conf->response_code_strings == NULL) {
           conf->response_code_strings = 
  @@ -245,16 +245,15 @@
       }
   
       idx = index_of_response(status);
  +    retval = conf->response_code_strings[idx];
  +    if (string) {
  +	conf->response_code_strings[idx] = 
  +	    ((is_url(string) || (*string == '/')) && (*string != '"')) ? 
  +		pstrdup(r->pool, string) : pstrcat(r->pool, "\"", string, NULL);
  +    }
   
  -    conf->response_code_strings[idx] = 
  -       ((is_url(string) || (*string == '/')) && (*string != '"')) ? 
  -       pstrdup(r->pool, string) : pstrcat(r->pool, "\"", string, NULL);
  +    return retval;
   }
  -#endif
  -
  -#ifndef custom_response
  -#define custom_response ap_custom_response
  -#endif
   
   static void Apache_terminate_if_done(request_rec *r, int sts)
   {
  @@ -674,8 +673,8 @@
   
   #functions from http_core.c
   
  -void
  -custom_response(r, status, string)
  +char *
  +custom_response(r, status, string=NULL)
       Apache     r
       int status
       char *string
  
  
  
  1.38      +2 -1      modperl/t/net/perl/api.pl
  
  Index: api.pl
  ===================================================================
  RCS file: /home/cvs/modperl/t/net/perl/api.pl,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- api.pl	1999/01/19 22:36:14	1.37
  +++ api.pl	1999/03/08 23:42:55	1.38
  @@ -20,7 +20,7 @@
   my $is_win32 = WIN32;
   $tests += 2 unless $is_win32;
   my $test_get_set = Apache->can('set_handlers') && ($tests += 4);
  -my $test_custom_response = (MODULE_MAGIC_NUMBER >= 19980324) && $tests++;
  +my $test_custom_response = (MODULE_MAGIC_NUMBER >= 19980324) && ($tests += 2);
   my $test_dir_config = $INC{'Apache/TestDirectives.pm'} && ($tests += 9);
   
   my $i;
  @@ -190,6 +190,7 @@
   #just make sure we can call this one
   if($test_custom_response) {
       test ++$i, $r->custom_response(403, "no chance") || 1;
  +    test ++$i, $r->custom_response(403) =~ /chance/;
   }
   
   if($test_get_set) {
  
  
  

Mime
View raw message