简体   繁体   中英

How to use Java ICAP codec with Squid

I am trying use Java ICAP Codec 1.0.0.GA Squid Echo example with Squid and got the following exception

ch.mimo.netty.handler.codec.icap.IcapDecodingError: Mandatory ICAP message header [Encapsulated] is missing
    at ch.mimo.netty.handler.codec.icap.ReadIcapHeaderState.validateMandatoryMessageHeaders(ReadIcapHeaderState.java:104)
    at ch.mimo.netty.handler.codec.icap.ReadIcapHeaderState.execute(ReadIcapHeaderState.java:54)
    at ch.mimo.netty.handler.codec.icap.IcapMessageDecoder.decode(IcapMessageDecoder.java:97)
    at ch.mimo.netty.handler.codec.icap.IcapMessageDecoder.decode(IcapMessageDecoder.java:37)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:470)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:443)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)

Here is my Squid config (related to ICAP):

icap_enable on
icap_service service_req reqmod_precache icap://127.0.0.1:1344
adaptation_access service_req allow all

What is the problem ?

Squid's ICAP client is known not to add an Encapsulated Header to Options requests. The latest 1.0.0.GA release of the Java ICAP Codec will handle Options, and 100 Continue requests with missing Encapsulated headers.

I suggest you dump the network traffic with Wireshark and post it here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM