.net 调用spring boot rest api 的100-Continue问题

业务场景比较简单,以前使用的是nginx 到spring boot rest api,现在临时调整为了.net client 直接到spring boot rest api
出现了超时问题,然后通过抓包发现有莫名的100-Continue 请求,结果搜索了下居然也有人有类似的问题,之后通过wireshark
抓包分析发现,.net client 请求的时候的确会包含了此请求,参考下图,在几次处理之后彼此发现协议处理有问题了,然后同时触发了超时
.net client 配置的

 

 


解决方法
可以参考以下链接的禁用100-Continue 就可以了

参考资料

https://blog.csdn.net/weixin_35900668/article/details/114411177
https://httpwg.org/specs/rfc7231.html#status.100
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/100
https://blog.csdn.net/skh2015java/article/details/88723028
http://data.farmchina.org.cn/docs/config/http.html
https://sadique.io/blog/2012/01/16/debugging-c-sharps-httpwebrequest-100-continue-and-nginx/
https://www.fallingcanbedeadly.com/posts/http-100-continue-latency-and-you

posted on 2022-08-08 21:22  荣锋亮  阅读(156)  评论(0编辑  收藏  举报

导航