Force To Read HttpWebResponse.GetResponseStream() When Content-Length Is Zero
As title said.
Sometime an HTTP response from remote server includes Content-Length
header with zero value, but it still return HTTP body. The body can still
be obtained with jQuery in browser, but using
HttpWebResponse.GetResponseStream() can't read anything. How do I force to
read it? Thanks everyone.
Here's an example of HTTP response which I met.
HTTP/1.1 200 OK Connection: keep-alive Cache-Control: no-cache,no-store
Content-Type: text/plain Content-Length: 0 Date: Mon, 30 Sep 2013 09:34:21
GMT
No comments:
Post a Comment