0
点赞
收藏
分享

微信扫一扫

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

心存浪漫 2022-10-07 阅读 192

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

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

 

 

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

参考资料

​​https://httpwg.org/specs/rfc7231.html#status.100​​​​​​

​​https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/100​​

(​​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​​

举报

相关推荐

0 条评论