dougm       01/05/08 11:56:00

  Modified:    lib/ModPerl Code.pm
               src/modules/perl mod_perl.h modperl_apache_includes.h
                        modperl_env.c
               t/response/TestModules cgi.pm
               xs/maps  modperl_functions.map
  Added:       xs/Apache/Response Apache__Response.h
  Log:
  integrate with modperl_cgi module and add $r->send_cgi_header method
  
  Revision  Changes    Path
  1.64      +1 -1      modperl-2.0/lib/ModPerl/Code.pm
  
  Index: Code.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- Code.pm   2001/05/08 04:25:48     1.63
  +++ Code.pm   2001/05/08 18:55:34     1.64
  @@ -522,7 +522,7 @@
   );
   
   my @c_src_names = qw(interp tipool log config cmd options callback handler
  -                     gtop util io filter bucket mgv pcw global env);
  +                     gtop util io filter bucket mgv pcw global env cgi);
   my @g_c_names = map { "modperl_$_" } qw(hooks directives flags xsinit);
   my @c_names   = ('mod_perl', (map "modperl_$_", @c_src_names));
   sub c_files { [map { "$_.c" } @c_names, @g_c_names] }
  
  
  
  1.34      +1 -0      modperl-2.0/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- mod_perl.h        2001/05/08 04:25:49     1.33
  +++ mod_perl.h        2001/05/08 18:55:42     1.34
  @@ -32,6 +32,7 @@
   #include "modperl_mgv.h"
   #include "modperl_global.h"
   #include "modperl_env.h"
  +#include "modperl_cgi.h"
   
   void modperl_init(server_rec *s, apr_pool_t *p);
   void modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 
  
  
  
  1.5       +2 -0      modperl-2.0/src/modules/perl/modperl_apache_includes.h
  
  Index: modperl_apache_includes.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_apache_includes.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_apache_includes.h 2001/03/15 02:17:35     1.4
  +++ modperl_apache_includes.h 2001/05/08 18:55:44     1.5
  @@ -24,4 +24,6 @@
   #include "apr_buckets.h"
   #include "util_filter.h"
   
  +#include "util_script.h"
  +
   #endif /* MODPERL_APACHE_INCLUDES_H */
  
  
  
  1.2       +0 -1      modperl-2.0/src/modules/perl/modperl_env.c
  
  Index: modperl_env.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_env.c     2001/05/08 04:10:41     1.1
  +++ modperl_env.c     2001/05/08 18:55:45     1.2
  @@ -1,5 +1,4 @@
   #include "mod_perl.h"
  -#include "util_script.h"
   
   #define EnvMgObj SvMAGIC((SV*)GvHV(PL_envgv))->mg_ptr
   
  
  
  
  1.2       +3 -3      modperl-2.0/t/response/TestModules/cgi.pm
  
  Index: cgi.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestModules/cgi.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- cgi.pm    2001/05/08 04:25:51     1.1
  +++ cgi.pm    2001/05/08 18:55:51     1.2
  @@ -14,9 +14,9 @@
       my $param = $cgi->param('PARAM');
       my $httpupload = $cgi->param('HTTPUPLOAD');
   
  -#    $cgi->print( $cgi->header(-type => "text/plain",
  -#                              "-X-Perl-Script" => "cgi.pl") );
  -
  +    print $cgi->header('-type' => 'text/plain',
  +                       '-X-Perl-Script' => 'cgi.pm');
  +    $r->send_cgi_header("X-Foo-Bar: baz\r\n\r\nthis is text\n");
       print "ok $param\n" if $param;
   
       if ($httpupload) {
  
  
  
  1.16      +3 -0      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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- modperl_functions.map     2001/05/05 19:24:43     1.15
  +++ modperl_functions.map     2001/05/08 18:55:55     1.16
  @@ -23,6 +23,9 @@
    apr_ssize_t:DEFINE_WRITE | | \
                request_rec *:r, SV *:buffer, apr_ssize_t:bufsiz=-1, int:offset=0
   
  +MODULE=Apache::Response   PACKAGE=Apache::RequestRec
  +DEFINE_send_cgi_header | | request_rec *:r, SV *:buffer
  +
   MODULE=Apache::ServerUtil   PACKAGE=guess
    mpxs_Apache__Server_push_handlers
    mpxs_Apache__Server_set_handlers
  
  
  
  1.1                  modperl-2.0/xs/Apache/Response/Apache__Response.h
  
  Index: Apache__Response.h
  ===================================================================
  /* 
   * pretty sure we need to copy SvPVX, otherwise it will be modified inline
   * XXX: that might be a desired feature
   */
  /* XXX: this should probably named $r->cgi_header_parse
   * and send_cgi_header an alias in Apache::compat
   */
  #define mpxs_Apache__RequestRec_send_cgi_header(r, sv) \
  { \
      STRLEN len; \
      char *buff = SvPV(sv, len); \
      char *copy = apr_palloc(r->pool, len+1); \
      const char *bodytext; \
      apr_cpystrn(copy, buff, len+1); \
      modperl_cgi_header_parse(r, copy, &bodytext); \
  }
  
  
  

Reply via email to