Netty Mimo ICAP编解码器,不适用于HTTP 403
我们正在使用netty ICAP客户端。当服务器响应HTTP 403时,客户端似乎在读取HTTP头时关闭。谢谢你的帮助 来自mimo编解码器的日志 IcapClient主机IP绝对文件路径 跳过控制字符------- 读取ICAP初始状态------- 读取\u ICAP\u标题\u状态------- 读取\u HTTP\u请求\u初始\u和\u头-------Netty Mimo ICAP编解码器,不适用于HTTP 403,netty,Netty,我们正在使用netty ICAP客户端。当服务器响应HTTP 403时,客户端似乎在读取HTTP头时关闭。谢谢你的帮助 来自mimo编解码器的日志 IcapClient主机IP绝对文件路径 跳过控制字符------- 读取ICAP初始状态------- 读取\u ICAP\u标题\u状态------- 读取\u HTTP\u请求\u初始\u和\u头------- 2013年2月8日下午4:15:53 org.jboss.netty.channel.SimpleChannelUpstreamHan
2013年2月8日下午4:15:53 org.jboss.netty.channel.SimpleChannelUpstreamHandler
警告:异常,请实现com.chunk.IcapClientHandler.exceptionCaught()以正确处理。
java.lang.IllegalArgumentException:版本格式无效:禁止
位于org.jboss.netty.handler.codec.http.HttpVersion.(HttpVersion.java:102)
位于org.jboss.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:62)
在ch.mimo.netty.handler.codec.icap.ReadHttpRequestInitiatialAndHeaderState.execute(ReadHttpRequestInitiatialAndHeaderState.java:52)
在ch.mimo.netty.handler.codec.icap.IcapMessageDecoder.decode(IcapMessageDecoder.java:98)
在ch.mimo.netty.handler.codec.icap.IcapMessageDecoder.decode(IcapMessageDecoder.java:1)
在org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500)上
位于org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
在org.jboss.netty.channel.Channels.fireMessageReceived上(Channels.java:268)
在org.jboss.netty.channel.Channels.fireMessageReceived上(Channels.java:255)
位于org.jboss.netty.channel.socket.nio.niower.read(niower.java:88)
响应的数据包捕获:
ICAP/1.0 200正常
封装:req hdr=0,res hdr=0,res body=176
日期:2013年2月8日星期五09:35:39 GMT
服务:Somethin Systems Somethin Systems DLP SDK ICAP Server 1.0
HTTP/1.1 403禁止
内容类型:text/xml
内容长度:1118
服务器:Somethin Systems Somethin Systems DLP SDK ICAP Server 1.0
日期:2013年2月8日星期五09:35:39 GMT
45e
3.
上面的xml被截断。我发现ICAP响应中不允许使用“req hdr=0”。换句话说,问题更多的是ICAP服务器发送不一致的响应
8 Feb, 2013 4:15:53 PM org.jboss.netty.channel.SimpleChannelUpstreamHandler
WARNING: EXCEPTION, please implement com.chunk.IcapClientHandler.exceptionCaught() for proper handling.
java.lang.IllegalArgumentException: invalid version format: FORBIDDEN
at org.jboss.netty.handler.codec.http.HttpVersion.<init>(HttpVersion.java:102)
at org.jboss.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:62)
at ch.mimo.netty.handler.codec.icap.ReadHttpRequestInitialAndHeadersState.execute(ReadHttpRequestInitialAndHeadersState.java:52)
at ch.mimo.netty.handler.codec.icap.IcapMessageDecoder.decode(IcapMessageDecoder.java:98)
at ch.mimo.netty.handler.codec.icap.IcapMessageDecoder.decode(IcapMessageDecoder.java:1)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)