tag:blogger.com,1999:blog-5295746446529817470.post1407891398379898848..comments2023-05-09T16:29:24.130+02:00Comments on Dotnet by Example: Creating a simple proxyJoost van Schaikhttp://www.blogger.com/profile/02182444268071162776noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-5295746446529817470.post-31551441473264818482010-12-02T18:34:46.634+01:002010-12-02T18:34:46.634+01:00Hi,
I am using your code and it's working ver...Hi,<br /><br />I am using your code and it's working very well!<br /><br />I had only one little bug though that I fixed. If you want to get a page that encodes in chunks the response, you will have a problem because the headers will say "encoded" and the content won't be.<br /><br />So here is the little trick:<br /><br /><br /> foreach (string header in backendResponse.Headers)<br /> {<br /> if (string.Compare(header, "Content-Length", true) == 0)<br /> {<br /> contentLenghtFound = true;<br /> }<br /> if (string.Compare(header, "Transfer-Encoding", true) != 0)<br /> {<br /> response.AppendHeader(header, backendResponse.Headers[header]);<br /> }<br /> }<br /><br />Hope it helps someone :)Unknownhttps://www.blogger.com/profile/10566675761619008974noreply@blogger.com