100-continue不由AsyncHttpClient处理。如何使它工作?

时间:2015-05-21 06:37:59

标签: netty asynchttpclient

以下是来自服务器的请求标头和响应(100-continue)响应,之后重置连接 服务器返回100-continue,但客户端不会等到它获得200OK并重置连接。如何使客户端等到200OK。

ContentType: application/json
Expect: 100-continue
Content-Length: 113365
Content-Type: multipart/form-data; boundary=gWa8t5W_OdBOuJ3bkZHMbn7-i56r_807wz6Q_qr
Connection: keep-alive
Accept: */*
User-Agent: xyz/abc

Response DefaultHttpResponse(chunked: false)   
HTTP/1.1 100 Continue

2015-05-21 05:14:40,406 [DEBUG] - Unexpected I/O exception on channel [id: 0x732dfcd6, /10.28.211.80:55487 => ws.example.com/98.132.140.35:4080]
java.io.IOException: Connection reset by peer
    at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[na:1.8.0_25]
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[na:1.8.0_25]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[na:1.8.0_25]              at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.8.0_25]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:470) ~[na:1.8.0_25]
at com.ning.http.client.multipart.MultipartUtils.writeBytesToChannel(MultipartUtils.java:130) ~[async-http-client-1.9.19.jar:na]
at com.ning.http.client.multipart.ByteArrayPart.write(ByteArrayPart.java:75) ~[async-http-client-1.9.19.jar:na]
at com.ning.http.client.multipart.MultipartBody.transferTo(MultipartBody.java:86) ~[async-http-client-1.9.19.jar:na]
at com.ning.http.client.providers.netty.request.body.BodyFileRegion.transferTo(BodyFileRegion.java:47) ~[async-http-client-1.9.19.jar:na]
at org.jboss.netty.channel.socket.nio.SocketSendBufferPool$FileSendBuffer.transferTo(SocketSendBufferPool.java:331) ~[netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:201) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromUserCode(AbstractNioWorker.java:146) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:84) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:60) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleDownstream(HttpClientCodec.java:97) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.handler.stream.ChunkedWriteHandler.flush(ChunkedWriteHandler.java:280) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:121) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:348) [netty-3.10.1.Final.jar:na]
at com.ning.http.client.providers.netty.request.body.NettyBodyBody.write(NettyBodyBody.java:79) [async-http-client-1.9.19.jar:na]
at com.ning.http.client.providers.netty.request.NettyRequestSender.writeRequest(NettyRequestSender.java:338) [async-http-client-1.9.19.jar:na]
at com.ning.http.client.providers.netty.handler.HttpProtocol.exitAfterHandling100(HttpProtocol.java:279) [async-http-client-1.9.19.jar:na]
at com.ning.http.client.providers.netty.handler.HttpProtocol.handleHttpResponse(HttpProtocol.java:433) [async-http-client-1.9.19.jar:na]

0 个答案:

没有答案