cvs commit: modperl-2.0/src/modules/perl mod_perl.c mod_perl.h modperl_callback.c modperl_callback.h modperl_config.c

2000-08-20 Thread dougm

dougm   00/08/20 20:01:31

  Modified:lib/Apache Build.pm
   lib/ModPerl Code.pm
   pod  modperl_dev.pod
   src/modules/perl mod_perl.c mod_perl.h modperl_callback.c
modperl_callback.h modperl_config.c
  Log:
  pass arguments to callbacks
  add PerlResponseHandler
  
  Revision  ChangesPath
  1.22  +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Build.pm  2000/06/20 16:04:21 1.21
  +++ Build.pm  2000/08/21 03:01:27 1.22
  @@ -104,7 +104,7 @@
   
   if ($self-{MP_DEBUG}) {
   $self-{MP_TRACE} = 1;
  -$ccopts .= " -g";
  +$ccopts .= " -g -DMP_DEBUG";
   }
   
   if ($self-{MP_CCOPTS}) {
  
  
  
  1.34  +7 -3  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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Code.pm   2000/08/14 03:10:44 1.33
  +++ Code.pm   2000/08/21 03:01:28 1.34
  @@ -13,13 +13,15 @@
   PerSrv = [qw(PostReadRequest Trans)], #Init
   PerDir = [qw(HeaderParser
 Access Authen Authz
  -  Type Fixup Log)], #Init Response Cleanup
  +  Type Fixup Response Log)], #Init Cleanup
   Connection = [qw(PreConnection ProcessConnection)],
   );
   
   my %hooks = map { $_, canon_lc($_) }
   map { @{ $handlers{$_} } } keys %handlers;
   
  +my %not_ap_hook = map { $_, 1 } qw(response);
  +
   my %hook_proto = (
   Process= {
   ret  = 'void',
  @@ -165,7 +167,8 @@
   
   if (my $hook = $hooks{$handler}) {
   push @register_hooks,
  -  "ap_hook_$hook($name, NULL, NULL, AP_HOOK_LAST);";
  +  "ap_hook_$hook($name, NULL, NULL, AP_HOOK_LAST);"
  +unless $not_ap_hook{$hook};
   }
   
   my($protostr, $pass) = canon_proto($prototype, $name);
  @@ -439,7 +442,8 @@
  generate_trace  = {h = 'modperl_trace.h'},
   );
   
  -my @c_src_names = qw(interp tipool log config options callback gtop);
  +my @c_src_names = qw(interp tipool log config options callback gtop
  + util apache_xs);
   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.5   +2 -0  modperl-2.0/pod/modperl_dev.pod
  
  Index: modperl_dev.pod
  ===
  RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_dev.pod   2000/06/20 16:04:33 1.4
  +++ modperl_dev.pod   2000/08/21 03:01:29 1.5
  @@ -114,6 +114,8 @@
   
   =item PerlFixupHandler
   
  +=item PerlResponseHandler
  +
   =item PerlLogHandler
   
   =item PerlPostReadRequestHandler
  
  
  
  1.21  +5 -0  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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_perl.c2000/08/14 03:10:45 1.20
  +++ mod_perl.c2000/08/21 03:01:30 1.21
  @@ -153,6 +153,11 @@
   }; 
   
   static handler_rec modperl_handlers[] = {
  +#if 0
  +{ "perl-script", modperl_1xx_response_handler },
  +#endif
  +/* this response handler does not do any extra crap */
  +{ "modperl", modperl_response_handler },
   { NULL },
   };
   
  
  
  
  1.19  +4 -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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_perl.h2000/08/14 03:10:45 1.18
  +++ mod_perl.h2000/08/21 03:01:30 1.19
  @@ -24,6 +24,9 @@
   #include "apr_lock.h"
   #include "apr_strings.h"
   
  +#include "ap_buckets.h"
  +#include "util_filter.h"
  +
   extern module MODULE_VAR_EXPORT perl_module;
   
   #include "modperl_flags.h"
  @@ -33,6 +36,7 @@
   #include "modperl_gtop.h"
   #endif
   #include "modperl_types.h"
  +#include "modperl_util.h"
   #include "modperl_config.h"
   #include "modperl_callback.h"
   #include "modperl_tipool.h"
  
  
  
  1.14  +89 -11modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  

cvs commit: modperl-2.0/src/modules/perl modperl_apache_xs.c modperl_apache_xs.h

2000-08-20 Thread dougm

