[Zope] mod_pcgi2 bug and fix

Oleg Broytmann phd@phd.russ.ru
Mon, 14 Feb 2000 13:12:02 +0000 (GMT)


Hello!

   Few times in my life - at least the part of my life I am using Zope :-) -
I noted I have problems when pressing Reload in browser frequently.
Recently I found the same problems when I made an error and generate a page
that reloads itself using <META> and javascript window.location.
   Vladimir Bormotov <bor@vb.dn.ua> found what we think is the cause of
these problems. He also created a patch for the problem. The patch is
below, if mod_pcgi2 users want to use it right now. I hope to announce
mod_pcgi2 version 1.0.1 later today or tomorrow, after more testing.

   (It seems Zope and mod_pcgi2 are gaining more and more users among
Russian-speaking people :)

   Patch:

--- mod_pcgi2.c.orig	Thu Feb 10 00:32:41 2000
+++ mod_pcgi2.c	Mon Feb 14 05:01:35 2000
@@ -829,11 +829,13 @@
     {
       int sent;
       char buffer[HUGE_STRING_LEN+1];
+      int scan_err_res;
 
-      if (ap_scan_script_header_err_core(req, buffer, getsfunc_STRING, r) != OK) {
-        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 
-                     req->server, "error while scanning PCGI script headers");
-        return HTTP_INTERNAL_SERVER_ERROR;
+      scan_err_res = ap_scan_script_header_err_core(req, buffer, getsfunc_STRING, r);
+      if (scan_err_res != OK && scan_err_res != HTTP_NOT_MODIFIED) {
+        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 
+           req->server, "error while scanning PCGI script headers");
+           return HTTP_INTERNAL_SERVER_ERROR;
       }
 
       ap_send_http_header(req);

Oleg.
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd@phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.