Revision: 14753
Author: adrian.chadd
Date: Mon Aug  9 23:40:37 2010
Log: Return the correct Content-Length for error pages when they're not being sent.


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

Modified:
 /branches/LUSCA_HEAD/src/errorpage.c

=======================================
--- /branches/LUSCA_HEAD/src/errorpage.c        Mon Aug  9 18:58:36 2010
+++ /branches/LUSCA_HEAD/src/errorpage.c        Mon Aug  9 23:40:37 2010
@@ -652,7 +652,14 @@
httpHeaderPutStrf(&rep->header, HDR_X_SQUID_ERROR, "%d %s", err->http_status, "Access Denied");
     } else {
        MemBuf content = errorBuildContent(err);
- httpReplySetHeaders(rep, err->http_status, NULL, "text/html", content.size, -1, -1);
+       size_t content_length;
+
+       if (Config.onoff.blank_error_pages)
+               content_length = 0;
+       else
+               content_length = content.size;
+
+ httpReplySetHeaders(rep, err->http_status, NULL, "text/html", content_length, -1, -1);
        /*
         * include some information for downstream caches. Implicit
         * replaceable content. This isn't quite sufficient. xerrno is not

--
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