Revision: 14749
Author: adrian.chadd
Date: Sun Aug  8 06:47:12 2010
Log: Add a hack: tcp_reset_on_all_errors - which does exactly what it says.


http://code.google.com/p/lusca-cache/source/detail?r=14749

Modified:
 /branches/LUSCA_HEAD/src/cf.data.pre
 /branches/LUSCA_HEAD/src/errorpage.c
 /branches/LUSCA_HEAD/src/structs.h

=======================================
--- /branches/LUSCA_HEAD/src/cf.data.pre        Thu Aug  5 05:25:41 2010
+++ /branches/LUSCA_HEAD/src/cf.data.pre        Sun Aug  8 06:47:12 2010
@@ -5204,6 +5204,17 @@
        insert a %L tag in the error template file.
 DOC_END

+NAME: tcp_reset_on_all_errors
+TYPE: onoff
+LOC: Config.onoff.tcp_reset_on_all_errors
+DEFAULT: off
+DOC_START
+       This option forces a client-side connection to be forcibly
+       closed in all instances where an error page would be returned.
+
+       It defaults to "off".
+DOC_END
+
 NAME: deny_info
 TYPE: denyinfo
 LOC: Config.denyInfoList
=======================================
--- /branches/LUSCA_HEAD/src/errorpage.c        Mon Oct 26 23:58:33 2009
+++ /branches/LUSCA_HEAD/src/errorpage.c        Sun Aug  8 06:47:12 2010
@@ -315,6 +315,19 @@
            err->request->flags.reset_tcp = 1;
        }
     }
+
+    /*
+     *  This is a temporary(!) hack. If we get here, an error page has
+     * been created for some error condition. This global option will
+     * set the reset_tcp flag for all requests.
+     */
+    if (Config.onoff.tcp_reset_on_all_errors) {
+       if (err->request) {
+           debug(4, 2) ("RSTing this reply: tcp_reset_on_all_errors was 
set!\n");
+           err->request->flags.reset_tcp = 1;
+        }
+    }
+
     storeLockObject(entry);
     storeBuffer(entry);
     rep = errorBuildReply(err);
=======================================
--- /branches/LUSCA_HEAD/src/structs.h  Thu Aug  5 05:25:41 2010
+++ /branches/LUSCA_HEAD/src/structs.h  Sun Aug  8 06:47:12 2010
@@ -679,6 +679,7 @@
        int load_check_stcreate;
        int download_fastest_client_speed;
        int log_http_violations;
+       int tcp_reset_on_all_errors;
     } onoff;
     int collapsed_forwarding_timeout;
     acl *aclList;

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to