private void RetrieveResponseData(HttpWebResponse response, string dumpToFile) { using (response) { StatusCode = (int)response.StatusCode; _defaultCharset = response.CharacterSet; ProcessHeaders(response.Headers); ProcessResponseBody(response, dumpToFile); if (_body != null && _body.AutoDecompress) { _headers.Delete(ValueFactory.Create("Content-Encoding")); _headers.SetIndexedValue(ValueFactory.Create("Content-Length"), ValueFactory.Create(_body.ContentSize)); } } }