I'm playing around with HttpClient for the first time and I am able to get it to send small requests but around 3500 bytes I start to get errors and if I use a 4000 byte request it never works. If I attempt to send the same large request through internet explorer it works fine. I used Wireshark to see what the difference was between what IE sent and what HttpClient sent. What I see is that after ie sends the first [ACK] to the server it then sends a [PSH, ACK] to the server that contains the http header info. When I use HttpClient it sends the first [ACK] and then starts sending [ACK]s with the request information. I never see HTTPClient send the HTTP header info. Am I not setting my http header up correctly through HttpClient? Here is my relevant code:
I've tried a lot of different permutations of this but I keep getting this error on larger requests:
Hi Martijn, the primary reason I went with 3.1 was that I was able to find the api pages online for it. Since I wasn't sure if there were available api docs for version 4 I went with 3.1.
Actually, I think I fixed my problem this morning. My mistake was that I was trying to send my request parameters by just sending them as part of the URI. I looked at the http client code and saw that when I do that, it tries to send the entire 40k request before it sends the http headers. I guess IE and fiddler must parse out the actual address part of a request and send it first, but httpclient 3.1 assumes that you won't send the parameters as part of the URI. So when I set the parameters using m_postMethod.addParameter things worked much better.