You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@hyperreal.org on 1998/09/01 19:42:10 UTC

cvs commit: modperl/src/modules/perl Apache.xs Log.xs mod_perl.h

dougm       98/09/01 10:42:10

  Modified:    .        Changes ToDo
               src/modules/perl Apache.xs Log.xs mod_perl.h
  Log:
  use 1.3.2-dev+'s ap_custom_response() when possible
  
  Revision  Changes    Path
  1.127     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- Changes	1998/09/01 17:21:30	1.126
  +++ Changes	1998/09/01 17:42:05	1.127
  @@ -8,6 +8,8 @@
   
   =item 1.15_01-dev
   
  +use 1.3.2-dev+'s ap_custom_response() when possible
  +
   remove Apache::DESTROY method (was only for avoiding old AutoLoader bug)
   
   Apache::exit fixed under Apache::PerlRun
  
  
  
  1.73      +0 -2      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /export/home/cvs/modperl/ToDo,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- ToDo	1998/09/01 17:12:51	1.72
  +++ ToDo	1998/09/01 17:42:05	1.73
  @@ -248,8 +248,6 @@
   change cgi_header_out and send_cgi_header to use new
   ap_scan_script_header_err_core function 
   
  -$r->custom_response can use ap_custom_response (new in 1.3.2-dev)
  -
   ---------------------------------------------------------------------------
   OPTIMIZATIONS
   ---------------------------------------------------------------------------
  
  
  
  1.52      +26 -25    modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- Apache.xs	1998/09/01 17:21:32	1.51
  +++ Apache.xs	1998/09/01 17:42:07	1.52
  @@ -269,6 +269,32 @@
   }
   #endif
   
  +#if MODULE_MAGIC_NUMBER < MMN_132
  +void ap_custom_response(request_rec *r, int status, char *string)
  +{
  +    core_dir_config *conf = 
  +	ap_get_module_config(r->per_dir_config, &core_module);
  +    int idx;
  +
  +    if(conf->response_code_strings == NULL) {
  +        conf->response_code_strings = 
  +	    ap_pcalloc(r->pool,
  +		    sizeof(*conf->response_code_strings) * 
  +		    RESPONSE_CODES);
  +    }
  +
  +    idx = ap_index_of_response(status);
  +
  +    conf->response_code_strings[idx] = 
  +       ((ap_is_url(string) || (*string == '/')) && (*string != '"')) ? 
  +       ap_pstrdup(r->pool, string) : ap_pstrcat(r->pool, "\"", string, NULL);
  +}
  +#endif
  +
  +#ifndef custom_response
  +#define custom_response ap_custom_response
  +#endif
  +
   static void Apache_terminate_if_done(request_rec *r, int sts)
   {
   #ifndef WIN32
  @@ -649,31 +675,6 @@
       int status
       char *string
       
  -    PREINIT:
  -    core_dir_config *conf;
  -    int type, idx500;
  -
  -    CODE:
  -#if defined(WIN32) && (MODULE_MAGIC_NUMBER < 19980324)
  -    croak("Need 1.3b6+ for Apache->custom_response under win32!");
  -#else
  -    idx500 = index_of_response(HTTP_INTERNAL_SERVER_ERROR);
  -    conf = get_module_config(r->per_dir_config, &core_module);
  -
  -    if(conf->response_code_strings == NULL) {
  -        conf->response_code_strings = 
  -	    pcalloc(r->pool,
  -		    sizeof(*conf->response_code_strings) * 
  -		    RESPONSE_CODES);
  -    }
  -
  -    type = index_of_response(status);
  -
  -    conf->response_code_strings[type] = 
  -       ((is_url(string) || (*string == '/')) && (*string != '"')) ? 
  -       pstrdup(r->pool, string) : pstrcat(r->pool, "\"", string, NULL);
  -#endif
  -
   int
   satisfies(r)
       Apache     r
  
  
  
  1.4       +1 -1      modperl/src/modules/perl/Log.xs
  
  Index: Log.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Log.xs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Log.xs	1998/09/01 17:00:05	1.3
  +++ Log.xs	1998/09/01 17:42:07	1.4
  @@ -4,7 +4,7 @@
   #include "modules/perl/mod_perl.h"
   #endif
   
  -#if MODULE_MAGIC_NUMBER >= 19980806
  +#if MODULE_MAGIC_NUMBER >= MMN_132
   #define HAVE_LOG_RERROR 1
   #else
   #define HAVE_LOG_RERROR 0
  
  
  
  1.44      +1 -0      modperl/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- mod_perl.h	1998/08/29 01:11:49	1.43
  +++ mod_perl.h	1998/09/01 17:42:07	1.44
  @@ -387,6 +387,7 @@
   /* once 1.3.0 is here, we can toss most of this junk */
   
   #define MMN_130 19980527
  +#define MMN_132 19980806
   #if MODULE_MAGIC_NUMBER >= MMN_130
   #define HAVE_APACHE_V_130
   #endif