richter     02/03/04 03:44:51

  Modified:    .        Tag: Embperl2c Embperl.pm embpcgi.pl.templ
                        embpcgi.test.pl.templ embpexec.pl.templ epapinit.c
                        epcgiinit.c epdat2.h epinit.c epmain.c
                        epocgi.pl.templ epocgi.test.pl.templ eppriv.h
                        test.pl
               test/conf Tag: Embperl2c httpd.conf.src
               xsbuilder/maps Tag: Embperl2c ep_structure.map
  Log:
  cgi mode
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.118.4.94 +5 -4      embperl/Embperl.pm
  
  Index: Embperl.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.pm,v
  retrieving revision 1.118.4.93
  retrieving revision 1.118.4.94
  diff -u -r1.118.4.93 -r1.118.4.94
  --- Embperl.pm        1 Mar 2002 21:51:19 -0000       1.118.4.93
  +++ Embperl.pm        4 Mar 2002 11:44:49 -0000       1.118.4.94
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: Embperl.pm,v 1.118.4.93 2002/03/01 21:51:19 richter Exp $
  +#   $Id: Embperl.pm,v 1.118.4.94 2002/03/04 11:44:49 richter Exp $
   #
   ###################################################################################
   
  @@ -39,6 +39,7 @@
       $cwd 
       $req_rec
       $importno 
  +    %initparam
       ) ;
   
   
  @@ -56,11 +57,11 @@
   
   
   
  -if (!defined(&Embperl::Init))
  -    {
  +if (!defined(&Embperl::Init))
  +    {
       bootstrap Embperl $VERSION;
       Boot ($VERSION) ;
  -    Init (defined(&Apache::server)?Apache -> server:undef, undef) ;
  +    Init (defined(&Apache::server)?Apache -> server:undef, \%initparam) ;
       }
   
   $cwd       = Cwd::fastcwd();
  
  
  
  1.1.4.2   +10 -5     embperl/embpcgi.pl.templ
  
  Index: embpcgi.pl.templ
  ===================================================================
  RCS file: /home/cvs/embperl/embpcgi.pl.templ,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- embpcgi.pl.templ  27 Mar 2001 11:52:02 -0000      1.1.4.1
  +++ embpcgi.pl.templ  4 Mar 2002 11:44:49 -0000       1.1.4.2
  @@ -11,14 +11,19 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: embpcgi.pl.templ,v 1.1.4.1 2001/03/27 11:52:02 richter Exp $
  -#
  +#   $Id: embpcgi.pl.templ,v 1.1.4.2 2002/03/04 11:44:49 richter Exp $
  +#
   ###################################################################################
   
  -use HTML::Embperl;
   
  +BEGIN 
  +    {
  +    %Embperl::initparam = (use_env => 1, use_redirect_env => 1) ;
  +    }        
  +
  +use Embperl;
   
  -my $rc = HTML::Embperl::runcgi ;
  +my $rc = Embperl::Execute ({use_env => 1, use_redirect_env => 1}) ;
   
   if ($rc)
       {
  @@ -32,7 +37,7 @@
   <BODY bgcolor=\"#FFFFFF\">
   <H1>embpcgi Server Error: $rc</H1>
   Please contact the server administrator, $ENV{SERVER_ADMIN} and inform them of the 
time the error occurred, and anything you might have done that may have caused the 
error.<P><P>
  -$ENV{SERVER_SOFTWARE} HTML::Embperl $HTML::Embperl::VERSION [$time]<P>
  +$ENV{SERVER_SOFTWARE} Embperl $Embperl::VERSION [$time]<P>
   </BODY></HTML>
   
   EOT
  
  
  
  1.1.4.4   +2 -3      embperl/embpcgi.test.pl.templ
  
  Index: embpcgi.test.pl.templ
  ===================================================================
  RCS file: /home/cvs/embperl/embpcgi.test.pl.templ,v
  retrieving revision 1.1.4.3
  retrieving revision 1.1.4.4
  diff -u -r1.1.4.3 -r1.1.4.4
  --- embpcgi.test.pl.templ     3 Mar 2002 20:17:40 -0000       1.1.4.3
  +++ embpcgi.test.pl.templ     4 Mar 2002 11:44:49 -0000       1.1.4.4
  @@ -11,10 +11,8 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: embpcgi.test.pl.templ,v 1.1.4.3 2002/03/03 20:17:40 richter Exp $
  -
  +#   $Id: embpcgi.test.pl.templ,v 1.1.4.4 2002/03/04 11:44:49 richter Exp $
   #
  -
   ###################################################################################
   
   
  @@ -30,6 +28,7 @@
           $INC[$i] = "$cwd/$_" if (/^(\.\/)?blib/) ;
           $i++ ;
           }
  +    %Embperl::initparam = (use_env => 1, use_redirect_env => 1) ;
       }        
   
   use Embperl;
  
  
  
  1.1.4.4   +5 -3      embperl/embpexec.pl.templ
  
  Index: embpexec.pl.templ
  ===================================================================
  RCS file: /home/cvs/embperl/embpexec.pl.templ,v
  retrieving revision 1.1.4.3
  retrieving revision 1.1.4.4
  diff -u -r1.1.4.3 -r1.1.4.4
  --- embpexec.pl.templ 11 May 2001 07:13:46 -0000      1.1.4.3
  +++ embpexec.pl.templ 4 Mar 2002 11:44:49 -0000       1.1.4.4
  @@ -11,8 +11,10 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: embpexec.pl.templ,v 1.1.4.3 2001/05/11 07:13:46 richter Exp $
  -#
  +#   $Id: embpexec.pl.templ,v 1.1.4.4 2002/03/04 11:44:49 richter Exp $
  +
  +#
  +
   ###################################################################################
   
   BEGIN
  @@ -22,7 +24,7 @@
   
   use HTML::Embperl;
   
  -die "Do not use as CGI script. Use 'embpcgi.pl' instead" if ($ENV{PATH_TRANSLATED}) 
