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 st...@apache.org on 2003/03/14 06:34:24 UTC

cvs commit: modperl-2.0/xs/Apache/RequestRec Apache__RequestRec.h

stas        2003/03/13 21:34:24

  Modified:    src/modules/perl modperl_util.h
               xs/Apache/RequestRec Apache__RequestRec.h
  Log:
  add a macro MP_CGI_HEADER_PARSER_OFF so we can re-use it other places
  
  Revision  Changes    Path
  1.41      +11 -0     modperl-2.0/src/modules/perl/modperl_util.h
  
  Index: modperl_util.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- modperl_util.h	14 Mar 2003 05:33:18 -0000	1.40
  +++ modperl_util.h	14 Mar 2003 05:34:24 -0000	1.41
  @@ -63,6 +63,17 @@
           Perl_croak(aTHX_ func "can't be called before the response phase"); \
       }
   
  +/* turn off cgi header parsing. in case we are already inside
  + *     modperl_callback_per_dir(MP_RESPONSE_HANDLER, r); 
  + * but haven't sent any data yet, it's too late to change
  + * MpReqPARSE_HEADERS, so change the wbucket's private flag directly
  + */
  +#define MP_CGI_HEADER_PARSER_OFF(rcfg) \
  +    MpReqPARSE_HEADERS_Off(rcfg); \
  +    if (rcfg->wbucket) { \
  +        rcfg->wbucket->header_parse = 0; \
  +    } 
  +
   MP_INLINE server_rec *modperl_sv2server_rec(pTHX_ SV *sv);
   MP_INLINE request_rec *modperl_sv2request_rec(pTHX_ SV *sv);
   
  
  
  
  1.6       +1 -13     modperl-2.0/xs/Apache/RequestRec/Apache__RequestRec.h
  
  Index: Apache__RequestRec.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestRec/Apache__RequestRec.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Apache__RequestRec.h	8 Mar 2003 09:15:16 -0000	1.5
  +++ Apache__RequestRec.h	14 Mar 2003 05:34:24 -0000	1.6
  @@ -9,19 +9,7 @@
           STRLEN len;
           const char *val = SvPV(type, len);
           ap_set_content_type(r, apr_pmemdup(r->pool, val, len+1));
  -
  -        /* turn off cgi header parsing, similar to what
  -         * send_http_header did in mp1 */
  -        MpReqPARSE_HEADERS_Off(rcfg);
  -        if (rcfg->wbucket) {
  -            /* in case we are already inside
  -             *     modperl_callback_per_dir(MP_RESPONSE_HANDLER, r); 
  -             * but haven't sent any data yet, it's too late to change
  -             * MpReqPARSE_HEADERS, so change the wbucket's private
  -             * flag directly
  -             */
  -            rcfg->wbucket->header_parse = 0;
  -        }
  +        MP_CGI_HEADER_PARSER_OFF(rcfg);
       }
   
       return retval;