[Mono-bugs] [Bug 411861] New: StreamReader.ReadToEnd() does not come to end in some cases

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 24 10:29:56 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=411861


           Summary: StreamReader.ReadToEnd() does not come to end in some
                    cases
           Product: Mono: Runtime
           Version: 1.9
          Platform: i386
        OS/Version: openSUSE 10.3
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: torsten.zachert at teserco.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: Customer


I found a case, where StreamReader.ReadToEnd() does not come to an end

Using mono 1.9.1 on openSuse 10.3 x86


Create a console application:

using System;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Security.Cryptography.X509Certificates;

public class Program : ICertificatePolicy {

        public bool CheckValidationResult (ServicePoint sp, 
                X509Certificate certificate, WebRequest request, int error)
        {
                return true;
        }

        public static void Main (string[] args) 
        {
                ServicePointManager.CertificatePolicy = new Program ();

                string uri = "https://www.skill7.com";
                //string uri = "https://www.comdirect.de";

                HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(uri);     
                wr.Headers.Add("Accept-Encoding", "gzip, deflate");
                HttpWebResponse resp = (HttpWebResponse)wr.GetResponse();
                Stream stream = resp.GetResponseStream();
                if(resp.ContentEncoding.ToLower().Contains("gzip"))
                {
                        Console.WriteLine("gzip");
                        stream = new GZipStream(stream, 
                                CompressionMode.Decompress);
                }
                // the next line does not come to an end with uri = 
                        "https://www.skill7.com"
                string html = new StreamReader(stream).ReadToEnd();
                Console.WriteLine(html);
        }
}

-----------------------------

the code works fine with: string uri = "https://www.comdirect.de";
the code hangs with: string uri = "https://www.skill7.com";


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list