dougm   00/08/20 20:03:52

  Added:   src/modules/perl modperl_apache_xs.c modperl_apache_xs.h
  Log:
  code for extensions, which may be called from a .xs file or elsewhere
  start playing with buckets and i/o
  
  Revision  ChangesPath
  1.1  modperl-2.0/src/modules/perl/modperl_apache_xs.c
  
  Index: modperl_apache_xs.c
  ===
  #include "mod_perl.h"
  #include "modperl_apache_xs.h"
  
  /*
   * it is not optimal to create an ap_bucket for each element of @_
   * so we use our own mini-buffer to build up a decent size buffer
   * before creating an ap_bucket
   */
  
  /*
   * XXX: should make the modperl_wbucket_t hang off of
   * r-per_request_config to avoid "setaside" copies of small buffers
   * that may happen during ap_pass_brigade()
   */
  
  #ifndef MODPERL_WBUCKET_SIZE
  #define MODPERL_WBUCKET_SIZE IOBUFSIZE
  #endif
  
  typedef struct {
  int outcnt;
  char outbuf[MODPERL_WBUCKET_SIZE];
  request_rec *r;
  } modperl_wbucket_t;
  
  static MP_INLINE void modperl_wbucket_pass(modperl_wbucket_t *b,
 void *buf, int len)
  {
  ap_bucket_brigade *bb = ap_brigade_create(b-r-pool);
  ap_bucket *bucket = ap_bucket_create_transient(buf, len);
  ap_brigade_append_buckets(bb, bucket);
  ap_pass_brigade(b-r-filters, bb);
  }
  
  static MP_INLINE void modperl_wbucket_flush(modperl_wbucket_t *b)
  {
  modperl_wbucket_pass(b, b-outbuf, b-outcnt);
  b-outcnt = 0;
  }
  
  static MP_INLINE void modperl_wbucket_write(modperl_wbucket_t *b,
  void *buf, int len)
  {
  if ((len + b-outcnt)  MODPERL_WBUCKET_SIZE) {
  modperl_wbucket_flush(b);
  }
  
  if (len = MODPERL_WBUCKET_SIZE) {
  modperl_wbucket_pass(b, buf, len);
  }
  else {
memcpy(b-outbuf[b-outcnt], buf, len);
  b-outcnt += len;
  }
  }
  
  MP_INLINE apr_size_t modperl_apache_xs_write(pTHX_ SV **mark_ptr, SV **sp_ptr)
  {
  modperl_wbucket_t wbucket;
  apr_size_t bytes = 0;
  
  mark_ptr++;
  
  wbucket.r = modperl_sv2request_rec(aTHX_ *mark_ptr++);
  wbucket.outcnt = 0;
  
  if (wbucket.r-connection-aborted) {
  return EOF;
  }
  
  while (mark_ptr = sp_ptr) {
  STRLEN len;
  char *buf = SvPV(*mark_ptr, len);
  modperl_wbucket_write(wbucket, buf, len);
  bytes += len;
  mark_ptr++;
  }
  
  modperl_wbucket_flush(wbucket);
  
  /* XXX: ap_rflush if $| */
  
  return bytes;
  }
  
  
  
  1.1  modperl-2.0/src/modules/perl/modperl_apache_xs.h
  
  Index: modperl_apache_xs.h
  ===
  #ifndef MODPERL_APACHE_XS_H
  #define MODPERL_APACHE_XS_H
  
  apr_inline apr_size_t modperl_apache_xs_write(pTHX_ SV **mark_ptr, SV **sp_ptr);
  
  #endif /* MODPERL_APACHE_XS_H */
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_apache_xs.c

2000-08-20 Thread dougm

dougm   00/08/20 20:43:53

  Modified:src/modules/perl modperl_apache_xs.c
  Log:
  loose tab
  
  Revision  ChangesPath
  1.2   +1 -1  modperl-2.0/src/modules/perl/modperl_apache_xs.c
  
  Index: modperl_apache_xs.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_apache_xs.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_apache_xs.c   2000/08/21 03:03:52 1.1
  +++ modperl_apache_xs.c   2000/08/21 03:43:53 1.2
  @@ -49,7 +49,7 @@
   modperl_wbucket_pass(b, buf, len);
   }
   else {
  - memcpy(b-outbuf[b-outcnt], buf, len);
  +memcpy(b-outbuf[b-outcnt], buf, len);
   b-outcnt += len;
   }
   }
  
  
  



cvs commit: modperl-site/embperl Changes.pod.1.html Changes.pod.10.html Changes.pod.11.html Changes.pod.12.html Changes.pod.13.html Changes.pod.14.html Changes.pod.15.html Changes.pod.16.html Changes.pod.17.html Changes.pod.18.html Changes.pod.19.html Changes.pod.2.html Changes.pod.20.html Changes.pod.21.html Changes.pod.22.html Changes.pod.23.html Changes.pod.24.html Changes.pod.25.html Changes.pod.26.html Changes.pod.27.html Changes.pod.28.html Changes.pod.29.html Changes.pod.3.html Changes.pod.30.html Changes.pod.31.html Changes.pod.32.html Changes.pod.33.html Changes.pod.34.html Changes.pod.35.html Changes.pod.36.html Changes.pod.37.html Changes.pod.38.html Changes.pod.39.html Changes.pod.4.html Changes.pod.40.html Changes.pod.5.html Changes.pod.6.html Changes.pod.7.html Changes.pod.8.html Changes.pod.9.html Changes.pod.cont.html index.html

2000-08-20 Thread richter

richter 00/08/20 21:23:26

  Modified:embperl  Changes.pod.1.html Changes.pod.10.html
Changes.pod.11.html Changes.pod.12.html
Changes.pod.13.html Changes.pod.14.html
Changes.pod.15.html Changes.pod.16.html
Changes.pod.17.html Changes.pod.18.html
Changes.pod.19.html Changes.pod.2.html
Changes.pod.20.html Changes.pod.21.html
Changes.pod.22.html Changes.pod.23.html
Changes.pod.24.html Changes.pod.25.html
Changes.pod.26.html Changes.pod.27.html
Changes.pod.28.html Changes.pod.29.html
Changes.pod.3.html Changes.pod.30.html
Changes.pod.31.html Changes.pod.32.html
Changes.pod.33.html Changes.pod.34.html
Changes.pod.35.html Changes.pod.36.html
Changes.pod.37.html Changes.pod.38.html
Changes.pod.39.html Changes.pod.4.html
Changes.pod.40.html Changes.pod.5.html
Changes.pod.6.html Changes.pod.7.html
Changes.pod.8.html Changes.pod.9.html
Changes.pod.cont.html index.html
  Log:
  Embperl Webpages - Changes
  
  Revision  ChangesPath
  1.168 +15 -31modperl-site/embperl/Changes.pod.1.html
  
  Index: Changes.pod.1.html
  ===
  RCS file: /home/cvs/modperl-site/embperl/Changes.pod.1.html,v
  retrieving revision 1.167
  retrieving revision 1.168
  diff -u -r1.167 -r1.168
  --- Changes.pod.1.html2000/08/20 18:57:19 1.167
  +++ Changes.pod.1.html2000/08/21 04:23:16 1.168
  @@ -1,6 +1,6 @@
   HTML
   HEAD
  -TITLE1.3b5 /BETA)  20. Aug 2000/TITLE
  +TITLE1.3b6_dev -- That's what currently under developement/TITLE
   LINK REV="made" HREF="mailto:[EMAIL PROTECTED]"
   /HEAD
   
  @@ -8,7 +8,7 @@
   blockquote
 blockquote
   H1strong
  -A NAME="1_3b5_BETA_20_Aug_2000"1.3b5 /BETA)  20. Aug 2000/a/strong/h1
  +A NAME="1_3b6_dev_That_s_what_current"1.3b6_dev -- That's what currently under 
developement/a/strong/h1
 /blockquote
   /blockquote
   
  @@ -16,37 +16,21 @@
   BR CLEAR=LEFT
   blockquote
 blockquote
  -[a href="index.html"HOME/a]nbsp;nbsp; [a 
href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a 
href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a 
href="Changes.pod.2.html"NEXT (1.3b4 (BETA)  17.07.2000)/a]nbsp;nbsp; brhr
  +[a href="index.html"HOME/a]nbsp;nbsp; [a 
href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a 
href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a 
href="Changes.pod.2.html"NEXT (1.3b5 (BETA)  20. Aug 2000)/a]nbsp;nbsp; brhr
   P
  -PRE   - Embperl now supports Apache::Session 1.52. See quot;Session 
