richter     2005/08/08 22:12:19

  Modified:    .        Changes.pod Embperl.xs ep.h epmain.c
               Embperl  Object.pm
               eg/web/db epwebapp.pl
               test/conf startup.pl
  Log:
     - http headers from %http_headers_out will now also be send when the
       init method of an application object return non zero (e.g. 302 for 
redirect).
  
  Revision  Changes    Path
  1.285     +6 -0      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.284
  retrieving revision 1.285
  diff -u -r1.284 -r1.285
  --- Changes.pod       7 Aug 2005 15:59:08 -0000       1.284
  +++ Changes.pod       9 Aug 2005 05:12:19 -0000       1.285
  @@ -1,6 +1,12 @@
   =pod
   
   
  +=head4 2.0rc6
  +
  +   - http headers from %http_headers_out will now also be send when the
  +     init method of an application object return non zero (e.g. 302 for 
redirect).
  +
  +
   =head4 2.0rc5 7. August 2005
   
      - Added attribute content-type to mail:send tag (Syntax Mail).
  
  
  
  1.59      +9 -0      embperl/Embperl.xs
  
  Index: Embperl.xs
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.xs,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- Embperl.xs        27 Feb 2005 20:05:47 -0000      1.58
  +++ Embperl.xs        9 Aug 2005 05:12:19 -0000       1.59
  @@ -128,6 +128,15 @@
       RETVAL
   
   
  +int
  +embperl_send_http_header(pReq)
  +    tReq * pReq;
  +CODE:
  +    RETVAL = embperl_SendHttpHeader (pReq) ;
  +OUTPUT:
  +    RETVAL
  +
  +
   
   
   
  
  
  
  1.48      +1 -48     embperl/ep.h
  
  Index: ep.h
  ===================================================================
  RCS file: /home/cvs/embperl/ep.h,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ep.h      31 Oct 2004 14:17:25 -0000      1.47
  +++ ep.h      9 Aug 2005 05:12:19 -0000       1.48
  @@ -215,50 +215,9 @@
   int ExecuteReq (/*i/o*/ register req * r,
                   /*in*/  SV *           pReqSV) ;
   
  -#if 0
  -tReq * SetupRequest (/*in*/ SV *    pApacheReqSV,
  -                     /*in*/ char *  sSourcefile,
  -                     /*in*/ double  mtime,
  -                     /*in*/ long    nFilesize,
  -                     /*in*/ int     nFirstLine,
  -                     /*in*/ char *  sOutputfile,
  -                     /*in*/ tConf * pConf,
  -                     /*in*/ int     nIOType,
  -                     /*in*/ SV *    pIn,
  -                     /*in*/ SV *    pOut,
  -                  /*in*/ char *  sSubName,
  -                  /*in*/ char *  sImport,
  -                  /*in*/ int     nSessionMgnt,
  -                     /*in*/ tTokenTable * pTokenTable) ;
  -
  -void FreeRequest (/*i/o*/ register req * r) ;
  -                   
  -tFile * SetupFileData   (/*i/o*/ register req * r,
  -                         /*in*/ char *  sSourcefile,
  -                         /*in*/ double  mtime,
  -                         /*in*/ long    nFilesize,
  -                         /*in*/ int     nFirstLine,
  -                         /*in*/ tConf * pConf) ;
  -
  -tFile * GetFileData     (/*in*/  char *  sSourcefile,
  -                         /*in*/  char *  sPackage,
  -                         /*in*/  double  mtime,
  -                      /*in*/  int     bEP1Compat) ;
  -
  -                      
  -tConf * SetupConfData   (/*in*/ HV *   pReqInfo,
  -                         /*in*/ SV *   pOpcodeMask) ;
   
  -void FreeConfData       (/*in*/ tConf *   pConf) ;
  -                         
  -#endif
  +int embperl_SendHttpHeader (/*i/o*/ register req * r) ;
   
  -int ScanCmdEvalsInString (/*i/o*/ register req * r,
  -                     /*in*/  char *   pIn,
  -                          /*out*/ char * * pOut,
  -                          /*in*/  size_t   nSize,
  -                          /*out*/ char * * pFree) ;
  -    
   char * LogError        (/*i/o*/ register req * r,
                        /*in*/  int   rc) ;
   char * LogErrorParam   (/*i/o*/ struct tApp * a,
  @@ -273,12 +232,6 @@
                         /*in*/  int     nBlockStart,
                         /*in*/  int     nBlockSize,
                            /*in*/  int     nBlockNo) ;
  -#if 0
  -int ProcessSub               (/*i/o*/ register req * r,
  -                      /*in*/  tFile * pFile,
  -                      /*in*/  int     nBlockStart,
  -                         /*in*/  int     nBlockNo) ;
  -#endif
   void NewEscMode (/*i/o*/ register req * r,
                                   SV * pSV) ;
   
  
  
  
  1.141     +3 -4      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- epmain.c  7 Aug 2005 00:02:58 -0000       1.140
  +++ epmain.c  9 Aug 2005 05:12:19 -0000       1.141
  @@ -821,8 +821,7 @@
   
   
   
  -static int SendHttpHeader (/*i/o*/ register req * r)
  -                     
  +int embperl_SendHttpHeader (/*i/o*/ register req * r)
   
       {                    
       epTHX_
  @@ -1157,7 +1156,7 @@
   
       if (!(r -> Config.bOptions & optEarlyHttpHeader) && 
           (r -> Config.bOptions & optSendHttpHeader) && !r -> 
Component.Param.pOutput)
  -        SendHttpHeader (r) ;
  +        embperl_SendHttpHeader (r) ;
   
       if (r -> Component.Param.pOutput)
           return OutputToMem (r) ;
  
  
  
  1.18      +2 -1      embperl/Embperl/Object.pm
  
  Index: Object.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl/Object.pm,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Object.pm 8 Aug 2005 13:42:44 -0000       1.17
  +++ Object.pm 9 Aug 2005 05:12:19 -0000       1.18
  @@ -318,6 +318,7 @@
                       }
                   elsif ($status) 
                       {
  +                    $r -> send_http_header ;
                       $r -> cleanup ;
                       print Embperl::LOG "[$$]Embperl::Object Application -> 
init had returned $status\n"  if ($debug);
                       return $status ;
  
  
  
  1.15      +0 -4      embperl/eg/web/db/epwebapp.pl
  
  Index: epwebapp.pl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/db/epwebapp.pl,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- epwebapp.pl       8 Aug 2005 13:42:44 -0000       1.14
  +++ epwebapp.pl       9 Aug 2005 05:12:19 -0000       1.15
  @@ -757,11 +757,7 @@
   
       my $dest = join ('&', map { $_ . '=' . $r -> Escape (ref 
($params{$_})?join("\t", @{$params{$_}}):$params{$_} , 2) } keys %params) ;
   
  -    #$http_headers_out{'location'} = "show.epl?$dest";
       my ($uri) = split (/\?/, $r -> param -> unparsed_uri, 1) ;
  -    #Apache -> request -> err_header_out('location', $r -> param -> 
server_addr . dirname ($uri) ."/show.epl?$dest") ;
  -    #Apache -> request -> err_header_out('location', 
'http://www.ecos.de:8766' . dirname ($r -> param -> uri) ."/show.epl?$dest") ;
  -
       $http_headers_out{'location'} = $r -> param -> server_addr . dirname 
($uri) ."/show.epl?$dest" ;
       
       return 302 ;
  
  
  
  1.26      +2 -1      embperl/test/conf/startup.pl
  
  Index: startup.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test/conf/startup.pl,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- startup.pl        7 Aug 2005 00:52:30 -0000       1.25
  +++ startup.pl        9 Aug 2005 05:12:19 -0000       1.26
  @@ -52,7 +52,8 @@
           {
           $Embperl::initparam{debug} = 0x7fffffff ;
           $Embperl::initparam{preloadfiles} = [
  -                { inputfile  => "$cwd/test/html/div.htm", import => 0, 
input_escmode => 7, req_rec => undef }
  +                { inputfile  => "$cwd/test/html/div.htm",  input_escmode => 
7, debug => 0x7fffffff },
  +                { inputfile  => 
"$cwd/test/html/EmbperlObject/sub/eposubs.htm", input_escmode => 7, debug => 
0x7fffffff }
                   ] ;
           print "Preload initated\n" ;
           }
  
  
  

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

Reply via email to