Revision: 14464
Author: adrian.chadd
Date: Sat Mar 20 01:31:20 2010
Log: Add a new configuration option which enables logging HTTP protocol
violations
to cache.log.
Set it to default to "off", so HTTP protocol violations aren't logged.
http://code.google.com/p/lusca-cache/source/detail?r=14464
Modified:
/branches/LUSCA_HEAD/src/cf.data.pre
/branches/LUSCA_HEAD/src/http.c
/branches/LUSCA_HEAD/src/structs.h
=======================================
--- /branches/LUSCA_HEAD/src/cf.data.pre Fri Feb 19 19:58:24 2010
+++ /branches/LUSCA_HEAD/src/cf.data.pre Sat Mar 20 01:31:20 2010
@@ -3724,6 +3724,21 @@
By default, headers are removed if denied.
DOC_END
+NAME: log_http_violations
+COMMENT: on|off
+TYPE: onoff
+LOC: Config.onoff.log_http_violations
+DEFAULT: off
+DOC_START
+ The earlier behaviour in Squid/Lusca was to log HTTP protocol
+ violations in cache.log. Although useful for debugging, these
+ messages are increasingly becoming more frequent as various
+ poor HTTP implementations make it out into the real world.
+
+ By default, these messages are now not logged.
+ Enable this to re-enable the verbose HTTP logging.
+DOC_END
+
NAME: relaxed_header_parser
COMMENT: on|off|warn
TYPE: tristate
=======================================
--- /branches/LUSCA_HEAD/src/http.c Tue Feb 16 03:21:51 2010
+++ /branches/LUSCA_HEAD/src/http.c Sat Mar 20 01:31:20 2010
@@ -518,7 +518,8 @@
}
if (item) {
/* Can't handle other transfer-encodings */
- debug(11, 1) ("Unexpected transfer encoding '%.*s'\n", strLen2(tr),
strBuf2(tr));
+ if (Config.onoff.log_http_violations)
+ debug(11, 1) ("Unexpected transfer encoding '%.*s'\n", strLen2(tr),
strBuf2(tr));
reply->sline.status = HTTP_INVALID_HEADER;
return -1;
}
@@ -921,9 +922,9 @@
* someone gets the time/motivation to rewrite the HTTP server-side
code.
*/
if (len > 0 && httpState->chunk_size == 0) {
- debug(11, 1) ("httpReadReply: Unexpected reply body data from
\"%s %s\"\n",
- urlMethodGetConstStr(orig_request->method),
- storeUrl(entry));
+ if (Config.onoff.log_http_violations)
+ debug(11, 1) ("httpReadReply: Unexpected reply body data from
\"%s %s\"\n",
+ urlMethodGetConstStr(orig_request->method), storeUrl(entry));
comm_close(fd);
return;
}
=======================================
--- /branches/LUSCA_HEAD/src/structs.h Sat Feb 20 00:10:33 2010
+++ /branches/LUSCA_HEAD/src/structs.h Sat Mar 20 01:31:20 2010
@@ -678,6 +678,7 @@
int load_check_stopen;
int load_check_stcreate;
int download_fastest_client_speed;
+ int log_http_violations;
} 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.