;
  +die "Do not use as CGI script. Use 'embpcgi.pl' instead" if 
($ENV{GATEWAY_INTERFACE}) ;
   
   HTML::Embperl::run (@ARGV) ;
   
  
  
  
  1.1.2.26  +4 -4      embperl/epapinit.c
  
  Index: epapinit.c
  ===================================================================
  RCS file: /home/cvs/embperl/epapinit.c,v
  retrieving revision 1.1.2.25
  retrieving revision 1.1.2.26
  diff -u -r1.1.2.25 -r1.1.2.26
  --- epapinit.c        2 Mar 2002 19:55:46 -0000       1.1.2.25
  +++ epapinit.c        4 Mar 2002 11:44:49 -0000       1.1.2.26
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epapinit.c,v 1.1.2.25 2002/03/02 19:55:46 richter Exp $
  +#   $Id: epapinit.c,v 1.1.2.26 2002/03/04 11:44:49 richter Exp $
   #
   
###################################################################################*/
   
  @@ -373,7 +373,7 @@
   
           
           if (pDirCfg -> bUseEnv)
  -             embperl_GetCGIAppConfig (pThread, pPool, pConfig, 0) ;
  +             embperl_GetCGIAppConfig (pThread, pPool, pConfig, 1, 0, 0) ;
           }
       else
           embperl_DefaultAppConfig (pConfig) ;
  @@ -406,7 +406,7 @@
           pConfig -> bOptions = pDirCfg -> ComponentConfig.bOptions ;
           
           if (pDirCfg -> bUseEnv)
  -             embperl_GetCGIReqConfig (pApp, pPool, pConfig, 0) ;
  +             embperl_GetCGIReqConfig (pApp, pPool, pConfig, 1, 0, 0) ;
           }
       else
           embperl_DefaultReqConfig (pConfig) ;
  @@ -438,7 +438,7 @@
   
           memcpy (&pConfig -> pPool + 1, &pDirCfg -> ComponentConfig.pPool + 1, 
sizeof (*pConfig) - ((tUInt8 *)(&pConfig -> pPool) - (tUInt8 *)pConfig) - sizeof 
(pConfig -> pPool)) ;
           if (pDirCfg -> bUseEnv)
  -             embperl_GetCGIComponentConfig (pReq, pPool, pConfig, 0) ;
  +             embperl_GetCGIComponentConfig (pReq, pPool, pConfig, 1, 0, 0) ;
           }
       else
           embperl_DefaultComponentConfig (pConfig) ;
  
  
  
  1.1.2.15  +24 -8     embperl/Attic/epcgiinit.c
  
  Index: epcgiinit.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epcgiinit.c,v
  retrieving revision 1.1.2.14
  retrieving revision 1.1.2.15
  diff -u -r1.1.2.14 -r1.1.2.15
  --- epcgiinit.c       3 Mar 2002 20:17:40 -0000       1.1.2.14
  +++ epcgiinit.c       4 Mar 2002 11:44:49 -0000       1.1.2.15
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epcgiinit.c,v 1.1.2.14 2002/03/03 20:17:40 richter Exp $
  +#   $Id: epcgiinit.c,v 1.1.2.15 2002/03/04 11:44:49 richter Exp $
   #
   
