如何将 Java ICAP 编解码器与 Squid 一起使用
我正在尝试使用 Java ICAP Codec 1.0.0.GA Squid Echo 示例与 Squid 并得到以下异常
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)
这是我的 Squid 配置(与 ICAP 相关):
icap_enable on
icap_service service_req reqmod_precache icap://127.0.0.1:1344
adaptation_access service_req allow all
有什么问题?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
众所周知,Squid 的 ICAP 客户端不会将封装标头添加到选项请求中。最新 1.0.0.GA 版本的 Java ICAP 编解码器 将处理选项和 100 个缺少封装标头的继续请求。
我建议您使用 Wireshark 转储网络流量并将其发布到此处。
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.