perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/src/modules/perl Apache.xs mod_perl.h
Date Thu, 01 Jul 1999 22:47:24 GMT
dougm       99/07/01 15:47:23

  Modified:    .        Changes ToDo
               src/modules/perl Apache.xs mod_perl.h
  Log:
  $r->read will now properly check the return value of
  ap_setup_client_block() and return undef if != OK,
  e.g. if LimitRequestBody is exceeded
  
  Revision  Changes    Path
  1.315     +5 -1      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.314
  retrieving revision 1.315
  diff -u -r1.314 -r1.315
  --- Changes	1999/07/01 22:07:11	1.314
  +++ Changes	1999/07/01 22:47:14	1.315
  @@ -8,7 +8,11 @@
   
   =item 1.20_01-dev
   
  -fix some problems with %ENV (e.g. SetEnv PATH cause mangled value)
  +$r->read will now properly check the return value of
  +ap_setup_client_block() and return undef if != OK,
  +e.g. if LimitRequestBody is exceeded
  +
  +fix some problems with %ENV
   
   loosen module/cookie tests
   
  
  
  
  1.189     +0 -2      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /export/home/cvs/modperl/ToDo,v
  retrieving revision 1.188
  retrieving revision 1.189
  diff -u -r1.188 -r1.189
  --- ToDo	1999/07/01 22:07:12	1.188
  +++ ToDo	1999/07/01 22:47:15	1.189
  @@ -3,8 +3,6 @@
                    (well, close to it anyhow)
   ---------------------------------------------------------------------------
   
  -- need to check return value from ap_setup_client_block
  -
   - mod_perl_version.h should not be directly written to
   
   - libapreq: Apache::Cookie format sync w/ CGI.pm
  
  
  
  1.77      +13 -12    modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- Apache.xs	1999/05/18 21:24:15	1.76
  +++ Apache.xs	1999/07/01 22:47:19	1.77
  @@ -866,11 +866,22 @@
   
       PREINIT:
       long nrd = 0;
  +    int rc;
   
       PPCODE:
       buffer = (char*)safemalloc(bufsiz);
  -    PERL_READ_FROM_CLIENT;
  -    if ( nrd > 0 ) {
  +    if ((rc = setup_client_block(r, REQUEST_CHUNKED_ERROR)) != OK) {
  +	aplog_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r->server, 
  +		    "mod_perl: setup_client_block failed: %d", rc);
  +	XSRETURN_UNDEF;
  +    }
  +
  +    if(should_client_block(r)) {
  +	nrd = get_client_block(r, buffer, bufsiz);
  +	r->read_length = 0;
  +    } 
  +
  +    if (nrd > 0) {
   	XPUSHs(sv_2mortal(newSViv((long)nrd)));
   	sv_setpvn((SV*)ST(1), buffer, nrd);
   #ifdef PERL_STASH_POST_DATA
  @@ -1405,16 +1416,6 @@
   
       OUTPUT:
       RETVAL
  -
  -long
  -read_length(r, len=-1)
  -    Apache	r
  -    long len
  -
  -    CODE:
  -    RETVAL = r->read_length;
  -    if(len > -1)
  -        r->read_length = len;
   
   #    /* MIME header environments, in and out.  Also, an array containing
   #   * environment variables to be passed to subprocesses, so people can
  
  
  
  1.81      +0 -28     modperl/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl.h,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- mod_perl.h	1999/07/01 22:07:19	1.80
  +++ mod_perl.h	1999/07/01 22:47:20	1.81
  @@ -665,34 +665,6 @@
   #define CHAR_P char * 
   #endif
   
  -/* bleh */
  -#if MODULE_MAGIC_NUMBER >= 19961125 
  -#define PERL_READ_SETUP setup_client_block(r, REQUEST_CHUNKED_ERROR); 
  -#else
  -#define PERL_READ_SETUP
  -#endif 
  -
  -#if MODULE_MAGIC_NUMBER >= 19970622 
  -#define PERL_SET_READ_LENGTH  r->read_length = 0
  -#else
  -#define PERL_SET_READ_LENGTH
  -#endif 
  -
  -#if MODULE_MAGIC_NUMBER >= 19961125 
  -#define PERL_READ_CLIENT \
  -if(should_client_block(r)) { \
  -    nrd = get_client_block(r, buffer, bufsiz); \
  -    PERL_SET_READ_LENGTH; \
  -} 
  -#else 
  -#define PERL_READ_CLIENT \
  -nrd = read_client_block(r, buffer, bufsiz); 
  -#endif       
  -
  -#define PERL_READ_FROM_CLIENT \
  -PERL_READ_SETUP; \
  -PERL_READ_CLIENT
  -
   #define PUSHelt(key,val,klen) \
   { \
       SV *psv = (SV*)newSVpv(val, 0); \
  
  
  

Mime
View raw message