You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2001/07/09 07:58:26 UTC

cvs commit: embperl Changes.pod Makefile.PL epmain.c epnames.h

richter     01/07/08 22:58:26

  Modified:    .        Changes.pod Makefile.PL epmain.c epnames.h
  Log:
     - use Content-Lenght HTTP Header instead of $ENV{CONTENT_LENGTH}
       when running under mod_perl and win32. This fixes a bug
       with POSTed data reported by Lukas Zapletal.
     - Display correct Apache module name in Makefile.PL when
       requesting path for Apache module. Patch from James Lee.
  
  Revision  Changes    Path
  1.176     +5 -0      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.175
  retrieving revision 1.176
  diff -u -r1.175 -r1.176
  --- Changes.pod	2001/06/25 08:15:34	1.175
  +++ Changes.pod	2001/07/09 05:58:25	1.176
  @@ -8,6 +8,11 @@
   
      - Added method $r -> Espace for html & url escaping
      - URL escpage # to %23
  +   - use Content-Lenght HTTP Header instead of $ENV{CONTENT_LENGTH}
  +     when running under mod_perl and win32. This fixes a bug
  +     with POSTed data reported by Lukas Zapletal.
  +   - Display correct Apache module name in Makefile.PL when
  +     requesting path for Apache module. Patch from James Lee.
   
   =head1 1.3.3 (RELEASE)   6. Juni 2001
   
  
  
  
  1.50      +1 -1      embperl/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/embperl/Makefile.PL,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- Makefile.PL	2001/05/29 05:22:17	1.49
  +++ Makefile.PL	2001/07/09 05:58:25	1.50
  @@ -683,7 +683,7 @@
   	if (!grep (/$mod/, @modules))
   	    { # module not linked staticly
   	    $paths = $win32?$opt->{win32path}:$opt->{path} ;
  -	    $modfile = $win32?$opt->{win32file}:$opt->{file} ;
  +	    $modfile = $win32?$opt->{win32file}:$opt->{file}[0] ;
   	    $modfiletext = ($win32?$opt->{win32filetext}:$opt->{filetext}) || $modfile ;
   	    $found = 2 ;
   	    searchmod:
  
  
  
  1.107     +125 -107  embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- epmain.c	2001/06/05 04:56:20	1.106
  +++ epmain.c	2001/07/09 05:58:25	1.107
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epmain.c,v 1.106 2001/06/05 04:56:20 richter Exp $
  +#   $Id: epmain.c,v 1.107 2001/07/09 05:58:25 richter Exp $
   #
   ###################################################################################*/
   
  @@ -334,52 +334,52 @@
   INTMGshort (CurrNode, pCurrReq -> xCurrNode) 
   #endif
   
  -OPTMGRD (optDisableVarCleanup      , pCurrReq -> bOptions) ;
  -OPTMG   (optDisableEmbperlErrorPage, pCurrReq -> bOptions) ;
  -OPTMG   (optReturnError            , pCurrReq -> bOptions) ;
  -OPTMGRD (optSafeNamespace          , pCurrReq -> bOptions) ;
  -OPTMGRD (optOpcodeMask             , pCurrReq -> bOptions) ;
  -OPTMG   (optRawInput               , pCurrReq -> bOptions) ;
  -OPTMG   (optSendHttpHeader         , pCurrReq -> bOptions) ;
  -OPTMGRD (optDisableChdir           , pCurrReq -> bOptions) ;
  -OPTMG   (optDisableHtmlScan        , pCurrReq -> bOptions) ;
  -OPTMGRD (optEarlyHttpHeader        , pCurrReq -> bOptions) ;
  -OPTMGRD (optDisableFormData        , pCurrReq -> bOptions) ;
  -OPTMG   (optDisableInputScan       , pCurrReq -> bOptions) ;
  -OPTMG   (optDisableTableScan       , pCurrReq -> bOptions) ;
  -OPTMG   (optDisableMetaScan        , pCurrReq -> bOptions) ;
  -OPTMGRD (optAllFormData            , pCurrReq -> bOptions) ;
  -OPTMGRD (optRedirectStdout         , pCurrReq -> bOptions) ;
  -OPTMG   (optUndefToEmptyValue      , pCurrReq -> bOptions) ;
  -OPTMG   (optNoHiddenEmptyValue     , pCurrReq -> bOptions) ;
  -OPTMGRD (optAllowZeroFilesize      , pCurrReq -> bOptions) ;
  -OPTMGRD (optKeepSrcInMemory        , pCurrReq -> bOptions) ;
  -OPTMG   (optKeepSpaces             , pCurrReq -> bOptions) ;
  -OPTMG   (optOpenLogEarly           , pCurrReq -> bOptions) ;
  -OPTMG   (optNoUncloseWarn          , pCurrReq -> bOptions) ;
  -
  -
  -OPTMG   (dbgStd          , pCurrReq -> bDebug) ;
  -OPTMG   (dbgMem          , pCurrReq -> bDebug) ;
  -OPTMG   (dbgEval         , pCurrReq -> bDebug) ;
  -OPTMG   (dbgCmd          , pCurrReq -> bDebug) ;
  -OPTMG   (dbgEnv          , pCurrReq -> bDebug) ;
  -OPTMG   (dbgForm         , pCurrReq -> bDebug) ;
  -OPTMG   (dbgTab          , pCurrReq -> bDebug) ;
  -OPTMG   (dbgInput        , pCurrReq -> bDebug) ;
  -OPTMG   (dbgFlushOutput  , pCurrReq -> bDebug) ;
  -OPTMG   (dbgFlushLog     , pCurrReq -> bDebug) ;
  -OPTMG   (dbgAllCmds      , pCurrReq -> bDebug) ;
  -OPTMG   (dbgSource       , pCurrReq -> bDebug) ;
  -OPTMG   (dbgFunc         , pCurrReq -> bDebug) ;
  -OPTMG   (dbgLogLink      , pCurrReq -> bDebug) ;
  -OPTMG   (dbgDefEval      , pCurrReq -> bDebug) ;
  -OPTMG   (dbgWatchScalar  , pCurrReq -> bDebug) ;
  -OPTMG   (dbgHeadersIn    , pCurrReq -> bDebug) ;
  -OPTMG   (dbgShowCleanup  , pCurrReq -> bDebug) ;
  -OPTMG   (dbgProfile      , pCurrReq -> bDebug) ;
  -OPTMG   (dbgSession      , pCurrReq -> bDebug) ;
  -OPTMG   (dbgImport       , pCurrReq -> bDebug) ;
  +OPTMGRD (optDisableVarCleanup      , pCurrReq -> bOptions) 
  +OPTMG   (optDisableEmbperlErrorPage, pCurrReq -> bOptions) 
  +OPTMG   (optReturnError            , pCurrReq -> bOptions) 
  +OPTMGRD (optSafeNamespace          , pCurrReq -> bOptions) 
  +OPTMGRD (optOpcodeMask             , pCurrReq -> bOptions) 
  +OPTMG   (optRawInput               , pCurrReq -> bOptions) 
  +OPTMG   (optSendHttpHeader         , pCurrReq -> bOptions) 
  +OPTMGRD (optDisableChdir           , pCurrReq -> bOptions) 
  +OPTMG   (optDisableHtmlScan        , pCurrReq -> bOptions) 
  +OPTMGRD (optEarlyHttpHeader        , pCurrReq -> bOptions) 
  +OPTMGRD (optDisableFormData        , pCurrReq -> bOptions) 
  +OPTMG   (optDisableInputScan       , pCurrReq -> bOptions) 
  +OPTMG   (optDisableTableScan       , pCurrReq -> bOptions) 
  +OPTMG   (optDisableMetaScan        , pCurrReq -> bOptions) 
  +OPTMGRD (optAllFormData            , pCurrReq -> bOptions) 
  +OPTMGRD (optRedirectStdout         , pCurrReq -> bOptions) 
  +OPTMG   (optUndefToEmptyValue      , pCurrReq -> bOptions) 
  +OPTMG   (optNoHiddenEmptyValue     , pCurrReq -> bOptions) 
  +OPTMGRD (optAllowZeroFilesize      , pCurrReq -> bOptions) 
  +OPTMGRD (optKeepSrcInMemory        , pCurrReq -> bOptions) 
  +OPTMG   (optKeepSpaces             , pCurrReq -> bOptions) 
  +OPTMG   (optOpenLogEarly           , pCurrReq -> bOptions) 
  +OPTMG   (optNoUncloseWarn          , pCurrReq -> bOptions) 
  +
  +
  +OPTMG   (dbgStd          , pCurrReq -> bDebug) 
  +OPTMG   (dbgMem          , pCurrReq -> bDebug) 
  +OPTMG   (dbgEval         , pCurrReq -> bDebug) 
  +OPTMG   (dbgCmd          , pCurrReq -> bDebug) 
  +OPTMG   (dbgEnv          , pCurrReq -> bDebug) 
  +OPTMG   (dbgForm         , pCurrReq -> bDebug) 
  +OPTMG   (dbgTab          , pCurrReq -> bDebug) 
  +OPTMG   (dbgInput        , pCurrReq -> bDebug) 
  +OPTMG   (dbgFlushOutput  , pCurrReq -> bDebug) 
  +OPTMG   (dbgFlushLog     , pCurrReq -> bDebug) 
  +OPTMG   (dbgAllCmds      , pCurrReq -> bDebug) 
  +OPTMG   (dbgSource       , pCurrReq -> bDebug) 
  +OPTMG   (dbgFunc         , pCurrReq -> bDebug) 
  +OPTMG   (dbgLogLink      , pCurrReq -> bDebug) 
  +OPTMG   (dbgDefEval      , pCurrReq -> bDebug) 
  +OPTMG   (dbgWatchScalar  , pCurrReq -> bDebug) 
  +OPTMG   (dbgHeadersIn    , pCurrReq -> bDebug) 
  +OPTMG   (dbgShowCleanup  , pCurrReq -> bDebug) 
  +OPTMG   (dbgProfile      , pCurrReq -> bDebug) 
  +OPTMG   (dbgSession      , pCurrReq -> bDebug) 
  +OPTMG   (dbgImport       , pCurrReq -> bDebug) 
   
   /* ---------------------------------------------------------------------------- */
   /* read form input from http server... */
  @@ -671,10 +671,21 @@
           dowarn = savewarn ;
           }
   
  -    sLen [0] = '\0' ;
  -    GetHashValue (r -> pEnvHash, "CONTENT_LENGTH", sizeof (sLen) - 1, sLen) ;
  +#ifdef APACHE
  +    if (r -> pApacheReq)
  +        {
  +        const char * sLength = table_get(r -> pApacheReq->headers_in, "Content-Length") ;
  +	len = sLength?atoi (sLength):0 ;
  +	}
  +    else
  +#endif
  +	{
  +	sLen [0] = '\0' ;
  +	GetHashValue (r -> pEnvHash, "CONTENT_LENGTH", sizeof (sLen) - 1, sLen) ;
  +	len = atoi (sLen) ;
  +	}
   
  -    if ((len = atoi (sLen)) == 0)
  +    if (len == 0)
           {
           SV * * ppSV = hv_fetch(r -> pEnvHash, "QUERY_STRING", sizeof ("QUERY_STRING") - 1, 0) ;  
           if (ppSV != NULL)
  @@ -1539,62 +1550,62 @@
       
       rc = 0 ;
   
  -    ADDINTMG (TabCount) ;
  -    ADDINTMG (TabRow) ;
  -    ADDINTMG (TabCol) ;
  -    ADDINTMG (TabMaxRow) ;
  -    ADDINTMG (TabMaxCol) ;
  -    ADDINTMG (TabMode) ;
  -    ADDINTMG (EscMode) ;
  +    ADDINTMG (TabCount) 
  +    ADDINTMG (TabRow) 
  +    ADDINTMG (TabCol) 
  +    ADDINTMG (TabMaxRow) 
  +    ADDINTMG (TabMaxCol) 
  +    ADDINTMG (TabMode) 
  +    ADDINTMG (EscMode) 
   #ifdef EP2
  -    ADDINTMG (CurrNode) ;
  +    ADDINTMG (CurrNode) 
   #endif    
       
  -    ADDOPTMG (optDisableVarCleanup      ) ;
  -    ADDOPTMG (optDisableEmbperlErrorPage) ;
  -    ADDOPTMG (optReturnError) ;
  -    ADDOPTMG (optSafeNamespace          ) ;
  -    ADDOPTMG (optOpcodeMask             ) ;
  -    ADDOPTMG (optRawInput               ) ;
  -    ADDOPTMG (optSendHttpHeader         ) ;
  -    ADDOPTMG (optDisableChdir           ) ;
  -    ADDOPTMG (optDisableHtmlScan        ) ;
  -    ADDOPTMG (optEarlyHttpHeader        ) ;
  -    ADDOPTMG (optDisableFormData        ) ;
  -    ADDOPTMG (optDisableInputScan       ) ;
  -    ADDOPTMG (optDisableTableScan       ) ;
  -    ADDOPTMG (optDisableMetaScan        ) ;
  -    ADDOPTMG (optAllFormData            ) ;
  -    ADDOPTMG (optRedirectStdout         ) ;
  -    ADDOPTMG (optUndefToEmptyValue      ) ;
  -    ADDOPTMG (optNoHiddenEmptyValue     ) ;
  -    ADDOPTMG (optAllowZeroFilesize      ) ;
  -    ADDOPTMG (optKeepSrcInMemory       ) ;
  -    ADDOPTMG (optKeepSpaces            ) ;
  -    ADDOPTMG (optOpenLogEarly          ) ;
  -    ADDOPTMG (optNoUncloseWarn         ) ;
  -
  -    ADDOPTMG   (dbgStd         ) ;
  -    ADDOPTMG   (dbgMem         ) ;
  -    ADDOPTMG   (dbgEval        ) ;
  -    ADDOPTMG   (dbgCmd         ) ;
  -    ADDOPTMG   (dbgEnv         ) ;
  -    ADDOPTMG   (dbgForm        ) ;
  -    ADDOPTMG   (dbgTab         ) ;
  -    ADDOPTMG   (dbgInput       ) ;
  -    ADDOPTMG   (dbgFlushOutput ) ;
  -    ADDOPTMG   (dbgFlushLog    ) ;
  -    ADDOPTMG   (dbgAllCmds     ) ;
  -    ADDOPTMG   (dbgSource      ) ;
  -    ADDOPTMG   (dbgFunc        ) ;
  -    ADDOPTMG   (dbgLogLink     ) ;
  -    ADDOPTMG   (dbgDefEval     ) ;
  -    ADDOPTMG   (dbgWatchScalar ) ;
  -    ADDOPTMG   (dbgHeadersIn   ) ;
  -    ADDOPTMG   (dbgShowCleanup ) ;
  -    ADDOPTMG   (dbgProfile     ) ;
  -    ADDOPTMG   (dbgSession     ) ;
  -    ADDOPTMG   (dbgImport      ) ;
  +    ADDOPTMG (optDisableVarCleanup      ) 
  +    ADDOPTMG (optDisableEmbperlErrorPage) 
  +    ADDOPTMG (optReturnError) 
  +    ADDOPTMG (optSafeNamespace          ) 
  +    ADDOPTMG (optOpcodeMask             ) 
  +    ADDOPTMG (optRawInput               ) 
  +    ADDOPTMG (optSendHttpHeader         ) 
  +    ADDOPTMG (optDisableChdir           ) 
  +    ADDOPTMG (optDisableHtmlScan        ) 
  +    ADDOPTMG (optEarlyHttpHeader        ) 
  +    ADDOPTMG (optDisableFormData        ) 
  +    ADDOPTMG (optDisableInputScan       ) 
  +    ADDOPTMG (optDisableTableScan       ) 
  +    ADDOPTMG (optDisableMetaScan        ) 
  +    ADDOPTMG (optAllFormData            ) 
  +    ADDOPTMG (optRedirectStdout         ) 
  +    ADDOPTMG (optUndefToEmptyValue      ) 
  +    ADDOPTMG (optNoHiddenEmptyValue     ) 
  +    ADDOPTMG (optAllowZeroFilesize      ) 
  +    ADDOPTMG (optKeepSrcInMemory       ) 
  +    ADDOPTMG (optKeepSpaces            ) 
  +    ADDOPTMG (optOpenLogEarly          ) 
  +    ADDOPTMG (optNoUncloseWarn         ) 
  +
  +    ADDOPTMG   (dbgStd         ) 
  +    ADDOPTMG   (dbgMem         ) 
  +    ADDOPTMG   (dbgEval        ) 
  +    ADDOPTMG   (dbgCmd         ) 
  +    ADDOPTMG   (dbgEnv         ) 
  +    ADDOPTMG   (dbgForm        ) 
  +    ADDOPTMG   (dbgTab         ) 
  +    ADDOPTMG   (dbgInput       ) 
  +    ADDOPTMG   (dbgFlushOutput ) 
  +    ADDOPTMG   (dbgFlushLog    ) 
  +    ADDOPTMG   (dbgAllCmds     ) 
  +    ADDOPTMG   (dbgSource      ) 
  +    ADDOPTMG   (dbgFunc        ) 
  +    ADDOPTMG   (dbgLogLink     ) 
  +    ADDOPTMG   (dbgDefEval     ) 
  +    ADDOPTMG   (dbgWatchScalar ) 
  +    ADDOPTMG   (dbgHeadersIn   ) 
  +    ADDOPTMG   (dbgShowCleanup ) 
  +    ADDOPTMG   (dbgProfile     ) 
  +    ADDOPTMG   (dbgSession     ) 
  +    ADDOPTMG   (dbgImport      ) 
      
   #ifdef EP2
       DomInit () ;
  @@ -1861,7 +1872,7 @@
   
   
   #ifdef EP2
  -    if ( pConf->bEP1Compat )
  +    if ( pConf->bEP1Compat && !pConf->sPackage )
   	{
   	strcat( cache_key, "-1" ); /* make sure Embperl 1.x compatible files get another namespace */
   	cache_key_len += 2 ;
  @@ -3067,9 +3078,16 @@
   	tConf * pConf = r -> pConf ;
   	
   	tProcessor p2 = {2, "Embperl", embperl_CompileProcessor, NULL, embperl_PreExecuteProcessor, embperl_ExecuteProcessor, "", 
  -	                   pConf -> pCacheKeyCV, pConf -> bCacheKeyOptions, pConf -> nExpiresIn, pConf -> pExpiresCV, NULL } ; 
  -	tProcessor p1 = {1, "Parser",  embperl_ParseProcessor,   NULL, NULL,                        NULL,                     "", NULL, 0, 0, NULL, &p2  } ; 
  -
  +	                   NULL, 0, 0, NULL,  NULL } ; 
  +	tProcessor p1 = {1, "Parser",  embperl_ParseProcessor,   NULL, NULL,                        NULL,                     "", NULL, 0, 0, NULL, NULL } ; 
  +	
  +	/* do this here to make stupid compiler happy (sun cc) */
  +	p2.pCacheKeyCV		= pConf -> pCacheKeyCV ;
  +	p2.bCacheKeyOptions	= pConf -> bCacheKeyOptions ;
  +	p2.nOutputExpiresIn	= pConf -> nExpiresIn ; 
  +	p2.pOutputExpiresCV	= pConf -> pExpiresCV ; 
  +	p1.pNext		= &p2 ;
  +	
   	if (p2.pCacheKeyCV)
   	    SvREFCNT_inc (p2.pCacheKeyCV) ;
   
  
  
  
  1.29      +4 -2      embperl/epnames.h
  
  Index: epnames.h
  ===================================================================
  RCS file: /home/cvs/embperl/epnames.h,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- epnames.h	2001/05/29 06:28:11	1.28
  +++ epnames.h	2001/07/09 05:58:26	1.29
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epnames.h,v 1.28 2001/05/29 06:28:11 richter Exp $
  +#   $Id: epnames.h,v 1.29 2001/07/09 05:58:26 richter Exp $
   #
   ###################################################################################*/
   
  @@ -194,6 +194,7 @@
   #define xDomTreeAttr		    EMBPERL_xDomTreeAttr		   
   #define xNoName			    EMBPERL_xNoName			   
   #define xOrderIndexAttr		    EMBPERL_xOrderIndexAttr		   
  +#define Escape		            EMBPERL_Escape		   
    
    
   #ifndef PERL_VERSION
  @@ -392,4 +393,5 @@
   
   #endif /* endif WIN32 */
   
  -#endif /* APACHE */
  \ No newline at end of file
  +#endif /* APACHE */
  +
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org