perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0 Changes
Date Sat, 08 Mar 2003 09:49:26 GMT
stas        2003/03/08 01:49:26

  Modified:    src/modules/perl mod_perl.c
               .        Changes
  Log:
  remove the limitation of having $r->content_type affecting the cgi header
  parsing to header_parser and higher phase. now any phase before and
  including the response phase can turn the cgi headers parsing off.
  
  Revision  Changes    Path
  1.156     +11 -12    modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.155
  retrieving revision 1.156
  diff -u -r1.155 -r1.156
  --- mod_perl.c	8 Mar 2003 09:15:16 -0000	1.155
  +++ mod_perl.c	8 Mar 2003 09:49:26 -0000	1.156
  @@ -537,6 +537,13 @@
   
       modperl_config_req_init(r, rcfg);
   
  +    /* set the default for cgi header parsing On as early as possible
  +     * so $r->content_type in any phase after header_parser could turn
  +     * it off. wb->header_parse will be set to 1 only if this flag
  +     * wasn't turned off and MpDirPARSE_HEADERS is on
  +     */
  +    MpReqPARSE_HEADERS_On(rcfg);
  +    
       return OK;
   }
   
  @@ -549,17 +556,7 @@
   }
   
   static int modperl_hook_header_parser(request_rec *r)
  -{
  -    MP_dDCFG;
  -
  -    /* set the default for cgi header parsing On (if applicable) as
  -     * early as possible so $r->content_type in any phase after
  -     * header_parser could turn it off */
  -    if (MpDirPARSE_HEADERS(dcfg)) {
  -        MP_dRCFG;
  -        MpReqPARSE_HEADERS_On(rcfg);
  -    }
  -    
  +{    
       /* if 'PerlOptions +GlobalRequest' is inside a container */
       modperl_global_request_cfg_set(r);
   
  @@ -728,6 +725,7 @@
   void modperl_response_init(request_rec *r)
   {
       MP_dRCFG;
  +    MP_dDCFG;
       modperl_wbucket_t *wb;
   
       if (!rcfg->wbucket) {
  @@ -742,7 +740,8 @@
       wb->pool = r->pool;
       wb->filters = &r->output_filters;
       wb->outcnt = 0;
  -    wb->header_parse = MpReqPARSE_HEADERS(rcfg) ? 1 : 0;
  +    wb->header_parse = MpDirPARSE_HEADERS(dcfg) && MpReqPARSE_HEADERS(rcfg)
  +        ? 1 : 0;
       wb->r = r;
   }
   
  
  
  
  1.146     +3 -3      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.145
  retrieving revision 1.146
  diff -u -r1.145 -r1.146
  --- Changes	8 Mar 2003 09:15:16 -0000	1.145
  +++ Changes	8 Mar 2003 09:49:26 -0000	1.146
  @@ -11,9 +11,9 @@
   =item 1.99_09-dev
   
   When PerlOptions +ParseHeaders is an effect, the CGI headers parsing
  -won't be done if any *mod_perl* handler, from the header_parser phase
  -and upto and including the response phase, sets $r->content_type.
  -(similar behavior to mp1's send_http_header() [Stas]
  +won't be done if any *mod_perl* handler before and including the
  +response phase, sets $r->content_type.  (similar behavior to mp1's
  +send_http_header() [Stas]
   
   Registry: make sure that $r is not in the scope when the script is
   compiled [Stas]
  
  
  

Mime
View raw message