* WebClient.cs: handle compressed streams when automatic decompression
is turned on by a class derived from WebClient.
svn path=/trunk/mcs/; revision=160084
* WebClient.cs: fix handling of query string, whether it comes from
the address used or is part of the QueryString.
svn path=/trunk/mcs/; revision=153960
* WebClient.cs: rethrow WebExceptions instead of creating a new one
with less information on the actual error.
Fixes bug #526069.
svn path=/trunk/mcs/; revision=138855
* WebClient.cs: implement GetWebRequest and GetWebResponse. Use them
instead of SetupRequest and ProcessResponse.
svn path=/trunk/mcs/; revision=137673
* WebClient.cs: set the content length when uploading values. This
allows reusing the connection.
* WebConnectionStream.cs: SetHeaders() takes ownership of the buffer
and does not need to copy it any more. WriteRequest() wasn't always
setting 'requestWritten' to true.
* HttpWebRequest.cs: change in SetHeaders call.
svn path=/trunk/mcs/; revision=137497
zero-length string literal. Fixed exception argument name to match
MS.
* WebConnectionStream.cs: Throw a WebException that wraps an
IOException when closing the stream before all bytes are written.
svn path=/trunk/mcs/; revision=136543
* FtpWebResponse.cs: return a Null stream when there's no response to
be read.
* FtpWebRequest.cs: provide the error returned by the server in the
exception.
* WebClient.cs: set the correct method when doing a FTP upload.
Fixes bug #478451.
svn path=/trunk/mcs/; revision=127640
* FtpWebRequest.cs: avoid errors when creating a temporary Uri to get
the local path.
* WebClient.cs: when setting up the request for downloading, use the
default method. Fixes bug #477611.
svn path=/trunk/mcs/; revision=127449
* WebClient.cs: We catch exceptions that happen on the helper
async threads toa void terminating the application on errors, and
also raise a variant of the OnXXXXCompleted methods that take an
Exception argument.
Note that this differs from the .NET implementation in that
we actually raise a signal on error, and set the exception, and in
their case no error is ever raised.
We now call CompleteAsync in the OnXXXCompleted handlers to ensure
that the WebClient can be reused immediately by the callback.
This fixes#350621.
This also should fix the bug report on IRC where someone
complained that they could not "chain" invocations to XXXAsync
methods from the OnXXXXCompleted handlers due to the WebClient
refusing to work if there was an ongoing operation
svn path=/trunk/mcs/; revision=91959
* WebClient.cs: Do not validate method to be null, we do not do
that in OpenWrite, the detection is done later on.
Fixes#350622
svn path=/trunk/mcs/; revision=91867
* WebClient.cs (DownloadFileCore): use longs for the
ContentLength, although the other code (loading into a byte array,
or a string) still uses ints, the DownloadFileCore should not.
2007-12-11 Miguel de Icaza <[email protected]>
* WebClient.cs:
Lots of fixes to get the *Async methods to work.
* WebClient.cs: async, new boolean flag, used to track whether we
are an async invocation, and if so, we need to invoke some
methods.
Switch to using System.Threading.Thread instead of the ThreadPool
as there is no way with the ThreadPool to abort threads (to
implemente CancelAsync).
(CompleteAsync): Helper method used to clear the state after an
async operation completes, otherwise the WebClient can only be
used once.
(CancelAsync): Use Thread.Interrupt to signal the thread that we
are aborting it (it is a lot milder than Thread.Abort, and we are
in no rush to cancel this anyways); Also the documentation states
that we need to call the WebRequest.Abort method, so we do that in
every Download instance.
(DownloadDataAsync, DownloadFileAsync, DownloadStringAsync,
OpenReadAsync, OpenWriteAsync, UplaodDataAsync, UploadFileAsync,
UploadStringAsync): Make signature parameters match MS; use
threads instead of threadpool (so we can implement CancelAsync),
catch ThreadAbortException here so we can also raise the proper
DownloadDataCompleteEventArgs.
These routines will also call the WebRequest.Abort when
appropriate when ThreadInterrupted is used.
(ReadAll): Raise DownloadProgressChanged events.
svn path=/trunk/mcs/; revision=91142
* Uri.cs: Pragma disable warning 612 (Obsolete methods are being
used by us internally).
Ponder: should we instead move our methods to use new versions of
the Obsoleted ones?
2006-03-11 Miguel de Icaza <[email protected]>
* CodeNamespaceImportCollection.cs: It turns out that a lot of the
errors flagged with "!" were just missing explicit interface
implementations.
Implement.
2006-03-11 Miguel de Icaza <[email protected]>
* CodeDomConfigurationHandler.cs: Comment out unused methods.
* TempFileCollection.cs: Implement explicitly some interface
methods to get rid of the "!" errors on CorCompare.
2006-03-11 Miguel de Icaza <[email protected]>
* Queue.cs: Flag as serializable.
* LinkedList.cs (OnDeserialization): Fix signature.
* SortedList.cs: Implement explicitly a few methods that were
flagged by corcompare.
2006-03-11 Miguel de Icaza <[email protected]>
* IOrderedDictionary.cs: Flag GetEnumerator as a "new" method to
avoid warning.
2006-03-11 Miguel de Icaza <[email protected]>
* ConfigurationSettings.cs (ChangeConfigurationSettings): Make
internal to avoid warnings. This routine is called from
System.Web with MethodInfo.Invoke.
2006-03-11 Miguel de Icaza <[email protected]>
* DeflateStream.cs: Comment out DllImport that was not being
used.
2006-03-11 Miguel de Icaza <[email protected]>
* y
* SerialPort.cs: Remove unused variable (writeBuffer).
* SerialPortStream.cs (Dispose): override, not new.
2006-03-11 Miguel de Icaza <[email protected]>
* WebClient.cs: Only expose the right methods to avoid warnings.
* FtpDataStream.cs (Dispose): Fix signature.
* FtpWebResponse.cs: Comment out keepAlive field (unused, sounds
like we are missing features here).
* IPAddress.cs: Move m_HashCode property to the end, and set
pragmas to disable warnings.
2006-03-11 Miguel de Icaza <[email protected]>
* MailAddress.cs: Comment out unused field to remove warning.
2006-03-11 Miguel de Icaza <[email protected]>
* NetworkChange.cs: Use pragmas to eliminate warnings from events
that we do not trigger yet.
This is a candidate for using Aaron's NetworkManager code. But
would make us depend on d-bus.
* NetworkInformationException.cs: Use error_code for ErrorCode,
instead of NativeErrorCode. Fixes warning.
2006-03-11 Miguel de Icaza <[email protected]>
* AuthenticatedStream.cs: Fixed normative parameter names (yes, we
need to do this everywhere one day).
(Close): actually obey the "leaveInnerStreamOpen" setting from the
constructor.
2006-03-11 Miguel de Icaza <[email protected]>
* NetworkStream.cs (Dispose): Use the right signature depending on
the profile being built.
2006-03-11 Miguel de Icaza <[email protected]>
* X509Chain.cs: Flagged member as internal to avoid unused warning.
* X500DistinguishedName.cs: Comment out unused names and move
temporary unused variables inside the comments that were removed
svn path=/trunk/mcs/; revision=57836
* WebClient.cs : added UploadString() and Encoding (net_2_0). Added
some new overloaded stuff that takes Uri instead of string address.
svn path=/trunk/mcs/; revision=51901
* WebClient.cs: use Path.DirectorySeparator instead of "/" for
windows compatibility. Add some checks for file paths like
"C:/xxx/yyy/..." and like "/home/xxx/...".
svn path=/trunk/mcs/; revision=19127
* Uri.cs: fixed a problem with some URIs like file://some_file.txt
It used to return "/some_file.txt/" instead of "some_file.txt" in
LocalPath. Fix handling of full path files and SMB addresses.
* UriTest.cs: added some test for "file://one_file.txt". Uri used to
fail with this URIs.
* WebClient.cs: MS.NET works right when we try OpenRead("file.txt")
but we didn't. Now, when Uri fails with an exception, it adds
"file://" before the URI and tries again.
svn path=/trunk/mcs/; revision=18870