Accept ICAP OPTIONS responses with unknown body types.
Warn about the unknown OPTIONS body type but ignore it instead of
rejecting the entire OPTIONS response. Note that ICAP does not
standardize OPTIONS body types, and Squid does not recognize any body type.
This patch is required for compatibility with some ICAP servers.
Alex.
Accept ICAP OPTIONS responses with unknown body types.
Warn about the unknown OPTIONS body type but ignore it instead of rejecting
the entire OPTIONS response. Note that ICAP does not standardize OPTIONS
body types, and Squid does not recognize any body type.
=== modified file 'src/adaptation/icap/Options.cc'
--- src/adaptation/icap/Options.cc 2009-03-08 13:26:07 +0000
+++ src/adaptation/icap/Options.cc 2009-11-25 00:23:24 +0000
@@ -91,8 +91,11 @@
istag = h->getByName("ISTag");
- if (h->getByName("Opt-body-type").size())
- error = "ICAP service returns unsupported OPTIONS body";
+ if (h->getByName("Opt-body-type").size()) {
+ debugs(93,1, "WARNING: Ignoring unsupported ICAP OPTIONS body: " <<
+ h->getByName("Opt-body-type"));
+ // do not set error, assuming the rest of the response is valid
+ }
cfgIntHeader(h, "Max-Connections", max_connections);