Revision: 14750
Author: adrian.chadd
Date: Mon Aug  9 18:58:36 2010
Log: Add an option to return blank error pages. Another hack for people who wish

to do transparent interception and not hint they're running Squid.


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

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        Sun Aug  8 06:47:12 2010
+++ /branches/LUSCA_HEAD/src/cf.data.pre        Mon Aug  9 18:58:36 2010
@@ -5212,6 +5212,16 @@
        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: blank_error_pages
+TYPE: onoff
+LOC: Config.onoff.blank_error_pages
+DEFAULT: on
+DOC_START
+       This option forces all error pages to simply be blank.
+
        It defaults to "off".
 DOC_END

=======================================
--- /branches/LUSCA_HEAD/src/errorpage.c        Sun Aug  8 06:47:12 2010
+++ /branches/LUSCA_HEAD/src/errorpage.c        Mon Aug  9 18:58:36 2010
@@ -663,7 +663,10 @@
         */
        httpHeaderPutStrf(&rep->header, HDR_X_SQUID_ERROR, "%s %d",
            name, err->xerrno);
-       httpBodySet(&rep->body, &content);
+       /* Only append the body if we need to */
+       /* XXX this shouldn't be done here? */
+       if (! Config.onoff.blank_error_pages)
+               httpBodySet(&rep->body, &content);
        /* do not memBufClean() the content, it was absorbed by httpBody */
     }
     return rep;
=======================================
--- /branches/LUSCA_HEAD/src/structs.h  Sun Aug  8 06:47:12 2010
+++ /branches/LUSCA_HEAD/src/structs.h  Mon Aug  9 18:58:36 2010
@@ -680,6 +680,7 @@
        int download_fastest_client_speed;
        int log_http_violations;
        int tcp_reset_on_all_errors;
+       int blank_error_pages;
     } 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