title: HttpWebRequest partially fails to get data
body: <p>I have this code, calling <a href="https://api.guildwars2.com/v1/events.json?world_id=1001" rel="nofollow">this sample API call of the game Guild Wars 2</a></p>
  
  <pre><code>        HttpWebRequest request = HttpWebRequest.Create("https://api.guildwars2.com/v1/events.json?world_id=1001") as HttpWebRequest;
          HttpWebResponse response = request.GetResponse() as HttpWebResponse;
  
          byte[] bytes = new byte[response.ContentLength];
          Stream stream = response.GetResponseStream();
          stream.Read(bytes, 0, bytes.Length);
          string result = Encoding.Default.GetString(bytes);
  </code></pre>
  
  <p>It is a sample call to the official Guild Wars 2 API and is supposed to return a list of events and their status in JSON format.</p>
  
  <p>If you call the address in a browser and paste the data into a text editor, it gives a correct JSON string, of a little more than 300 kb.</p>
  
  <p>However, when called by this code and, looking at the resulting byte array, the first 3800-3900 bytes are correctly filled (the number varies slightly from call to call), but the rest is all zero. </p>
  
  <p>The response.ContentLength indicates the correct length of the stream, a little more than 300k, and testing with stream.ReadByte() tells me the stream does deliver those 300k, it's just zeroes after that 3850 byte mark.</p>
  
  <p>Is there an error in my code, or what could cause this problem? Could I call the API in another way to get the correct, full response?</p>