Is there away to force HttpWebRequest post data to be sent right away?

帅比萌擦擦* 提交于 2019-12-24 00:28:19

问题


Using Wireshark, Send POST data with HttpWebRequest, the data is being sent in a secondary packet instead of being applied to the primary packet and then sending secondary packets if need be.

HttpWebRequest is sending only header information in the first packet and then POST data in the second packet. This is causing the HTTP Server to respond before the full HTTP request is received. Server is acting like an empty POST message even with the Content-Length being set in the header because no content has been append to the initial HTTP request packet.

This issue is only replicable using .Net HttpWebRequest. Using python, curl, or every other form of HTTP Client request does not cause this issue.

Currently using .Net framework 4.5.

Any way to force .Net HttpWebRequest to send POST data in the initial request packet?

P.S. I am not talking about the TCP SYN and ACK packets that come before Application content.

来源:https://stackoverflow.com/questions/30990932/is-there-away-to-force-httpwebrequest-post-data-to-be-sent-right-away

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!