If the transfer encoding was set to chunked, we tried to read even when
the response might known to have no content. This led to timeouts.
Fixes bug #686371.
If there's a POST/PUT request that gets a NTLM 401, we save the data
and don't send it again until after the challenge phase. Ie, instead of
sending all the data 3 times, we only send it at most twice.
There is a possible crash using this profile if the monotouch.dll
isn't loaded into the process space. We will null guard the
type and only call start_wwan if its present.
2010-07-21 Sebastien Pouliot <[email protected]>
* Makefile: Ensure SECURITY_DEP gets defined in our moonlight
raw profile
In System.Net:
2010-07-21 Sebastien Pouliot <[email protected]>
* ServicePointManager.cs: Add special validation for Moonlight
* WebConnection.cs: Change a define to NET_2_1
In System.Net.Security:
2010-07-21 Sebastien Pouliot <[email protected]>
* LocalCertificateSelectionCallback.cs:
* SslStream.cs:
Don't use alias in moonlight build (not needed and breaks
compilation otherwise)
svn path=/trunk/mcs/; revision=160675
* System.Net/WebConnection.cs: attach a validation callback to the new
event in Mono.Security.
* System.Net/ServicePointManager.cs: added a new ValidationHelper
class that takes care of building the certificate chain and perform
all the check that were done in Mono.Security before. This way the 2.0
server certificate validation callback can get all the data it needs.
* System.Net.Security/SslStream.cs: don't do anything if a chain
element has no error.
Fixes bug #584050.
svn path=/trunk/mcs/; revision=152654
* WebConnection.cs: if the request has already finished reading, don't
throw ObjectDisposedException here, just return as if nothing
happened. Fixes bug #312968.
svn path=/trunk/mcs/; revision=141346
* WebConnection.cs: provide better error message when there's an error
writing.
* WebConnectionStream.cs: don't nullify the buffer until
CheckFinalStatus() decides that there are no more authentication
retries or redirects.
svn path=/trunk/mcs/; revision=137332
* WebAsyncResult.cs: new field that tells us if the request is being
written automatically because we reached the content length.
* WebConnection.cs:
* WebConnectionStream.cs: make sure we only access the NetworkStream
while we own it. Automatically write the request when we reach
ContentLength number of bytes. Kill the write buffer as soon as
possible. Don't use the buffer at all when chunked encoding is
enabled.
Fixes bugs #515931 and #510642.
svn path=/trunk/mcs/; revision=136900
* WebConnection.cs: 'socket' and 'Data' where being changed by 2
threads at the same time when there were queued requests and the
current one was aborted in Connect().
* HttpWebRequest.cs: 'aborted' is now an int and we use Interlocked to
access it. Added WebConnection field used when aborting the request.
Fixes bug #514591 for good.
svn path=/trunk/mcs/; revision=136753
* WebConnection.cs: make sure we don't open a new socket if the
request is aborted before we establish the connection. Fixes bug
#514591.
* HttpWebRequest.cs: new property to return abort status. Invoke the
abort handler before doing anything else when Abort() is called for
the first time.
svn path=/trunk/mcs/; revision=136516
* WebConnection.cs: propagate the exception to the request.
* WebException.cs: new internal ctor.
* HttpWebRequest.cs: use new ctor to encapsulate the innerException.
Fixes#323452.
2009-06-16 Andrés G. Aragoneses <[email protected]>
* WebRequestTest.cs: Drop NotWorking attrib, more accurate tests.
svn path=/trunk/mcs/; revision=136198
* WebConnection.cs:
* HttpWebRequest.cs: provide more information on why the connection
could not be established.
svn path=/trunk/mcs/; revision=132220
* HttpWebRequest.cs: don't call ProxyRequest twice.
* WebConnectionData.cs: remove unused fields.
* WebConnection.cs:
* WebConnectionStream.cs: when setting the input buffer, check to see
if the entire response is already there and free up the request slot.
Fixes bug #423156.
* ResponseStream.cs:
* HttpListenerResponse.cs: buffer the headers so that they are sent
together with the data on the first Write (if any). The fix above
didn't work with our HttpListener without this.
svn path=/trunk/mcs/; revision=116868
* WebConnectionStream.cs (WriteRequest): For small requests,
cluster together the header + body in a single write call, avoids
the latency problems observed in an TLS application that makes
many web service calls.
2008-08-22 Geoff Norton <[email protected]>
* WebConnection.cs: Set NoDelay
svn path=/trunk/mcs/; revision=111430
* WebConnection.cs: Patch to remove the hack that was required for
using the older versions of the SSL/TLS classes. This hack is no more
required :-). Patch by Gonzalo Paniagua Javier.
svn path=/trunk/mcs/; revision=65260
* WebConnection.cs: reset the challenge and the status code when
creating the tunnel and sending the proxy auth. headers. Improve error
message when there's an error creating the tunnel.
* HttpWebRequest.cs: don't trigger an early throw for a POST that gets
a 401 or 407 response.
svn path=/trunk/mcs/; revision=60022
* WebConnectionData.cs:
* WebConnection.cs:
* HttpWebRequest.cs: when tunneling an ssl conneciton through a proxy,
we were not handling a proxy authentication request. Fixes bug #78150
take 2.
svn path=/trunk/mcs/; revision=59952
* WebConnection.cs: if cnc.EndRead throws, mark the asyncresult as done.
* WebConnectionStream.cs: if we're done with the body of a chunk, don't
require the next chunk header to be there, as some servers might close
the connection (while also sending 'Connection: close').
svn path=/trunk/mcs/; revision=46512
* WebConnection.cs: SslClientStream.BeginRead might not be asynchronous
if there's no record available to read. This is a workaround that makes
the call to BeginRead itself asynchronous. Fixes bug #75342.
svn path=/trunk/mcs/; revision=46332
* WebConnection.cs:
* HttpWebRequest.cs:
* WebConnectionStream.cs: initiate the polling for input data after
sending the header so that we detect any response that the server sends
back even if we're still trying to write the request for a POST/PUT.
If we get the response (or an error) before any one calls GetResponse(),
keep it around instead of ignoring it.
svn path=/trunk/mcs/; revision=45785
* System.Net/WebConnection.cs: prevent 2 nullrefs when the aborting
during Connect() and reset the status to Success before starting a
new request.
* System.Net.Sockets/Socket.cs: apply the same hack on blocking Connect
calls as the one used in Accept.
Fixes bug #75025.
svn path=/trunk/mcs/; revision=44919
* WebConnection.cs: don't rethrow errors in Write, as the error will be
received by GetResponse*. The result is that the threadpool thread doing
this will not end up printing the exception. Fixes bug #74817.
svn path=/trunk/mcs/; revision=44008
* WebConnection.cs: removed a 'slightly' important line by mistake.
* WebConnectionStream.cs: if the transfer encoding is chunked, ignore
content-length header if present.
svn path=/trunk/mcs/; revision=43952
* WebConnection.cs: no need to use an AutoResetEvent.
* WebConnectionStream.cs: don't start any more reads on the socket
after getting a 0 signalling the end. This fixes Ben's infamous foo.cs
test.
svn path=/trunk/mcs/; revision=43916
* WebConnection.cs:
* WebConnectionStream.cs: don't start reading until we've sent at least
the headers. This way we ensure that a Write happens before any Read,
which is needed by the SSL code.
svn path=/trunk/mcs/; revision=42792
* WebConnection.cs: fix some breakage from my last patch.
* WebConnectionStream.cs: invoke the callback when done even in EndRead.
svn path=/trunk/mcs/; revision=42768
* WebConnection.cs: if we're reading chunked data and didn't use the
stream to read, we gotta set the async. result as complete and invoke
the callback. Don't call nstream.EndRead with the wrong IAsyncResult.
* WebConnectionStream.cs: in EndRead, pass the correct IAsyncResult to
cnc.EndRead. Lock on a field instead of 'this'.
svn path=/trunk/mcs/; revision=42750