###################################################################################*/
   
  @@ -133,6 +133,8 @@
   int embperl_GetCGIAppConfig    (/*in*/ tThreadData * pThread,
                                   /*in*/ tMemPool    * pPool,
                                   /*out*/ tAppConfig * pConfig,
  +                                /*in*/  bool         bUseEnv,
  +                                /*in*/  bool         bUseRedirectEnv,
                                   /*in*/  bool         bSetDefault)
   
   
  @@ -144,10 +146,16 @@
   
       #define EPCFG_APP    
       #define REDIR ""
  -    #include "epcfg.h"
  +    if (bUseEnv)
  +        {
  +        #include "epcfg.h"
  +        }
       #undef REDIR
       #define REDIR "REDIRECT_"
  -    #include "epcfg.h"
  +    if (bUseRedirectEnv)
  +        {
  +        #include "epcfg.h"
  +        }
       #undef EPCFG_APP    
       #undef REDIR
   
  @@ -158,6 +166,8 @@
   int embperl_GetCGIReqConfig    (/*in*/ tApp    *    pApp,
                                   /*in*/ tMemPool    * pPool,
                                   /*out*/ tReqConfig * pConfig,
  +                                /*in*/  bool         bUseEnv,
  +                                /*in*/  bool         bUseRedirectEnv,
                                   /*in*/  bool         bSetDefault)
   
   
  @@ -170,19 +180,23 @@
   
       #define EPCFG_REQ   
       #define REDIR ""
  -    if (pApp -> Config.bUseEnv)
  +    if (bUseEnv)
           {
           #include "epcfg.h"
           }
       #undef REDIR
       #define REDIR "REDIRECT_"
  -    if (pApp -> Config.bUseRedirectEnv)
  +    if (bUseRedirectEnv)
           {
           #include "epcfg.h"
           }
       #undef EPCFG_REQ   
       #undef REDIR
   
  +
  +    if ((bUseEnv || bUseRedirectEnv) && GetHashValueStr (aTHX_ pThread -> pEnvHash, 
"GATEWAY_INTERFACE", NULL))
  +        pConfig -> bOptions |= optSendHttpHeader ;
  +
       return ok ;
       }
   
  @@ -190,6 +204,8 @@
   int embperl_GetCGIComponentConfig    (/*in*/ tReq    *    pReq,
                                       /*in*/ tMemPool    * pPool,
                                       /*out*/ tComponentConfig * pConfig,
  +                                /*in*/  bool         bUseEnv,
  +                                /*in*/  bool         bUseRedirectEnv,
                                       /*in*/  bool         bSetDefault)
   
   
  @@ -203,13 +219,13 @@
   
       #define EPCFG_COMPONENT   
       #define REDIR ""
  -    if (pApp -> Config.bUseEnv)
  +    if (bUseEnv)
           {
           #include "epcfg.h"
           }
       #undef REDIR
       #define REDIR "REDIRECT_"
  -    if (pApp -> Config.bUseRedirectEnv)
  +    if (bUseRedirectEnv)
           {
           #include "epcfg.h"
           }
  @@ -233,7 +249,7 @@
   
       pParam -> sFilename    = GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"PATH_TRANSLATED", "") ;
       pParam -> sUnparsedUri = GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"REQUEST_URI", "") ;
  -    pParam -> sUri         = GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"SCRIPT_NAME", "") ;
  +    pParam -> sUri         = GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"PATH_INFO", "") ;
       pParam -> sPathInfo    = GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"PATH_INFO", "") ;
       pParam -> sQueryInfo   = GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"QUERY_STRING", "") ;
       if (p = GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"HTTP_ACCEPT_LANGUAGE", NULL))
  
  
  
  1.1.2.31  +5 -1      embperl/Attic/epdat2.h
  
  Index: epdat2.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdat2.h,v
  retrieving revision 1.1.2.30
  retrieving revision 1.1.2.31
  diff -u -r1.1.2.30 -r1.1.2.31
  --- epdat2.h  3 Mar 2002 20:17:40 -0000       1.1.2.30
  +++ epdat2.h  4 Mar 2002 11:44:49 -0000       1.1.2.31
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epdat2.h,v 1.1.2.30 2002/03/03 20:17:40 richter Exp $
  +#   $Id: epdat2.h,v 1.1.2.31 2002/03/04 11:44:49 richter Exp $
   #
   
