[Mono-devel-list] Re: Updates for HttpWebRequest and WebClient

Miguel de Icaza miguel at ximian.com
Thu Apr 24 17:37:38 EDT 2003


> <code>
>     WebClient client = new WebClient();
>     byte[] data = client.DownloadData(
> 		"http://www.go-mono.com/index.html");
> </code>
> 	The call to DownloadData throws an exception in the call of
> Socket.Poll in HttpWebRequestStream, and the WebClient needs to set the
> ContentLength to zero (It does not send any data, except the headers)

Thanks for sending this test case.  

I have commited a slightly different patch that only encodes
Content-Lenght when it is required.  Currently only the "GET" and "HEAD"
method will avoid requiring the Content-Length, but probably others need
it too. 


More information about the Mono-devel-list mailing list