B
Bob.removethis.Hodge
I have written a class that will asynchronously read the response
stream from an httpwebrequest. It uses the Stream.BeginRead method
inside my EndGetResponse callback function, and my Stream.EndRead
callback function will use BeginRead again until the EndRead callback
results in zero bytes read. Works great, and it should, since I
borrowed the framework from an example found in MSDN somewhere.
However, when the response is being sent with Transfer-Encoding =
Chunked, this technique appears to break. When my stream appears to
be exhausted, I have nothing but headers, no "payload".
I have tried, when the first stream is exhausted, using another
"BeginGetResponse" if the headers indicate chunking. No dice. I've
also attempted to get another stream after closing the first. Not
happening.
I've searched everywhere for example code that does this and handles
chunking, and so far, no success.
Please let me know if you think there's a better place to ask this
question, also.
Bob
stream from an httpwebrequest. It uses the Stream.BeginRead method
inside my EndGetResponse callback function, and my Stream.EndRead
callback function will use BeginRead again until the EndRead callback
results in zero bytes read. Works great, and it should, since I
borrowed the framework from an example found in MSDN somewhere.
However, when the response is being sent with Transfer-Encoding =
Chunked, this technique appears to break. When my stream appears to
be exhausted, I have nothing but headers, no "payload".
I have tried, when the first stream is exhausted, using another
"BeginGetResponse" if the headers indicate chunking. No dice. I've
also attempted to get another stream after closing the first. Not
happening.
I've searched everywhere for example code that does this and handles
chunking, and so far, no success.
Please let me know if you think there's a better place to ask this
question, also.
Bob