ChunkedWriteHandler没有正确处理100继续响应以发送所有块(ChunkedWriteHandler did not handle 100 Continue response prop

编程入门 行业动态 更新时间:2024-10-24 16:30:56
ChunkedWriteHandler没有正确处理100继续响应以发送所有块(ChunkedWriteHandler did not handle 100 Continue response properly to send all the chunks)

我使用netty 4.0.9(或12)HttpUploadClient方式发送大(> 8K)的帖子请求。 但是,在第一个块发送到服务器后,服务器发回“100 continue”。 ChunkedWriteHandler没有处理“100 Continue”来发送剩余的块。 相反,100继续传递到顶部处理程序的上游,无法处理。 如何修改ChunkedWriteHandler来处理“100 Continue”响应以恢复发送剩余的块以完成大的post请求?

I have used the netty 4.0.9 (or 12) HttpUploadClient way to send large (>8K) post request. However, after the first chunk sent to the server, the server sent back "100 continue". The ChunkedWriteHandler did not handle the "100 Continue" to send the remaining chunk. Instead, the 100 Continue was passed upstream the top handler which can't handle. How can the ChunkedWriteHandler be modified to handle the "100 Continue" response to resume sending the remaining chunk to finish the large post request?

最满意答案

ChunkedWriteHandler是一个与协议无关的处理程序,因此您不应添加特定于HTTP的任何内容。

相反,您可以更新管道中的最后一个处理程序,以便它理解100-Continue消息。 在编写任何块之前,最好先等待100-Continue响应。

或者,您可以从请求中删除Expect: 100-continue标头,然后HTTP服务器将不会发送此类响应。

This bug is fixed in 4.0.15 for the AbstractMemoryHttpData.java getChunk() function.

The exception was IllegalReferenceCountException in AbstractByteBuf.java.

However, in the ChunkedWriteHandler.java doFlush(), there is catch(final Throwable t), which may prevent any future other exception to propagate unless explicitly check it.

更多推荐

本文发布于:2023-07-08 19:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1080212.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正确处理   handle   ChunkedWriteHandler   Continue   send

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!