﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on What is wrong with this code? Answers</title><description>Here is the code in full:
  
  
public static WebRequest SetupWebRequest(WebRequest result,
  
                                         ICredentials credentials)
  
{
  
    result.Timeout = Timeout.Infinite;
  
  
    HttpWebRequest httpResult = result as HttpWebRequest;
  
  
    if (httpResult != null)
  
    {
  
        httpResult.Credentials = credentials;
  
        httpResult.ServicePoint.ConnectionLimit = 15;
  
        httpResult.ServicePoint.UseNagleAlgorithm = false;
  
        httpResult.SendChunked = false;
  
        httpResult.Pipelined = false;
  
        httpResult.KeepAlive = true;
  
        httpResult.PreAuthenticate = false;
  
        httpResult.UserAgent = "CodePlexClient";
  
    }
  
  
    return result;
  
}
  
</description><link>http://ayende.com/3245/what-is-wrong-with-this-code-answers#comment4</link><guid>http://ayende.com/3245/what-is-wrong-with-this-code-answers#comment4</guid><pubDate>Wed, 02 Apr 2008 22:39:08 GMT</pubDate></item><item><title>Jeremy Gray commented on What is wrong with this code? Answers</title><description>"This happened to me when the server was using GZip compression to send files. The CLR Web API will automatically notify the server that they can accept gzip and deflate compressions, and they will decompress it behind the scene when it comes the time to read it."
  
  
Since when? I've always had to layer up a bit of code to add the deflate request header and decompress the response body. Are you perhaps somehow hiding some of these details down in "Util.SetupWebRequest(...)"?
</description><link>http://ayende.com/3245/what-is-wrong-with-this-code-answers#comment3</link><guid>http://ayende.com/3245/what-is-wrong-with-this-code-answers#comment3</guid><pubDate>Wed, 02 Apr 2008 22:33:52 GMT</pubDate></item><item><title>Ayende Rahien commented on What is wrong with this code? Answers</title><description>Here they are:
  
http://www.codeplex.com/CodePlexClient/SourceControl/FileView.aspx?itemId=210197&amp;changeSetId=17338
</description><link>http://ayende.com/3245/what-is-wrong-with-this-code-answers#comment2</link><guid>http://ayende.com/3245/what-is-wrong-with-this-code-answers#comment2</guid><pubDate>Tue, 01 Apr 2008 22:34:23 GMT</pubDate></item><item><title>Eber Irigoyen commented on What is wrong with this code? Answers</title><description>so now that you have a real world scenario... let's see the tests for this
</description><link>http://ayende.com/3245/what-is-wrong-with-this-code-answers#comment1</link><guid>http://ayende.com/3245/what-is-wrong-with-this-code-answers#comment1</guid><pubDate>Tue, 01 Apr 2008 22:22:51 GMT</pubDate></item></channel></rss>