handlingquot;
  - in the docs, how the setup has changed.
  -   - Fixed a problem with POSTed data, which had got lost for the first,
  - request when using EmbperlObject handler. Spotted by
  - Kaare Rasmussen.
  -   - Fixed a typo in HTML::Embperl::Mail, spotted by Robert.
  -   - changed require to use HTML::Embperl in EmbperlObject to avoid problems
  - with dynamic loading. Spotted by Robert.
  -   - Embperl takes the cookie for session handling from the Apache 
  - request record to make it available in earlier phases then the
  - content handler. Suggested by Jack Cushman.
  -   - added entity decoding for value attribute of radio/checkboxes.
  - Spotted by Chris Thorman.
  -   - %fdat is not resetup when already done and formtype is 
  - multipart/formdata. Spotted by Michael Slade.
  -   - Embperl inserts amp;amp; instead of a signle amp; inside query strings
  - when expaned from array or hash refs.
  -   - Embperl now also accepts hashref inside a url and expand it
  - to a query_string i.e. lt;a href=quot;foo.html?[+ { a=gt;1, b=gt;2 
}+]quot;gt; will become
  - lt;a href=quot;foo.html?a=1amp;amp;b=gt;2quot;gt;.
  -   - EMBPERL_COOKIE_EXPIRES now also supports relativ times like: 
  - +30s +10m +1h -1d +3M +10y
  -   - $req_rec -gt; pnotes ('EMBPERL_ERRORS') could be used to retrieve 
  - error message inside a error document
  -   - make Embperl compile and run with threaded Perl 5.6. With help
  - from Jason Bodnar. NOTE: That doesn't mean that Embperl is
  - threadsafe!
  +Last Update: Mon Aug 21 06:23:52 2000 (MET)
  +
  +P
  +NOTE: This version is only available via A HREF="CVS.pod.1.html#INTRO""CVS"/A
  +
  +
  +
  +P
  +PRE   - Fixed a problem with importing files that contains foreach and
  + do until loops, which may caused a syntax error or endless
  + loop. Spotted by Steffen Geschke.
   /PRE
  -p[a href="index.html"HOME/a]nbsp;nbsp; [a 

cvs commit: modperl-site/embperl Changes.pod.1.html index.html

2000-08-20 Thread richter

richter 00/08/20 21:39:02

  Modified:embperl  Changes.pod.1.html index.html
  Log:
  Embperl Webpages - Changes
  
  Revision  ChangesPath
  1.169 +1 -1  modperl-site/embperl/Changes.pod.1.html
  
  Index: Changes.pod.1.html
  ===
  RCS file: /home/cvs/modperl-site/embperl/Changes.pod.1.html,v
  retrieving revision 1.168
  retrieving revision 1.169
  diff -u -r1.168 -r1.169
  --- Changes.pod.1.html2000/08/21 04:23:16 1.168
  +++ Changes.pod.1.html2000/08/21 04:39:01 1.169
  @@ -18,7 +18,7 @@
 blockquote
   [a href="index.html"HOME/a]nbsp;nbsp; [a 
href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a 
href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a 
href="Changes.pod.2.html"NEXT (1.3b5 (BETA)  20. Aug 2000)/a]nbsp;nbsp; brhr
   P
  -Last Update: Mon Aug 21 06:23:52 2000 (MET)
  +Last Update: Mon Aug 21 06:39:41 2000 (MET)
   
   P
   NOTE: This version is only available via A HREF="CVS.pod.1.html#INTRO""CVS"/A
  
  
  
  1.110 +2 -5  modperl-site/embperl/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/modperl-site/embperl/index.html,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- index.html2000/08/21 04:23:20 1.109
  +++ index.html2000/08/21 04:39:01 1.110
  @@ -65,9 +65,6 @@
 td bgcolor="#AFBDCA"bignbsp;a 
href="http://www.apache.org/search.html"Search/anbsp;/big/td
   /tr
   tr
  -  td bgcolor="#bFcDdA"bignbsp;a href="mirror.html"WorldWide 
Mirrors/anbsp;/big/td
  -/tr
  -tr
 td bgcolor="#bFcDdA"bignbsp;a 
href="http://perl.apache.org/jobs.html"Jobs/anbsp;/big/td
   /tr
   tr
  @@ -77,10 +74,10 @@
 td bgcolor="#bFcDdA"nbsp;Current Version /td
   /tr
   tr
  -  td bgcolor="#AFBDCA"nbsp;a href="Embperl.pod.15.html"codeStable: 
1.2.1/code/a/td
  +  td bgcolor="#AFBDCA"nbsp;a href="Embperl.pod.16.html"codeStable: 
1.2.1/code/a/td
   /tr
   tr
  -  td bgcolor="#bFcDdA"nbsp;a href="Embperl.pod.15.html"codeBeta: 
nbsp;nbsp;1.3b5/code/a/td
  +  td bgcolor="#bFcDdA"nbsp;a href="Embperl.pod.16.html"codeBeta: 
nbsp;nbsp;1.3b5/code/a/td
   /tr
   tr
 td bgcolor="#AFBDCA"bignbsp;nbsp;/big/td
  @@ -312,7 +309,7 @@
   blockquote
 pfont color="#808080" size=1hr
 HTML::Embperl - Copyright (c) 1997-2000 Gerald Richter / ECOS 
lt;[EMAIL PROTECTED]gt;
  -  Last Update $Id: index.html,v 1.109 2000/08/21 04:23:20 richter Exp $/font/p  
 
  +  Last Update $Id: index.html,v 1.110 2000/08/21 04:39:01 richter Exp $/font/p  
 
   /blockquote
   /td/tr!--msnavigation--/table/body
   /html