richter     2005/10/01 10:20:05

  Modified:    .        epmain.c
               test/cmp execnotfound.htm
  Log:
  fix 404 not found error and error document handling
  
  Revision  Changes    Path
  1.143     +8 -7      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -u -r1.142 -r1.143
  --- epmain.c  25 Sep 2005 13:43:38 -0000      1.142
  +++ epmain.c  1 Oct 2005 17:20:04 -0000       1.143
  @@ -755,12 +755,6 @@
       epTHX_    
   
       dSP;                            /* initialize stack pointer      */
  -#ifdef APACHE
  -     if (r -> pApacheReq && rc >= 400)
  -         r -> pApacheReq -> status = rc ;
  -        else
  -            r -> pApacheReq -> status = 500 ;
  -#endif
       
       if (r -> pApp -> Config.sMailErrorsTo)
           {
  @@ -809,6 +803,13 @@
        PUTBACK;
        perl_call_method ("send_error_page", G_DISCARD) ; 
           SPAGAIN ;
  +#ifdef APACHE
  +     if (r -> pApacheReq)
  +         if (rc >= 400)
  +             r -> pApacheReq -> status = rc ;
  +            else
  +                r -> pApacheReq -> status = 500 ;
  +#endif
           
        SetHashValueInt (r, r -> pThread -> pHeaderHash, "Content-Length", 
GetContentLength (r) ) ;
           }
  
  
  
  1.3       +1 -1      embperl/test/cmp/execnotfound.htm
  
  Index: execnotfound.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/execnotfound.htm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- execnotfound.htm  22 Oct 2002 05:29:09 -0000      1.2
  +++ execnotfound.htm  1 Oct 2005 17:20:05 -0000       1.3
  @@ -7,7 +7,7 @@
   <body>
   
    
  -rc = 12<br>
  +rc = 404<br>
     
   <p>Done.</p>
   </body></html>
  
  
  

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

Reply via email to