Is there away to force HttpWebRequest post data to

2019-07-08 03:23发布

问题:

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.