stas        2003/02/19 15:55:23

  Modified:    .        Changes
               lib/Apache compat.pm
               t/response/TestCompat apache.pm
               xs/Apache/Response Apache__Response.h
               xs/maps  modperl_functions.map
               xs/tables/current/ModPerl FunctionTable.pm
  Log:
  move $r->send_http_header implementation to Apache::compat.  This
  allows the 1.0 code to run unmodified if $r->send_http_header is
  called before the response change. we already handle the check whether
  content_type was set, when deciding whether the headers are to be
  parsed inside modperl_wbucket_pass().
  
  Revision  Changes    Path
  1.130     +6 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- Changes   19 Feb 2003 14:14:35 -0000      1.129
  +++ Changes   19 Feb 2003 23:55:22 -0000      1.130
  @@ -10,6 +10,12 @@
   
   =item 1.99_09-dev
   
  +move $r->send_http_header implementation to Apache::compat.  This
  +allows the 1.0 code to run unmodified if $r->send_http_header is
  +called before the response change. we already handle the check whether
  +content_type was set, when deciding whether the headers are to be
  +parsed inside modperl_wbucket_pass(). [Stas]
  +
   fixes to Apache::compat. make $r->connection->auth_type interface
   with r->ap_auth_type. make both $r->connection->auth_type and
   $r->connection->user writable. [Geoffrey Young]
  
  
  
  1.81      +5 -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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- compat.pm 19 Feb 2003 14:14:36 -0000      1.80
  +++ compat.pm 19 Feb 2003 23:55:23 -0000      1.81
  @@ -154,6 +154,11 @@
       return Apache::current_callback();
   }
   
  +sub send_http_header {
  +    my ($r, $type) = @_;
  +    $r->content_type($type) if defined $type;
  +}
  +
   #to support $r->server_root_relative
   *server_root_relative = \&Apache::server_root_relative;
   
  
  
  
  1.5       +3 -0      modperl-2.0/t/response/TestCompat/apache.pm
  
  Index: apache.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/apache.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apache.pm 17 Feb 2003 09:03:17 -0000      1.4
  +++ apache.pm 19 Feb 2003 23:55:23 -0000      1.5
  @@ -55,3 +55,6 @@
   
   1;
   
  +__END__
  +# so we can test whether send_httpd_header() works fine
  +PerlOptions +ParseHeaders
  
  
  
  1.9       +0 -22     modperl-2.0/xs/Apache/Response/Apache__Response.h
  
  Index: Apache__Response.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Response/Apache__Response.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Apache__Response.h        17 Jan 2003 02:26:31 -0000      1.8
  +++ Apache__Response.h        19 Feb 2003 23:55:23 -0000      1.9
  @@ -13,28 +13,6 @@
       rcfg->wbucket->header_parse = 0; \
   }
   
  -/* XXX: should only be part of Apache::compat */
  -static MP_INLINE void
  -mpxs_Apache__RequestRec_send_http_header(pTHX_ request_rec *r,
  -                                         const char *type)
  -{
  -    MP_dRCFG;
  -
  -    if (type) {
  -        ap_set_content_type(r, apr_pstrdup(r->pool, type));
  -    }
  -
  -    if (rcfg->wbucket) {
  -        /* turn off PerlOptions +ParseHeaders */
  -        rcfg->wbucket->header_parse = 0; 
  -    }
  -    else {
  -        /* the response is not initialized yet */
  -        Perl_croak(aTHX_ "send_http_header() can't be called before "
  -                   "the response phase");
  -    }
  -}
  -
   static MP_INLINE void
   mpxs_Apache__RequestRec_set_last_modified(request_rec *r, apr_time_t mtime)
   {
  
  
  
  1.54      +0 -1      modperl-2.0/xs/maps/modperl_functions.map
  
  Index: modperl_functions.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- modperl_functions.map     17 Feb 2003 09:03:17 -0000      1.53
  +++ modperl_functions.map     19 Feb 2003 23:55:23 -0000      1.54
  @@ -56,7 +56,6 @@
   
   MODULE=Apache::Response   PACKAGE=Apache::RequestRec
   DEFINE_send_cgi_header | | request_rec *:r, SV *:buffer
  - mpxs_Apache__RequestRec_send_http_header | | r, type=NULL
    mpxs_Apache__RequestRec_set_last_modified | | r, mtime=0
   
   
  
  
  
  1.105     +0 -18     modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- FunctionTable.pm  31 Jan 2003 04:20:20 -0000      1.104
  +++ FunctionTable.pm  19 Feb 2003 23:55:23 -0000      1.105
  @@ -5529,24 +5529,6 @@
       ]
     },
     {
  -    'return_type' => '',
  -    'name' => 'mpxs_Apache__RequestRec_send_http_header',
  -    'args' => [
  -      {
  -        'type' => 'PerlInterpreter *',
  -        'name' => 'my_perl'
  -      },
  -      {
  -        'type' => 'request_rec *',
  -        'name' => 'r'
  -      },
  -      {
  -        'type' => 'const char *',
  -        'name' => 'type'
  -      }
  -    ]
  -  },
  -  {
       'return_type' => 'int',
       'name' => 'mpxs_Apache__RequestRec_OPEN',
       'args' => [
  
  
  


Reply via email to