I need to get a webpage (by url) with chunked-encoding in C#. There are some topics (on SO too, this Chunked Encoding Implementation in .NET (or at least pseudo code) for ex) about it, but I can't figure out how to do this in plain C#. Please help me with code :)
-
What have you got so far? did you try that pseudo code? – Cheeso Dec 15 '10 at 00:37
-
Cheeso, I got rough idea of pseudo code and can't understand how to implement it - what is CRLF, how to read chunk-size, etc. – lak-b Dec 15 '10 at 11:03
2 Answers
Figured this out. My actually problem was in gzip :)
For the future reference about subject If you need implementation of chunked-encoded request see this Mono sources: http://www.koders.com/csharp/fid20277378DA3C2E68BAB2BC30A899CA45CFE0C150.aspx?s=webclient.cs

- 2,115
- 4
- 18
- 30
Watchout you can also get gZip and Chunked
My un-chunk code was a lot smaller then shown in the link but it was not always perfect for some reason or another.
It would be nice to somehow stream data from a socket into a httprequest and then let that deal with gzip, deflate and chunks but i don't know how to force feed a request stream from a socket.
Click my name if you want a simple .aspx page that realys results from google with 100 results at a time and also removes mouseover and spyware scripts

- 9
- 1