###################################################################################*/
   
  @@ -71,6 +71,8 @@
       {
       SV *        _perlsv ;         /**< The perl reference to this structure */
       tMemPool *  pPool ;  /**< pool for memorymanagement */
  +    bool        bUseEnv ;           /**< Take configuration values out of the 
environment */
  +    bool        bUseRedirectEnv ;   /**< Take configuration values out of the 
environment. Remove REDIRECT_ prefix. */
       char *      sPackage ;
       unsigned    bDebug ;
       unsigned    bOptions ;
  @@ -96,6 +98,8 @@
       {
       SV *        _perlsv ;           /**< The perl reference to this structure */
       tMemPool *  pPool ;             /**< pool for memorymanagement */
  +    bool        bUseEnv ;           /**< Take configuration values out of the 
environment */
  +    bool        bUseRedirectEnv ;   /**< Take configuration values out of the 
environment. Remove REDIRECT_ prefix. */
       CV *        pAllow ;
       CV *        pUriMatch ;
       char        cMultFieldSep ;
  
  
  
  1.1.2.35  +50 -18    embperl/Attic/epinit.c
  
  Index: epinit.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epinit.c,v
  retrieving revision 1.1.2.34
  retrieving revision 1.1.2.35
  diff -u -r1.1.2.34 -r1.1.2.35
  --- epinit.c  2 Mar 2002 19:55:46 -0000       1.1.2.34
  +++ epinit.c  4 Mar 2002 11:44:49 -0000       1.1.2.35
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epinit.c,v 1.1.2.34 2002/03/02 19:55:46 richter Exp $
  +#   $Id: epinit.c,v 1.1.2.35 2002/03/04 11:44:49 richter Exp $
   #
   
###################################################################################*/
   
  @@ -442,9 +442,15 @@
       {
       char * sAppName = NULL ;
       tApp * pApp = NULL ;
  +    HV * pParam = NULL ;
  +
   
       if (pPerlParam && SvROK(pPerlParam))
  -        sAppName = GetHashValueStr (aTHX_ (HV *)SvRV(pPerlParam), "appname", NULL) ;
  +        {
  +        pParam = (HV *)SvRV(pPerlParam) ;
  +        sAppName        = GetHashValueStr (aTHX_ pParam, "appname", NULL) ;
  +        }
  +
   
       if (!sAppName)
           {
  @@ -484,18 +490,24 @@
               embperl_GetApacheAppConfig (pThread, pPool, pApacheCfg, &pApp -> 
Config) ;
           else
   #endif
  -            embperl_GetCGIAppConfig (pThread, pPool, &pApp -> Config, 1) ;
  +            {
  +            bool   bUseEnv = 0 ;
  +            bool   bUseRedirectEnv = 0 ;
  +            if (pParam)
  +                {
  +                bUseEnv         = (bool)GetHashValueInt (aTHX_ pParam, "use_env", 
0) ;
  +                bUseRedirectEnv = (bool)GetHashValueInt (aTHX_ pParam, 
"use_redirect_env", 0) ;
  +                }
  +            embperl_GetCGIAppConfig (pThread, pPool, &pApp -> Config, bUseEnv, 
bUseRedirectEnv, 1) ;
  +            }
   
           SetHashValueInt (NULL, pThread -> pApplications, sAppName, (IV)pApp) ;
           
   
           pApp -> pThread = pThread ;
   
  -        if (pPerlParam && SvROK(pPerlParam))
  -            {
  -            SV * pHV = SvRV(pPerlParam) ;
  -            Embperl__App__Config_new_init(aTHX_ &pApp -> Config, pHV, 0) ;
  -            }
  +        if (pParam)
  +            Embperl__App__Config_new_init(aTHX_ &pApp -> Config, (SV *)pParam, 0) ;
   
           tainted = 0 ;
   
  @@ -1190,6 +1202,7 @@
       tReqConfig *    pConfig ;
       tReqParam  *    pParam ;
       char *          pCookieName ;
  +    HV *            pParamHV = NULL ;
       dSP ;
   
   #ifdef APACHE
  @@ -1199,6 +1212,9 @@
   
       tainted = 0 ;
   
  +    if (pPerlParam && SvROK(pPerlParam))
  +        pParamHV = (HV *)SvRV(pPerlParam) ;
  +
       epxs_Embperl__Req_create_obj(r,pReqSV,pReqRV,ep_palloc(pPool,sizeof(*r))) ;
       epxs_Embperl__Req__Config_create_obj(pConfig,pSV,pRV,&r->Config) ;
       epxs_Embperl__Req__Param_create_obj(pParam,pSV,pRV,&r->Param) ;
  @@ -1245,17 +1261,23 @@
       else
   #endif
           {
  -        embperl_GetCGIReqConfig (pApp, pPool, &r -> Config, 1) ;
  +        bool   bUseEnv = 0 ;
  +        bool   bUseRedirectEnv = 0 ;
  +        if (pParamHV)
  +            {
  +            bUseEnv         = (bool)GetHashValueInt (aTHX_ pParamHV, "use_env", 0) ;
  +            bUseRedirectEnv = (bool)GetHashValueInt (aTHX_ pParamHV, 
"use_redirect_env", 0) ;
  +            }
  +        embperl_GetCGIReqConfig (pApp, pPool, &r -> Config, bUseEnv, 
bUseRedirectEnv, 1) ;
           embperl_GetCGIReqParam  (pApp, pPool, &r -> Param) ;
           }
       
  -    if (pPerlParam && SvROK(pPerlParam))
  +    if (pParamHV)
           {
  -        SV * pHV = SvRV(pPerlParam) ;
  -        Embperl__Req__Config_new_init(aTHX_ &r -> Config, pHV, 0) ;
  -        Embperl__Req__Param_new_init(aTHX_ &r -> Param, pHV, 0) ;
  +        Embperl__Req__Config_new_init(aTHX_ &r -> Config, (SV *)pParamHV, 0) ;
  +        Embperl__Req__Param_new_init(aTHX_ &r -> Param, (SV *)pParamHV, 0) ;
           if (!r -> Param.sFilename || !*r -> Param.sFilename)
  -            r -> Param.sFilename = GetHashValueStrDup(aTHX_ pPool, (HV *)pHV, 
"inputfile", NULL) ;
  +            r -> Param.sFilename = GetHashValueStrDup(aTHX_ pPool, pParamHV, 
"inputfile", NULL) ;
           }
   
       tainted = 0 ;
  @@ -1666,6 +1688,7 @@
       epTHX_
       tComponent * pPrev = NULL ;
       char * p ;
  +    HV *         pParamHV = NULL ;
   
       if (r -> Component._perlsv)
           { /* we have already a component, so let safe it first */
  @@ -1688,6 +1711,8 @@
               *((tComponentParam **)(mg -> mg_ptr)) = &pPrev -> Param ;
           }
   
  +    if (pPerlParam && SvROK(pPerlParam))
  +        pParamHV = (HV *)SvRV(pPerlParam) ;
      
       epxs_Embperl__Component_create_obj(c,pComponentSV, pComponentRV,&r->Component) ;
       epxs_Embperl__Component__Param_create_obj(pParam,pSV, pRV,&r->Component.Param) ;
  @@ -1711,13 +1736,20 @@
       else
   #endif
           {
  -        embperl_GetCGIComponentConfig (r, r -> pPool, &c -> Config, 1) ;
  +        bool   bUseEnv = 0 ;
  +        bool   bUseRedirectEnv = 0 ;
  +        if (pParamHV)
  +            {
  +            bUseEnv         = (bool)GetHashValueInt (aTHX_ pParamHV, "use_env", 0) ;
  +            bUseRedirectEnv = (bool)GetHashValueInt (aTHX_ pParamHV, 
"use_redirect_env", 0) ;
  +            }
  +        embperl_GetCGIComponentConfig (r, r -> pPool, &c -> Config, bUseEnv, 
bUseRedirectEnv, 1) ;
           }
       
  -    if (pPerlParam && SvROK(pPerlParam))
  +    if (pParamHV)
           {
  -        Embperl__Component__Config_new_init (aTHX_ &c -> Config, SvRV(pPerlParam), 
0) ;
  -        Embperl__Component__Param_new_init  (aTHX_ &c -> Param, SvRV(pPerlParam), 
0) ;
  +        Embperl__Component__Config_new_init (aTHX_ &c -> Config, (SV *)pParamHV, 0) 
;
  +        Embperl__Component__Param_new_init  (aTHX_ &c -> Param, (SV *)pParamHV, 0) ;
           }
   
       c -> sCWD = pPrev?pPrev -> sCWD:r -> sInitialCWD ;
  
  
  
  1.75.4.108 +2 -2      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.75.4.107
  retrieving revision 1.75.4.108
  diff -u -r1.75.4.107 -r1.75.4.108
  --- epmain.c  2 Mar 2002 19:55:46 -0000       1.75.4.107
  +++ epmain.c  4 Mar 2002 11:44:49 -0000       1.75.4.108
  @@ -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.75.4.107 2002/03/02 19:55:46 richter Exp $
  +#   $Id: epmain.c,v 1.75.4.108 2002/03/04 11:44:49 richter Exp $
   #
   
###################################################################################*/
   
  @@ -764,7 +764,7 @@
        r -> bExit = 1 ;
        return ok ; /* No further output or header, this should be handle by the 
server */
        }    
  -    else if (!(r -> Component.Config.bOptions & optDisableEmbperlErrorPage))
  +    else if (r -> Component.pOutput && !(r -> Component.Config.bOptions & 
optDisableEmbperlErrorPage))
        {
        oRollbackOutput (r, NULL) ; /* forget everything outputed so far */
        oBegin (r) ;
  
  
  
  1.2.2.2   +15 -30    embperl/epocgi.pl.templ
  
  Index: epocgi.pl.templ
  ===================================================================
  RCS file: /home/cvs/embperl/epocgi.pl.templ,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- epocgi.pl.templ   18 May 2001 08:35:45 -0000      1.2.2.1
  +++ epocgi.pl.templ   4 Mar 2002 11:44:49 -0000       1.2.2.2
  @@ -11,38 +11,23 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epocgi.pl.templ,v 1.2.2.1 2001/05/18 08:35:45 richter Exp $
  +#   $Id: epocgi.pl.templ,v 1.2.2.2 2002/03/04 11:44:49 richter Exp $
   #
   ###################################################################################
  -
  -use HTML::Embperl ;
  -use HTML::EmbperlObject ;
  -
  -my $Logfile    = $ENV{EMBPERL_LOG} || $HTML::Embperl::DefaultLog ;
  -my $rc  ; 
  -my $ioType ;
  -my %req ;
  -
  -HTML::EmbperlObject::ScanEnvironment (\%req) ;
  -
  -$req{'inputfile'} = $ENV{PATH_TRANSLATED} ;
  -$ioType = HTML::Embperl::epIOCGI ;
  -
  -HTML::Embperl::XS_Init ($ioType, $Logfile, $DebugDefault) ;
  -
  -tie *LOG, 'HTML::Embperl::Log' ;
  -
  -$req{'uri'} = $ENV{SCRIPT_NAME} ;
  -
  -$req{'cleanup'} = 0 ;
  -$req{'cleanup'} = -1 if (($req{'options'} & HTML::Embperl::optDisableVarCleanup)) ;
  -$req{'options'} |= HTML::Embperl::optSendHttpHeader ;
  -
  -$rc = HTML::EmbperlObject::Execute (\%req) ;
  -
  -#close LOG ;
  -HTML::Embperl::XS_Term () ;
  -
  +
  +
  +BEGIN 
  +    {
  +    %Embperl::initparam = (use_env => 1, use_redirect_env => 1, debug => 
0x7ffffffd) ;
  +    }        
  +
  +use Embperl;
  +use Embperl::Object ;
  +
  +$^W = 1;
  +
  +my $rc = Embperl::Object::Execute ({use_env => 1, use_redirect_env => 1, debug => 
0x7ffffffd}) ;
  +
   if ($rc)
       {
       $time = localtime ;
  
  
  
  1.2.2.3   +13 -30    embperl/epocgi.test.pl.templ
  
  Index: epocgi.test.pl.templ
  ===================================================================
  RCS file: /home/cvs/embperl/epocgi.test.pl.templ,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- epocgi.test.pl.templ      13 Sep 2001 07:29:43 -0000      1.2.2.2
  +++ epocgi.test.pl.templ      4 Mar 2002 11:44:49 -0000       1.2.2.3
  @@ -11,47 +11,30 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epocgi.test.pl.templ,v 1.2.2.2 2001/09/13 07:29:43 richter Exp $
  +#   $Id: epocgi.test.pl.templ,v 1.2.2.3 2002/03/04 11:44:49 richter Exp $
   #
   ###################################################################################
   
   BEGIN 
       {
       use ExtUtils::testlib ;
  -    eval { require Apache::Session; } if ($ENV{EMBPERL_SESSION_CLASSES}) ;   
  -    $@ = '' ;
  -    $ENV{EMBPERL_OBJECT_BASE} = $ENV{CGIEMBPERL_OBJECT_BASE} ;
  -    $ENV{EMBPERL_OBJECT_FALLBACK} = $ENV{CGIEMBPERL_OBJECT_FALLBACK} ;
  +    my $cwd       = $ENV{EMBPERL_SRC} || $ENV{REDIRECT_EMBPERL_SRC} ;
  +    my $i = 0 ;
  +    foreach (@INC)
  +        {
  +        $INC[$i] = "$cwd/$_" if (/^(\.\/)?blib/) ;
  +        $i++ ;
  +        }
  +    %Embperl::initparam = (use_env => 1, use_redirect_env => 1, debug => 
0x7ffffffd) ;
       }        
   
  -use HTML::Embperl ;
  -use HTML::EmbperlObject ;
  +use Embperl ;
  +use Embperl::Object ;
   
  -my $Logfile    = $ENV{EMBPERL_LOG} || $HTML::Embperl::DefaultLog ;
  -my $rc  ; 
  -my $ioType ;
  -my %req ;
  +$^W = 1;
   
  +my $rc = Embperl::Object::Execute ({use_env => 1, use_redirect_env => 1, debug => 
0x7ffffffd}) ;
   
  -HTML::EmbperlObject::ScanEnvironment (\%req) ;
  -
  -$req{'inputfile'} = $ENV{PATH_TRANSLATED} ;
  -$ioType = HTML::Embperl::epIOCGI ;
  -
  -HTML::Embperl::XS_Init ($ioType, $Logfile, $DebugDefault) ;
  -
  -tie *LOG, 'HTML::Embperl::Log' ;
  -
  -$req{'uri'} = $ENV{SCRIPT_NAME} ;
  -
  -$req{'cleanup'} = 0 ;
  -$req{'cleanup'} = -1 if (($req{'options'} & HTML::Embperl::optDisableVarCleanup)) ;
  -$req{'options'} |= HTML::Embperl::optSendHttpHeader ;
  -
  -$rc = HTML::EmbperlObject::Execute (\%req) ;
  -
  -#close LOG ;
  -HTML::Embperl::XS_Term () ;
   
   if ($rc)
       {
  
  
  
  1.1.2.15  +7 -1      embperl/Attic/eppriv.h
  
  Index: eppriv.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/eppriv.h,v
  retrieving revision 1.1.2.14
  retrieving revision 1.1.2.15
  diff -u -r1.1.2.14 -r1.1.2.15
  --- eppriv.h  10 Feb 2002 21:26:15 -0000      1.1.2.14
  +++ eppriv.h  4 Mar 2002 11:44:49 -0000       1.1.2.15
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: eppriv.h,v 1.1.2.14 2002/02/10 21:26:15 richter Exp $
  +#   $Id: eppriv.h,v 1.1.2.15 2002/03/04 11:44:49 richter Exp $
   #
   
###################################################################################*/
   
  @@ -187,14 +187,20 @@
   int embperl_GetCGIAppConfig    (/*in*/ tThreadData * pThread,
                                   /*in*/ tMemPool    * pPool,
                                   /*out*/ tAppConfig * pConfig,
  +                                /*in*/  bool         bUseEnv,
  +                                /*in*/  bool         bUseRedirectEnv,
                                   /*in*/  bool         bSetDefault) ;
   int embperl_GetCGIReqConfig    (/*in*/ tApp    *    pApp,
                                   /*in*/ tMemPool    * pPool,
                                   /*out*/ tReqConfig * pConfig,
  +                                /*in*/  bool         bUseEnv,
  +                                /*in*/  bool         bUseRedirectEnv,
                                   /*in*/  bool         bSetDefault) ;
   int embperl_GetCGIComponentConfig    (/*in*/ tReq    *    pReq,
                                       /*in*/ tMemPool    * pPool,
                                       /*out*/ tComponentConfig * pConfig,
  +                                /*in*/  bool         bUseEnv,
  +                                /*in*/  bool         bUseRedirectEnv,
                                   /*in*/  bool         bSetDefault) ;
   int embperl_GetCGIReqParam     (/*in*/ tApp        * pApp,
                                   /*in*/ tMemPool    * pPool,
  
  
  
  1.70.4.121 +34 -16    embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.70.4.120
  retrieving revision 1.70.4.121
  diff -u -r1.70.4.120 -r1.70.4.121
  --- test.pl   1 Mar 2002 19:59:23 -0000       1.70.4.120
  +++ test.pl   4 Mar 2002 11:44:49 -0000       1.70.4.121
  @@ -11,7 +11,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: test.pl,v 1.70.4.120 2002/03/01 19:59:23 richter Exp $
  +#   $Id: test.pl,v 1.70.4.121 2002/03/04 11:44:49 richter Exp $
   #
   ###################################################################################
   
  @@ -959,6 +959,7 @@
       $ENV{EMBPERL_DEBUG} = $defaultdebug ;
       $ENV{DMALLOC_OPTIONS} = "log=$tmppath/dmalloc.log,debug=0x3f03" ;
       $ENV{EMBPERL_SESSION_HANDLER_CLASS} = "no" ;
  +    $Embperl::initparam{use_env} = 1 ;
   
       unlink ($logfile) ;
       }
  @@ -1537,7 +1538,7 @@
        {
        $opt_modperl = 1 ;      
        }
  -    elsif ($EPAPACHEVERSION ne '')
  +    elsif ($EPAPACHEVERSION)
           { $opt_cache = $opt_modperl = $opt_cgi = $opt_offline = $opt_execute = 1 }
       else
           { $opt_cache = $opt_offline = $opt_execute = 1 }
  @@ -2009,6 +2010,7 @@
                                                       'debug'      => $defaultdebug,
                                                    'outputfile' => $outfile,
                                                    'errors'     => \@errors,
  +                                                    'use_env'    => 1,
                                                    }) ;
                    print "error $err\n" if ($err) ;
                       
  @@ -2226,6 +2228,7 @@
                                                           input => 
$cachetest->{'src'} || \$src, 
                                                           output => \$out, 
                                                           mtime => 
$cachetest->{'mtime'} || 1,
  +                                                        use_env => 1,
                                                           %{$cachetest->{param}}}) ;
                           $err = CheckError (0) if ($err == 0) ;
                           $err = CmpInMem ($out, $cmp, $cachetest->{'cmp'}) if ($err 
== 0) ;
  @@ -2320,7 +2323,8 @@
        #### Start httpd
        print "\n\nStarting httpd...       " ;
        unlink "$tmppath/httpd.pid" ;
  -        unlink $httpderr ;
  +        unlink $httpderr ;
  +
        chmod 0666, $logfile ;
        $XX = $opt_multchild && !($opt_gdb || $opt_ddd)?'':'-X' ;
   
  @@ -2360,7 +2364,8 @@
   
           my $tries = ($opt_gdb || $opt_ddd)?20:10 ;
           $httpdpid = 0 ;
  -        my $herr = 0 ;
  +        my $herr = 0 ;
  +
           while ($tries-- > 0)
               {
            if (open FH, "$tmppath/httpd.pid")
  @@ -2370,20 +2375,32 @@
                close FH ;
                   last ;
                   }
  -            if ($herr || open (HERR, $httpderr))
  -                {  
  -             seek HERR, 0, 1 ;
  -                print "\n" if (!$herr) ;
  -                $herr = 1 ;
  -                while (<HERR>)
  -                    {
  -                    print ;
  -                    }
  -                }
  -
  +            if ($herr || open (HERR, $httpderr))
  +
  +                {  
  +
  +             seek HERR, 0, 1 ;
  +
  +                print "\n" if (!$herr) ;
  +
  +                $herr = 1 ;
  +
  +                while (<HERR>)
  +
  +                    {
  +
  +                    print ;
  +
  +                    }
  +
  +                }
  +
  +
  +
               sleep (1) ;
               }
  -        close HERR if ($herr) ;
  +        close HERR if ($herr) ;
  +
   
           die "Cannot open $tmppath/httpd.pid" if (!$httpdpid) ;
        
  @@ -2429,6 +2446,7 @@
               $testnum++ ;
               $testversion = $version == 2 && !$ep1compat?2:1 ;
   
  +            last if ($testnum > 8 && $loc ne $embploc) ; 
               next if ($test->{noloop} && $loopcnt > 0) ;
               next if ($test->{version} && $testversion != $test->{version}) ;
               next if ($loc eq $embploc && 
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.24.4.51 +56 -19    embperl/test/conf/httpd.conf.src
  
  Index: httpd.conf.src
  ===================================================================
  RCS file: /home/cvs/embperl/test/conf/httpd.conf.src,v
  retrieving revision 1.24.4.50
  retrieving revision 1.24.4.51
  diff -u -r1.24.4.50 -r1.24.4.51
  --- httpd.conf.src    3 Mar 2002 20:17:40 -0000       1.24.4.50
  +++ httpd.conf.src    4 Mar 2002 11:44:50 -0000       1.24.4.51
  @@ -23,13 +23,6 @@
   MaxRequestsPerChild 0
   
   
  -#PerlFixupHandler test::handler
  -
  -#PerlInitHandler Apache::Reload 
  -
  -#PerlInitHandler Apache::StatINC 
  -
  -
   EOD
       }
   
  @@ -70,16 +63,14 @@
   
   
   if ($EPSESSIONVERSION && ($EPSESSIONVERSION > 1))
  -     {
  +    {
   print OFH <<EOD ;
   
   EMBPERL_SESSION_CLASSES "File Null"
   EMBPERL_SESSION_ARGS "'Directory=$EPPATH/test/tmp'"
   EOD
  -     }
  -
  -
  -if (!$EPSESSIONXVERSION)
  +    }
  +else
       {
   print OFH <<EOD ;
   
  @@ -195,7 +186,7 @@
   </Location>
   
   <Location /cgi-bin/rawinput>
  -EMBPERL_OPTIONS 16
  +SetEnv EMBPERL_OPTIONS 16
   </Location>
   
   <Location /embperl/nochdir>
  @@ -333,21 +324,67 @@
   <Location /cgi-bin>
   Action text/html /cgi/embpcgi.test.pl
   Options ExecCGI
  +EOD
  +
  +
  +if ($EPSESSIONVERSION && ($EPSESSIONVERSION > 1))
  +    {
  +print OFH <<EOD ;
  +
  +SetEnv EMBPERL_SESSION_CLASSES "File Null"
  +SetEnv EMBPERL_SESSION_ARGS "'Directory=$EPPATH/test/tmp'"
  +EOD
  +    }
  +else
  +    {
  +print OFH <<EOD ;
  +
   SetEnv EMBPERL_SESSION_HANDLER_CLASS no
  +EOD
  +    }
  +
  +
  +print OFH <<EOD ;
  +
  +SetEnv EMBPERL_ALLOW (asc|\\.xml\$|\\.htm\$)
  +
   </Location>
   
   <Location /cgi-bin2>
   Action text/html /cgi/embpcgi.test.pl
   Options ExecCGI
  -</Location>
  +EOD
  +
  +if ($EPSESSIONVERSION && ($EPSESSIONVERSION > 1))
  +    {
  +print OFH <<EOD ;
  +
  +SetEnv EMBPERL_SESSION_CLASSES "File Null"
  +SetEnv EMBPERL_SESSION_ARGS "'Directory=$EPPATH/test/tmp'"
  +EOD
  +    }
  +else
  +    {
  +print OFH <<EOD ;
   
  +SetEnv EMBPERL_SESSION_HANDLER_CLASS no
  +EOD
  +    }
  +
  +
  +print OFH <<EOD ;
  +
  +SetEnv EMBPERL_ALLOW (asc|\\.xml\$|\\.htm\$)
  +
  +</Location>
   
  -SetEnv CGIEMBPERL_OBJECT_BASE epobase.htm
  -SetEnv CGIEMBPERL_OBJECT_FALLBACK epofallback.htm
   
   <Location /cgi-bin/EmbperlObject>
   Action text/html /cgi/epocgi.test.pl
   Options ExecCGI
  +SetEnv EMBPERL_OBJECT_BASE epobase.htm
  +SetEnv EMBPERL_OBJECT_FALLBACK epofallback.htm
  +
   </Location>
   
   
  @@ -443,15 +480,15 @@
   
   
   <Location /cgi-bin/SSI/>
  -EMBPERL_SYNTAX SSI
  +SetEnv EMBPERL_SYNTAX SSI
   </Location>
   
   <Location /cgi-bin/SSIEP/>
  -EMBPERL_SYNTAX "Embperl SSI"
  +SetEnv EMBPERL_SYNTAX "Embperl SSI"
   </Location>
   
   <Location /cgi-bin/pod/>
  -EMBPERL_SYNTAX POD
  +SetEnv EMBPERL_SYNTAX POD
   </Location>
   
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.23  +0 -2      embperl/xsbuilder/maps/Attic/ep_structure.map
  
  Index: ep_structure.map
  ===================================================================
  RCS file: /home/cvs/embperl/xsbuilder/maps/Attic/ep_structure.map,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- ep_structure.map  3 Mar 2002 20:17:40 -0000       1.1.2.22
  +++ ep_structure.map  4 Mar 2002 11:44:51 -0000       1.1.2.23
  @@ -81,8 +81,6 @@
    <tAppConfig>
   !   _perlsv
      sAppName | app_name
  -   bUseEnv | use_env 
  -   bUseRedirectEnv | use_redirect_env 
      pSessionArgs | session_args
      pSessionClasses | session_classes
      sSessionConfig | session_config
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to